diff --git a/proto/bender.thrift b/proto/bender.thrift index 61265ba..6cd89af 100644 --- a/proto/bender.thrift +++ b/proto/bender.thrift @@ -6,11 +6,18 @@ include "proto/msgpack.thrift" typedef string ExternalID typedef string InternalID +exception InternalIDNotFound {} + struct GenerationResult { 1: required InternalID internal_id 2: optional msgpack.Value context } +struct GetInternalIDResult { + 1: required InternalID internal_id + 2: required msgpack.Value context +} + union GenerationSchema { 1: SnowflakeSchema snowflake 2: ConstantSchema constant @@ -33,4 +40,7 @@ service Bender { GenerationResult GenerateID (1: ExternalID external_id, 2: GenerationSchema schema, 3: msgpack.Value context) + GetInternalIDResult GetInternalID (1: ExternalID external_id) + throws (1: InternalIDNotFound ex1) + }