diff --git a/.gen/dosa/dosa_canupsertschema.go b/.gen/dosa/dosa_canupsertschema.go index e16abbf..adf5254 100644 --- a/.gen/dosa/dosa_canupsertschema.go +++ b/.gen/dosa/dosa_canupsertschema.go @@ -1,4 +1,4 @@ -// Code generated by thriftrw v1.10.0. DO NOT EDIT. +// Code generated by thriftrw v1.12.0. DO NOT EDIT. // @generated package dosa diff --git a/.gen/dosa/dosa_checkschema.go b/.gen/dosa/dosa_checkschema.go index 2aca7c6..4fe204f 100644 --- a/.gen/dosa/dosa_checkschema.go +++ b/.gen/dosa/dosa_checkschema.go @@ -1,4 +1,4 @@ -// Code generated by thriftrw v1.10.0. DO NOT EDIT. +// Code generated by thriftrw v1.12.0. DO NOT EDIT. // @generated package dosa diff --git a/.gen/dosa/dosa_checkschemastatus.go b/.gen/dosa/dosa_checkschemastatus.go index e30cca1..3a8be5c 100644 --- a/.gen/dosa/dosa_checkschemastatus.go +++ b/.gen/dosa/dosa_checkschemastatus.go @@ -1,4 +1,4 @@ -// Code generated by thriftrw v1.10.0. DO NOT EDIT. +// Code generated by thriftrw v1.12.0. DO NOT EDIT. // @generated package dosa diff --git a/.gen/dosa/dosa_createifnotexists.go b/.gen/dosa/dosa_createifnotexists.go index 44b6ddd..2102c4d 100644 --- a/.gen/dosa/dosa_createifnotexists.go +++ b/.gen/dosa/dosa_createifnotexists.go @@ -1,4 +1,4 @@ -// Code generated by thriftrw v1.10.0. DO NOT EDIT. +// Code generated by thriftrw v1.12.0. DO NOT EDIT. // @generated package dosa diff --git a/.gen/dosa/dosa_createscope.go b/.gen/dosa/dosa_createscope.go index 5e9a616..19f892c 100644 --- a/.gen/dosa/dosa_createscope.go +++ b/.gen/dosa/dosa_createscope.go @@ -1,4 +1,4 @@ -// Code generated by thriftrw v1.10.0. DO NOT EDIT. +// Code generated by thriftrw v1.12.0. DO NOT EDIT. // @generated package dosa diff --git a/.gen/dosa/dosa_dropscope.go b/.gen/dosa/dosa_dropscope.go index 3063173..f112a5a 100644 --- a/.gen/dosa/dosa_dropscope.go +++ b/.gen/dosa/dosa_dropscope.go @@ -1,4 +1,4 @@ -// Code generated by thriftrw v1.10.0. DO NOT EDIT. +// Code generated by thriftrw v1.12.0. DO NOT EDIT. // @generated package dosa diff --git a/.gen/dosa/dosa_multiread.go b/.gen/dosa/dosa_multiread.go index f2e966e..aae9816 100644 --- a/.gen/dosa/dosa_multiread.go +++ b/.gen/dosa/dosa_multiread.go @@ -1,4 +1,4 @@ -// Code generated by thriftrw v1.10.0. DO NOT EDIT. +// Code generated by thriftrw v1.12.0. DO NOT EDIT. // @generated package dosa diff --git a/.gen/dosa/dosa_multiremove.go b/.gen/dosa/dosa_multiremove.go index c32942e..6e27ba0 100644 --- a/.gen/dosa/dosa_multiremove.go +++ b/.gen/dosa/dosa_multiremove.go @@ -1,4 +1,4 @@ -// Code generated by thriftrw v1.10.0. DO NOT EDIT. +// Code generated by thriftrw v1.12.0. DO NOT EDIT. // @generated package dosa diff --git a/.gen/dosa/dosa_multiupsert.go b/.gen/dosa/dosa_multiupsert.go index 097e28f..bc78194 100644 --- a/.gen/dosa/dosa_multiupsert.go +++ b/.gen/dosa/dosa_multiupsert.go @@ -1,4 +1,4 @@ -// Code generated by thriftrw v1.10.0. DO NOT EDIT. +// Code generated by thriftrw v1.12.0. DO NOT EDIT. // @generated package dosa diff --git a/.gen/dosa/dosa_range.go b/.gen/dosa/dosa_range.go index 674864b..a4f78fb 100644 --- a/.gen/dosa/dosa_range.go +++ b/.gen/dosa/dosa_range.go @@ -1,4 +1,4 @@ -// Code generated by thriftrw v1.10.0. DO NOT EDIT. +// Code generated by thriftrw v1.12.0. DO NOT EDIT. // @generated package dosa diff --git a/.gen/dosa/dosa_read.go b/.gen/dosa/dosa_read.go index a53e187..cf5d058 100644 --- a/.gen/dosa/dosa_read.go +++ b/.gen/dosa/dosa_read.go @@ -1,4 +1,4 @@ -// Code generated by thriftrw v1.10.0. DO NOT EDIT. +// Code generated by thriftrw v1.12.0. DO NOT EDIT. // @generated package dosa diff --git a/.gen/dosa/dosa_remove.go b/.gen/dosa/dosa_remove.go index 96f5147..4bc3346 100644 --- a/.gen/dosa/dosa_remove.go +++ b/.gen/dosa/dosa_remove.go @@ -1,4 +1,4 @@ -// Code generated by thriftrw v1.10.0. DO NOT EDIT. +// Code generated by thriftrw v1.12.0. DO NOT EDIT. // @generated package dosa diff --git a/.gen/dosa/dosa_removerange.go b/.gen/dosa/dosa_removerange.go index 33626d7..ebf32c0 100644 --- a/.gen/dosa/dosa_removerange.go +++ b/.gen/dosa/dosa_removerange.go @@ -1,4 +1,4 @@ -// Code generated by thriftrw v1.10.0. DO NOT EDIT. +// Code generated by thriftrw v1.12.0. DO NOT EDIT. // @generated package dosa diff --git a/.gen/dosa/dosa_scan.go b/.gen/dosa/dosa_scan.go index 44f29b4..2fb0949 100644 --- a/.gen/dosa/dosa_scan.go +++ b/.gen/dosa/dosa_scan.go @@ -1,4 +1,4 @@ -// Code generated by thriftrw v1.10.0. DO NOT EDIT. +// Code generated by thriftrw v1.12.0. DO NOT EDIT. // @generated package dosa diff --git a/.gen/dosa/dosa_scopeexists.go b/.gen/dosa/dosa_scopeexists.go index 1c865bb..5663008 100644 --- a/.gen/dosa/dosa_scopeexists.go +++ b/.gen/dosa/dosa_scopeexists.go @@ -1,4 +1,4 @@ -// Code generated by thriftrw v1.10.0. DO NOT EDIT. +// Code generated by thriftrw v1.12.0. DO NOT EDIT. // @generated package dosa diff --git a/.gen/dosa/dosa_search.go b/.gen/dosa/dosa_search.go index 6c3c401..ae9dfc0 100644 --- a/.gen/dosa/dosa_search.go +++ b/.gen/dosa/dosa_search.go @@ -1,4 +1,4 @@ -// Code generated by thriftrw v1.10.0. DO NOT EDIT. +// Code generated by thriftrw v1.12.0. DO NOT EDIT. // @generated package dosa diff --git a/.gen/dosa/dosa_truncatescope.go b/.gen/dosa/dosa_truncatescope.go index 60de50e..a8dba1f 100644 --- a/.gen/dosa/dosa_truncatescope.go +++ b/.gen/dosa/dosa_truncatescope.go @@ -1,4 +1,4 @@ -// Code generated by thriftrw v1.10.0. DO NOT EDIT. +// Code generated by thriftrw v1.12.0. DO NOT EDIT. // @generated package dosa diff --git a/.gen/dosa/dosa_upsert.go b/.gen/dosa/dosa_upsert.go index e2c45e4..e3e3d54 100644 --- a/.gen/dosa/dosa_upsert.go +++ b/.gen/dosa/dosa_upsert.go @@ -1,4 +1,4 @@ -// Code generated by thriftrw v1.10.0. DO NOT EDIT. +// Code generated by thriftrw v1.12.0. DO NOT EDIT. // @generated package dosa diff --git a/.gen/dosa/dosa_upsertschema.go b/.gen/dosa/dosa_upsertschema.go index 6a99c34..91722b4 100644 --- a/.gen/dosa/dosa_upsertschema.go +++ b/.gen/dosa/dosa_upsertschema.go @@ -1,4 +1,4 @@ -// Code generated by thriftrw v1.10.0. DO NOT EDIT. +// Code generated by thriftrw v1.12.0. DO NOT EDIT. // @generated package dosa diff --git a/.gen/dosa/idl.go b/.gen/dosa/idl.go index 417c98f..13d0527 100644 --- a/.gen/dosa/idl.go +++ b/.gen/dosa/idl.go @@ -1,4 +1,4 @@ -// Code generated by thriftrw v1.10.0. DO NOT EDIT. +// Code generated by thriftrw v1.12.0. DO NOT EDIT. // @generated package dosa @@ -10,8 +10,8 @@ var ThriftModule = &thriftreflect.ThriftModule{ Name: "dosa", Package: "github.com/uber/dosa-idl/.gen/dosa", FilePath: "dosa.thrift", - SHA1: "55c1f82dac51bae95943ac27b229f88e0055c9b2", + SHA1: "ae00cb02a0e58de9a093e75609a9df13820eee71", Raw: rawIDL, } -const rawIDL = "// Copyright (c) 2017 Uber Technologies, Inc.\n\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nnamespace java com.uber.dosa\n\ntypedef map FieldValueMap\n\nenum ElemType {\n BOOL,\n BLOB,\n STRING,\n INT32,\n INT64,\n DOUBLE,\n TIMESTAMP,\n UUID,\n\n // Reserve a few enum types in case we want to support few more\n RESERVED0,\n RESERVED1,\n RESERVED2,\n RESERVED3,\n}\n\nunion RawValue {\n 1: optional binary binaryValue // BLOB, UUID\n 2: optional bool boolValue // BOOL\n 3: optional double doubleValue // DOUBLE\n 4: optional i32 int32Value // INT32\n 5: optional i64 (js.type = \"Long\") int64Value // INT64, TIMESTAMP\n 6: optional string stringValue // STRING\n}\n\n// make it union in case we want to support collections like set\nunion Value {\n 1: optional RawValue elemValue\n}\n\nstruct SchemaRef {\n 1: optional string scope\n 2: optional string namePrefix\n 3: optional string entityName\n 4: optional i32 version\n}\n\nstruct FieldTag {\n 1: optional string name\n 2: optional string value\n}\n\nstruct FieldDesc {\n 1: optional ElemType type\n 2: optional set tags\n}\n\nstruct ClusteringKey {\n 1: optional string name\n 2: optional bool asc\n}\n\nstruct PrimaryKey {\n 1: optional list partitionKeys\n 2: optional list clusteringKeys\n}\n\nstruct IndexDefinition {\n 1: optional PrimaryKey key\n}\n\nenum ETLState {\n OFF = 1,\n ON,\n \n // Reserve a few enum types in case we want to support more\n RESERVED0,\n RESERVED1\n}\n\nstruct EntityDefinition {\n 1: optional string name\n 2: optional map fieldDescs\n 3: optional PrimaryKey primaryKey\n 4: optional map Indexes\n 5: optional ETLState etl\n}\n\nstruct Error {\n 1: optional i32 errCode\n 2: optional string msg\n 3: optional bool shouldRetry\n}\n\nstruct CreateRequest {\n 1: optional SchemaRef ref\n 2: optional FieldValueMap entityValues\n 3: optional i64 ttl\n\n}\n\nstruct ReadRequest {\n 1: optional SchemaRef ref\n 2: optional FieldValueMap keyValues\n 3: optional set fieldsToRead\n}\n\nstruct ReadResponse {\n 1: optional FieldValueMap entityValues\n}\n\nstruct MultiReadRequest {\n 1: optional SchemaRef ref\n 2: optional list keyValues\n 3: optional set fieldsToRead\n}\n\nunion EntityOrError{\n 1: optional FieldValueMap entityValues\n 2: optional Error error\n}\n\nstruct MultiReadResponse {\n 1: optional list results\n}\n\nstruct MultiUpsertResponse {\n 1: optional list errors\n}\n\nstruct UpsertRequest {\n 1: optional SchemaRef ref\n 2: optional FieldValueMap entityValues\n 3: optional i64 ttl\n}\n\nstruct MultiUpsertRequest {\n 1: optional SchemaRef ref\n 2: optional list entities\n}\n\nstruct RemoveRequest {\n 1: optional SchemaRef ref\n 2: optional FieldValueMap keyValues\n}\n\nstruct MultiRemoveRequest {\n 1: optional SchemaRef ref \n 2: optional list keyValues\n}\n\nstruct MultiRemoveResponse {\n 1: optional list errors\n}\n\nenum Operator {\n EQ,\n LT,\n GT,\n LT_OR_EQ,\n GT_OR_EQ,\n}\n\nstruct Field {\n 1: optional string name\n 2: optional Value value\n}\n\nstruct Condition {\n 1: optional Operator op\n 2: optional Field field\n}\n\nstruct RangeRequest {\n 1: optional SchemaRef ref\n 2: optional string token\n 3: optional i32 limit\n 4: optional list conditions\n 5: optional set fieldsToRead\n}\n\nstruct RangeResponse {\n 1: optional list entities\n 2: optional string nextToken\n}\n\nstruct RemoveRangeRequest {\n 1: optional SchemaRef ref\n 2: optional list conditions\n}\n\nstruct SearchRequest {\n 1: optional SchemaRef ref\n 2: optional string token\n 3: optional i32 limit\n 4: optional Field searchBy\n 5: optional set fieldsToRead\n}\n\nstruct SearchResponse {\n 1: optional list entities\n 2: optional string nextToken\n}\n\nstruct ScanRequest {\n 1: optional SchemaRef ref\n 2: optional string token\n 3: optional i32 limit\n 4: optional set fieldsToRead\n}\n\nstruct ScanResponse {\n 1: optional list entities\n 2: optional string nextToken\n}\n\nstruct CanUpsertSchemaRequest {\n 1: optional string scope\n 2: optional string namePrefix\n 3: optional list entityDefs\n}\n\nstruct CanUpsertSchemaResponse {\n // latest upserted version\n 1: optional i32 version\n}\n\nstruct CheckSchemaRequest {\n 1: optional string scope\n 2: optional string namePrefix\n 3: optional list entityDefs\n}\n\nstruct CheckSchemaResponse {\n 1: optional i32 version\n}\n\nstruct UpsertSchemaRequest {\n 1: optional string scope\n 2: optional string namePrefix\n 3: optional list entityDefs\n 4: optional bool dryRun\n}\n\nstruct UpsertSchemaResponse {\n 1: optional i32 version\n 2: optional string status\n}\n\nstruct CheckSchemaStatusRequest {\n 1: optional string scope\n 2: optional string namePrefix\n 3: optional i32 version\n}\n\nstruct CheckSchemaStatusResponse {\n 1: optional i32 version\n 2: optional string status\n}\n\nstruct CreateScopeRequest {\n 1: optional string name\n}\n\nstruct ScopeExistsRequest {\n 1: optional string name\n}\n\nstruct ScopeExistsResponse {\n 1: optional bool exists\n}\n\nstruct TruncateScopeRequest {\n 1: optional string name\n}\nstruct DropScopeRequest {\n 1: optional string name\n}\n\nexception BadRequestError {\n 1: required string err\n 2: optional string message\n 3: optional i32 errorCode\n}\n\nexception InternalServerError {\n 1: required string err\n 2: optional string message\n 3: optional i32 errorCode\n}\n\nexception BadSchemaError {\n // EntityName -> Error msg\n 1: required map reasons\n}\n\nservice Dosa {\n void createIfNotExists(\n 1: CreateRequest request\n ) throws (\n 1: BadRequestError clientError\n 2: InternalServerError serverError\n )\n\n ReadResponse read (\n 1: ReadRequest request\n ) throws (\n 1: BadRequestError clientError\n 2: InternalServerError serverError\n )\n\n MultiReadResponse multiRead (\n 1: MultiReadRequest request\n ) throws (\n 1: BadRequestError clientError\n 2: InternalServerError serverError\n )\n\n void upsert (\n 1: UpsertRequest request\n ) throws (\n 1: BadRequestError clientError\n 2: InternalServerError serverError\n )\n\n MultiUpsertResponse multiUpsert (\n 1: MultiUpsertRequest request\n ) throws (\n 1: BadRequestError clientError\n 2: InternalServerError serverError\n )\n \n void remove (\n 1: RemoveRequest request\n ) throws (\n 1: BadRequestError clientError\n 2: InternalServerError serverError\n )\n\n MultiRemoveResponse multiRemove (\n 1: MultiRemoveRequest request\n ) throws (\n 1: BadRequestError clientError\n 2: InternalServerError serverError\n )\n\n RangeResponse range (\n 1: RangeRequest request\n ) throws (\n 1: BadRequestError clientError\n 2: InternalServerError serverError\n )\n\n void removeRange (\n 1: RemoveRangeRequest request\n ) throws (\n 1: BadRequestError clientError\n 2: InternalServerError serverError\n )\n\n SearchResponse search (\n 1: SearchRequest request\n ) throws (\n 1: BadRequestError clientError\n 2: InternalServerError serverError\n )\n\n ScanResponse scan (\n 1: ScanRequest request\n ) throws (\n 1: BadRequestError clientError\n 2: InternalServerError serverError\n )\n\n CanUpsertSchemaResponse canUpsertSchema(\n 1: CanUpsertSchemaRequest request\n ) throws (\n 1: BadRequestError clientError\n 2: InternalServerError serverError\n 3: BadSchemaError schemaError\n )\n\n CheckSchemaResponse checkSchema(\n 1: CheckSchemaRequest request\n ) throws (\n 1: BadRequestError clientError\n 2: InternalServerError serverError\n 3: BadSchemaError schemaError\n )\n\n UpsertSchemaResponse upsertSchema(\n 1: UpsertSchemaRequest request\n ) throws (\n 1: BadRequestError clientError\n 2: InternalServerError serverError\n 3: BadSchemaError schemaError\n )\n\n CheckSchemaStatusResponse checkSchemaStatus(\n 1: CheckSchemaStatusRequest request\n ) throws (\n 1: BadRequestError clientError\n 2: InternalServerError serverError\n )\n\n void createScope(\n 1: CreateScopeRequest request\n ) throws (\n 1: BadRequestError clientError\n 2: InternalServerError serverError\n )\n\n ScopeExistsResponse scopeExists(\n 1: ScopeExistsRequest request\n ) throws (\n 1: BadRequestError clientError\n 2: InternalServerError serverError\n )\n\n void truncateScope(\n 1: TruncateScopeRequest request\n ) throws (\n 1: BadRequestError clientError\n 2: InternalServerError serverError\n )\n\n void dropScope(\n 1: DropScopeRequest request\n ) throws (\n 1: BadRequestError clientError\n 2: InternalServerError serverError\n )\n}\n\n" +const rawIDL = "// Copyright (c) 2017 Uber Technologies, Inc.\n\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nnamespace java com.uber.dosa\n\ntypedef map FieldValueMap\n\nenum ElemType {\n BOOL,\n BLOB,\n STRING,\n INT32,\n INT64,\n DOUBLE,\n TIMESTAMP,\n UUID,\n\n // Reserve a few enum types in case we want to support few more\n RESERVED0,\n RESERVED1,\n RESERVED2,\n RESERVED3,\n}\n\nunion RawValue {\n 1: optional binary binaryValue // BLOB, UUID\n 2: optional bool boolValue // BOOL\n 3: optional double doubleValue // DOUBLE\n 4: optional i32 int32Value // INT32\n 5: optional i64 (js.type = \"Long\") int64Value // INT64, TIMESTAMP\n 6: optional string stringValue // STRING\n}\n\n// make it union in case we want to support collections like set\nunion Value {\n 1: optional RawValue elemValue\n}\n\nstruct SchemaRef {\n 1: optional string scope\n 2: optional string namePrefix\n 3: optional string entityName\n 4: optional i32 version\n}\n\nstruct FieldTag {\n 1: optional string name\n 2: optional string value\n}\n\nstruct FieldDesc {\n 1: optional ElemType type\n 2: optional set tags\n}\n\nstruct ClusteringKey {\n 1: optional string name\n 2: optional bool asc\n}\n\nstruct PrimaryKey {\n 1: optional list partitionKeys\n 2: optional list clusteringKeys\n}\n\nstruct IndexDefinition {\n 1: optional PrimaryKey key\n}\n\nenum ETLState {\n OFF = 1,\n ON,\n \n // Reserve a few enum types in case we want to support more\n RESERVED0,\n RESERVED1\n}\n\nstruct EntityDefinition {\n 1: optional string name\n 2: optional map fieldDescs\n 3: optional PrimaryKey primaryKey\n 4: optional map Indexes\n 5: optional ETLState etl\n}\n\nstruct Error {\n 1: optional i32 errCode\n 2: optional string msg\n 3: optional bool shouldRetry\n}\n\nstruct CreateRequest {\n 1: optional SchemaRef ref\n 2: optional FieldValueMap entityValues\n 3: optional i64 ttl\n}\n\nstruct ReadRequest {\n 1: optional SchemaRef ref\n 2: optional FieldValueMap keyValues\n 3: optional set fieldsToRead\n}\n\nstruct ReadResponse {\n 1: optional FieldValueMap entityValues\n}\n\nstruct MultiReadRequest {\n 1: optional SchemaRef ref\n 2: optional list keyValues\n 3: optional set fieldsToRead\n}\n\nunion EntityOrError{\n 1: optional FieldValueMap entityValues\n 2: optional Error error\n}\n\nstruct MultiReadResponse {\n 1: optional list results\n}\n\nstruct MultiUpsertResponse {\n 1: optional list errors\n}\n\nstruct UpsertRequest {\n 1: optional SchemaRef ref\n 2: optional FieldValueMap entityValues\n 3: optional i64 ttl\n}\n\nstruct MultiUpsertRequest {\n 1: optional SchemaRef ref\n 2: optional list entities\n 3: optional i64 ttl\n}\n\nstruct RemoveRequest {\n 1: optional SchemaRef ref\n 2: optional FieldValueMap keyValues\n}\n\nstruct MultiRemoveRequest {\n 1: optional SchemaRef ref \n 2: optional list keyValues\n}\n\nstruct MultiRemoveResponse {\n 1: optional list errors\n}\n\nenum Operator {\n EQ,\n LT,\n GT,\n LT_OR_EQ,\n GT_OR_EQ,\n}\n\nstruct Field {\n 1: optional string name\n 2: optional Value value\n}\n\nstruct Condition {\n 1: optional Operator op\n 2: optional Field field\n}\n\nstruct RangeRequest {\n 1: optional SchemaRef ref\n 2: optional string token\n 3: optional i32 limit\n 4: optional list conditions\n 5: optional set fieldsToRead\n}\n\nstruct RangeResponse {\n 1: optional list entities\n 2: optional string nextToken\n}\n\nstruct RemoveRangeRequest {\n 1: optional SchemaRef ref\n 2: optional list conditions\n}\n\nstruct SearchRequest {\n 1: optional SchemaRef ref\n 2: optional string token\n 3: optional i32 limit\n 4: optional Field searchBy\n 5: optional set fieldsToRead\n}\n\nstruct SearchResponse {\n 1: optional list entities\n 2: optional string nextToken\n}\n\nstruct ScanRequest {\n 1: optional SchemaRef ref\n 2: optional string token\n 3: optional i32 limit\n 4: optional set fieldsToRead\n}\n\nstruct ScanResponse {\n 1: optional list entities\n 2: optional string nextToken\n}\n\nstruct CanUpsertSchemaRequest {\n 1: optional string scope\n 2: optional string namePrefix\n 3: optional list entityDefs\n}\n\nstruct CanUpsertSchemaResponse {\n // latest upserted version\n 1: optional i32 version\n}\n\nstruct CheckSchemaRequest {\n 1: optional string scope\n 2: optional string namePrefix\n 3: optional list entityDefs\n}\n\nstruct CheckSchemaResponse {\n 1: optional i32 version\n}\n\nstruct UpsertSchemaRequest {\n 1: optional string scope\n 2: optional string namePrefix\n 3: optional list entityDefs\n 4: optional bool dryRun\n}\n\nstruct UpsertSchemaResponse {\n 1: optional i32 version\n 2: optional string status\n}\n\nstruct CheckSchemaStatusRequest {\n 1: optional string scope\n 2: optional string namePrefix\n 3: optional i32 version\n}\n\nstruct CheckSchemaStatusResponse {\n 1: optional i32 version\n 2: optional string status\n}\n\nstruct CreateScopeRequest {\n 1: optional string name\n}\n\nstruct ScopeExistsRequest {\n 1: optional string name\n}\n\nstruct ScopeExistsResponse {\n 1: optional bool exists\n}\n\nstruct TruncateScopeRequest {\n 1: optional string name\n}\nstruct DropScopeRequest {\n 1: optional string name\n}\n\nexception BadRequestError {\n 1: required string err\n 2: optional string message\n 3: optional i32 errorCode\n}\n\nexception InternalServerError {\n 1: required string err\n 2: optional string message\n 3: optional i32 errorCode\n}\n\nexception BadSchemaError {\n // EntityName -> Error msg\n 1: required map reasons\n}\n\nservice Dosa {\n void createIfNotExists(\n 1: CreateRequest request\n ) throws (\n 1: BadRequestError clientError\n 2: InternalServerError serverError\n )\n\n ReadResponse read (\n 1: ReadRequest request\n ) throws (\n 1: BadRequestError clientError\n 2: InternalServerError serverError\n )\n\n MultiReadResponse multiRead (\n 1: MultiReadRequest request\n ) throws (\n 1: BadRequestError clientError\n 2: InternalServerError serverError\n )\n\n void upsert (\n 1: UpsertRequest request\n ) throws (\n 1: BadRequestError clientError\n 2: InternalServerError serverError\n )\n\n MultiUpsertResponse multiUpsert (\n 1: MultiUpsertRequest request\n ) throws (\n 1: BadRequestError clientError\n 2: InternalServerError serverError\n )\n \n void remove (\n 1: RemoveRequest request\n ) throws (\n 1: BadRequestError clientError\n 2: InternalServerError serverError\n )\n\n MultiRemoveResponse multiRemove (\n 1: MultiRemoveRequest request\n ) throws (\n 1: BadRequestError clientError\n 2: InternalServerError serverError\n )\n\n RangeResponse range (\n 1: RangeRequest request\n ) throws (\n 1: BadRequestError clientError\n 2: InternalServerError serverError\n )\n\n void removeRange (\n 1: RemoveRangeRequest request\n ) throws (\n 1: BadRequestError clientError\n 2: InternalServerError serverError\n )\n\n SearchResponse search (\n 1: SearchRequest request\n ) throws (\n 1: BadRequestError clientError\n 2: InternalServerError serverError\n )\n\n ScanResponse scan (\n 1: ScanRequest request\n ) throws (\n 1: BadRequestError clientError\n 2: InternalServerError serverError\n )\n\n CanUpsertSchemaResponse canUpsertSchema(\n 1: CanUpsertSchemaRequest request\n ) throws (\n 1: BadRequestError clientError\n 2: InternalServerError serverError\n 3: BadSchemaError schemaError\n )\n\n CheckSchemaResponse checkSchema(\n 1: CheckSchemaRequest request\n ) throws (\n 1: BadRequestError clientError\n 2: InternalServerError serverError\n 3: BadSchemaError schemaError\n )\n\n UpsertSchemaResponse upsertSchema(\n 1: UpsertSchemaRequest request\n ) throws (\n 1: BadRequestError clientError\n 2: InternalServerError serverError\n 3: BadSchemaError schemaError\n )\n\n CheckSchemaStatusResponse checkSchemaStatus(\n 1: CheckSchemaStatusRequest request\n ) throws (\n 1: BadRequestError clientError\n 2: InternalServerError serverError\n )\n\n void createScope(\n 1: CreateScopeRequest request\n ) throws (\n 1: BadRequestError clientError\n 2: InternalServerError serverError\n )\n\n ScopeExistsResponse scopeExists(\n 1: ScopeExistsRequest request\n ) throws (\n 1: BadRequestError clientError\n 2: InternalServerError serverError\n )\n\n void truncateScope(\n 1: TruncateScopeRequest request\n ) throws (\n 1: BadRequestError clientError\n 2: InternalServerError serverError\n )\n\n void dropScope(\n 1: DropScopeRequest request\n ) throws (\n 1: BadRequestError clientError\n 2: InternalServerError serverError\n )\n}\n\n" diff --git a/.gen/dosa/types.go b/.gen/dosa/types.go index 70b914f..46fc67d 100644 --- a/.gen/dosa/types.go +++ b/.gen/dosa/types.go @@ -1,4 +1,4 @@ -// Code generated by thriftrw v1.10.0. DO NOT EDIT. +// Code generated by thriftrw v1.12.0. DO NOT EDIT. // @generated package dosa @@ -4953,6 +4953,7 @@ func (v *MultiRemoveResponse) Equals(rhs *MultiRemoveResponse) bool { type MultiUpsertRequest struct { Ref *SchemaRef `json:"ref,omitempty"` Entities []FieldValueMap `json:"entities,omitempty"` + TTL *int64 `json:"ttl,omitempty"` } // ToWire translates a MultiUpsertRequest struct into a Thrift-level intermediate @@ -4972,7 +4973,7 @@ type MultiUpsertRequest struct { // } func (v *MultiUpsertRequest) ToWire() (wire.Value, error) { var ( - fields [2]wire.Field + fields [3]wire.Field i int = 0 w wire.Value err error @@ -4994,6 +4995,14 @@ func (v *MultiUpsertRequest) ToWire() (wire.Value, error) { fields[i] = wire.Field{ID: 2, Value: w} i++ } + if v.TTL != nil { + w, err = wire.NewValueI64(*(v.TTL)), error(nil) + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 3, Value: w} + i++ + } return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil } @@ -5035,6 +5044,16 @@ func (v *MultiUpsertRequest) FromWire(w wire.Value) error { return err } + } + case 3: + if field.Value.Type() == wire.TI64 { + var x int64 + x, err = field.Value.GetI64(), error(nil) + v.TTL = &x + if err != nil { + return err + } + } } } @@ -5049,7 +5068,7 @@ func (v *MultiUpsertRequest) String() string { return "" } - var fields [2]string + var fields [3]string i := 0 if v.Ref != nil { fields[i] = fmt.Sprintf("Ref: %v", v.Ref) @@ -5059,6 +5078,10 @@ func (v *MultiUpsertRequest) String() string { fields[i] = fmt.Sprintf("Entities: %v", v.Entities) i++ } + if v.TTL != nil { + fields[i] = fmt.Sprintf("TTL: %v", *(v.TTL)) + i++ + } return fmt.Sprintf("MultiUpsertRequest{%v}", strings.Join(fields[:i], ", ")) } @@ -5074,10 +5097,23 @@ func (v *MultiUpsertRequest) Equals(rhs *MultiUpsertRequest) bool { if !((v.Entities == nil && rhs.Entities == nil) || (v.Entities != nil && rhs.Entities != nil && _List_FieldValueMap_Equals(v.Entities, rhs.Entities))) { return false } + if !_I64_EqualsPtr(v.TTL, rhs.TTL) { + return false + } return true } +// GetTTL returns the value of TTL if it is set or its +// zero value if it is unset. +func (v *MultiUpsertRequest) GetTTL() (o int64) { + if v.TTL != nil { + return *v.TTL + } + + return +} + type MultiUpsertResponse struct { Errors []*Error `json:"errors,omitempty"` } diff --git a/Makefile b/Makefile index ac3187c..0d33b44 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ .PHONY: all thriftrw -THRIFTRW_VERSION := v1.10 +THRIFTRW_VERSION := v1.12.0 THRIFT_SRC := idl/dosa/dosa.thrift OUT := .gen export PATH := $(GOPATH)/bin:$(PATH) diff --git a/idl/dosa/dosa.thrift b/idl/dosa/dosa.thrift index 74ef20e..e85e058 100644 --- a/idl/dosa/dosa.thrift +++ b/idl/dosa/dosa.thrift @@ -151,6 +151,7 @@ struct UpsertRequest { struct MultiUpsertRequest { 1: optional SchemaRef ref 2: optional list entities + 3: optional i64 ttl } struct RemoveRequest {