diff --git a/cmd/helm-storage-backend/main.go b/cmd/helm-storage-backend/main.go index b6ca773f0..24faa675d 100644 --- a/cmd/helm-storage-backend/main.go +++ b/cmd/helm-storage-backend/main.go @@ -74,7 +74,7 @@ func main() { parallelServers := new(errgroup.Group) // create handler - var handler storage_backend.StorageBackendServer + var handler storage_backend.ContextStorageBackendServer switch cfg.Mode { case HelmReleaseMode: handler, err = helm_storage_backend.NewReleaseHandler(logger, relFetcher) @@ -94,7 +94,7 @@ func main() { exitOnError(err, "while listening") srv := grpc.NewServer() - storage_backend.RegisterStorageBackendServer(srv, handler) + storage_backend.RegisterContextStorageBackendServer(srv, handler) go func() { <-ctx.Done() diff --git a/cmd/secret-storage-backend/main.go b/cmd/secret-storage-backend/main.go index c9ca47e8c..0a00bfc64 100644 --- a/cmd/secret-storage-backend/main.go +++ b/cmd/secret-storage-backend/main.go @@ -64,7 +64,7 @@ func main() { exitOnError(err, "while listening") srv := grpc.NewServer() - storage_backend.RegisterStorageBackendServer(srv, handler) + storage_backend.RegisterValueAndContextStorageBackendServer(srv, handler) go func() { <-ctx.Done() diff --git a/docs/proposal/20211207-delegated-storage.md b/docs/proposal/20211207-delegated-storage.md index 274a6a885..7facc7619 100644 --- a/docs/proposal/20211207-delegated-storage.md +++ b/docs/proposal/20211207-delegated-storage.md @@ -168,7 +168,7 @@ Also, the additional, nice-to-have goals are: "$id": "#/properties/acceptValue", "type": "boolean", "const": false # in this case - no - }, + } }, "additionalProperties": false } @@ -296,6 +296,21 @@ Also, the additional, nice-to-have goals are: However, the `context` are backend-specific properties, which means Content Developer need to explicitly specify the backend as described later. + Some further workflow steps might need actual values. To allow that, a dedicated workflow step can be used: + + ```yaml + - - name: resolve-dynamic-ti + template: resolve-dynamic-ti + arguments: + - name: input-artifact + from: "{{steps.resolve-dynamic-ti.outputs.artifacts.postgresql}}" + - name: backend + # Backend is already injected into workflow based on the `alias` from `spec.requires` property: + from: "{{workflow.outputs.artifacts.helm-template-storage}}" + ``` + + That container fills the `value` property based on a given storage backend. However, the storage backend would need to support fetching value based purely on context, without TypeInstance ID, that is the `PreCreateValue` method. For more information, see the [Storage backend service implementation](#storage-backend-service-implementation). + 1. To save a specific value with additional parameters: For example, for an implementation of Kubernetes secrets storage backend, which actually creates and updates these secrets during TypeInstance creation: @@ -415,13 +430,8 @@ Also, the additional, nice-to-have goals are: 1. Hub calls the registered storage backend service `onCreate` hook: ```proto - message TypeInstanceData { - string id = 1; - bytes value = 2; - } - message OnCreateRequest { - TypeInstanceData typeinstance = 1; + string type_instance_id = 1; bytes context = 2; } @@ -429,7 +439,7 @@ Also, the additional, nice-to-have goals are: optional bytes context = 1; } - service SearchService { + service ContextStorageBackend { rpc OnCreate(OnCreateRequest) returns (OnCreateResponse); } ``` @@ -480,10 +490,23 @@ Capact Local Hub calls proper storage backend service while accessing the TypeIn option go_package = "./storage_backend"; package storage_backend; + message GetPreCreateValueRequest { + bytes context = 1; + } + + message GetPreCreateValueResponse { + optional bytes value = 1; + } + message OnCreateRequest { - string typeinstance_id = 1; + string type_instance_id = 1; + bytes context = 2; + } + + message OnCreateValueAndContextRequest { + string type_instance_id = 1; bytes value = 2; - bytes context = 3; + optional bytes context = 3; } message OnCreateResponse { @@ -495,26 +518,41 @@ Capact Local Hub calls proper storage backend service while accessing the TypeIn bytes value = 2; } - message OnUpdateRequest { - string typeinstance_id = 1; + message OnUpdateValueAndContextRequest { + string type_instance_id = 1; uint32 new_resource_version = 2; bytes new_value = 3; optional bytes context = 4; + optional string owner_id = 5; + } + + message OnUpdateRequest { + string type_instance_id = 1; + uint32 new_resource_version = 2; + bytes context = 3; + optional string owner_id = 4; } message OnUpdateResponse { optional bytes context = 1; } + message OnDeleteValueAndContextRequest { + string type_instance_id = 1; + optional bytes context = 2; + optional string owner_id = 3; + } + message OnDeleteRequest { - string typeinstance_id = 1; + string type_instance_id = 1; bytes context = 2; + optional string owner_id = 3; } message OnDeleteResponse {} message GetValueRequest { - string typeinstance_id = 1; + string type_instance_id = 1; uint32 resource_version = 2; bytes context = 3; } @@ -527,7 +565,7 @@ Capact Local Hub calls proper storage backend service while accessing the TypeIn // lock messages message GetLockedByRequest { - string typeinstance_id = 1; + string type_instance_id = 1; bytes context = 2; } @@ -536,7 +574,7 @@ Capact Local Hub calls proper storage backend service while accessing the TypeIn } message OnLockRequest { - string typeinstance_id = 1; + string type_instance_id = 1; bytes context = 2; string locked_by = 3; } @@ -544,7 +582,7 @@ Capact Local Hub calls proper storage backend service while accessing the TypeIn message OnLockResponse {} message OnUnlockRequest { - string typeinstance_id = 1; + string type_instance_id = 1; bytes context = 2; } @@ -552,26 +590,43 @@ Capact Local Hub calls proper storage backend service while accessing the TypeIn // services - service StorageBackend { + // ValueAndContextStorageBackend handles the full lifecycle of the TypeInstance. + // TypeInstance value is always provided as a part of request. Context may be provided but it is not required. + service ValueAndContextStorageBackend { // value rpc GetValue(GetValueRequest) returns (GetValueResponse); + rpc OnCreate(OnCreateValueAndContextRequest) returns (OnCreateResponse); + rpc OnUpdate(OnUpdateValueAndContextRequest) returns (OnUpdateResponse); + rpc OnDelete(OnDeleteValueAndContextRequest) returns (OnDeleteResponse); + + // lock + rpc GetLockedBy(GetLockedByRequest) returns (GetLockedByResponse); + rpc OnLock(OnLockRequest) returns (OnLockResponse); + rpc OnUnlock(OnUnlockRequest) returns (OnUnlockResponse); + } + + // ContextStorageBackend handles TypeInstance lifecycle based on the context, which is required. TypeInstance value is never passed in input arguments. + service ContextStorageBackend { + //value + rpc GetPreCreateValue(GetPreCreateValueRequest) returns (GetPreCreateValueResponse); + rpc GetValue(GetValueRequest) returns (GetValueResponse); rpc OnCreate(OnCreateRequest) returns (OnCreateResponse); rpc OnUpdate(OnUpdateRequest) returns (OnUpdateResponse); rpc OnDelete(OnDeleteRequest) returns (OnDeleteResponse); // lock rpc GetLockedBy(GetLockedByRequest) returns (GetLockedByResponse); - rpc OnLock(OnLockRequest) returns (OnLockRequest); - rpc OnUnlock(OnUnlockRequest) returns (OnUnlockRequest); + rpc OnLock(OnLockRequest) returns (OnLockResponse); + rpc OnUnlock(OnUnlockRequest) returns (OnUnlockResponse); } ``` - An implementation of such service may vary between two use cases: + The service may implement a different API, depending on a given use case: - 1. CRUD operations on output TypeInstance actually manages external resource (e.g. Vault) -> onCreate, onUpdate, and onDelete actually creates, updates and deletes a given resource. - 1. output TypeInstance represents external resources managed in different way (e.g. via Capact actions - like Helm Runner). IMO we shouldn't move actual Helm release installation to TypeInstance "constructor"). + 1. `ValueAndContextStorageBackend`: CRUD operations on output TypeInstance actually manages external resource (e.g. Vault) -> onCreate, onUpdate, and onDelete actually creates, updates and deletes a given resource. + 3. `ContextStorageBackend`: Output TypeInstance represents external resources managed in different way (e.g. via Capact actions - like Helm Runner). IMO we shouldn't move actual Helm release installation to TypeInstance "constructor"). - The service can also implement watch for external resources (e.g. Kubernetes secrets) and call `createTypeInstances` and `deleteTypeInstances` Hub mutations. We may provide Go framework to speed up such development, similarly as we have with Runner concept. @@ -933,11 +988,11 @@ To avoid implementing a special storage backend service every time we have such } } }, - "acceptValue": { # specifies if a given storage backend (app) accepts TypeInstance value while creating/updating TypeInstance, or just context. + "acceptValue": { # specifies if a given storage backend (app) accepts TypeInstance value while creating/updating TypeInstance, or just context "$id": "#/properties/acceptValue", "type": "boolean", "const": false # in this case - no - }, + } }, "additionalProperties": false } @@ -1228,6 +1283,7 @@ Once approved, we need to address the following list of items: - Extend `capact-outputTypeInstances` syntax - Set proper `uses` relations between storage backend TypeInstance and other TypeInstances - Modify TypeInstance create/update/delete images (named as "Argo actions") to take new input + - ignore TypeInstance value if a given Storage Backend is dynamic 1. Update Policy - Add new properties - Handle common TypeInstance injections @@ -1238,3 +1294,6 @@ Once approved, we need to address the following list of items: 1. Runners - Remove `output.goTemplate` - Stop supporting usage of funcs from `_helpers.tpl` in case of Helm runner +1. Support unpacking value by Jinja2 and Artifact Merger +1. Add generic container to enrich TypeInstance (run `GetPreCreateValue`) at the end of a given workflow + - Manually added by Content Developer diff --git a/hub-js/proto/storage_backend.proto b/hub-js/proto/storage_backend.proto index 2069e972a..3acfd208f 100644 --- a/hub-js/proto/storage_backend.proto +++ b/hub-js/proto/storage_backend.proto @@ -2,7 +2,20 @@ syntax = "proto3"; option go_package = "./storage_backend"; package storage_backend; +message GetPreCreateValueRequest { + bytes context = 1; +} + +message GetPreCreateValueResponse { + optional bytes value = 1; +} + message OnCreateRequest { + string type_instance_id = 1; + bytes context = 2; +} + +message OnCreateValueAndContextRequest { string type_instance_id = 1; bytes value = 2; optional bytes context = 3; @@ -17,7 +30,7 @@ message TypeInstanceResourceVersion { bytes value = 2; } -message OnUpdateRequest { +message OnUpdateValueAndContextRequest { string type_instance_id = 1; uint32 new_resource_version = 2; bytes new_value = 3; @@ -25,16 +38,29 @@ message OnUpdateRequest { optional string owner_id = 5; } +message OnUpdateRequest { + string type_instance_id = 1; + uint32 new_resource_version = 2; + bytes context = 3; + optional string owner_id = 4; +} + message OnUpdateResponse { optional bytes context = 1; } -message OnDeleteRequest { +message OnDeleteValueAndContextRequest { string type_instance_id = 1; optional bytes context = 2; optional string owner_id = 3; } +message OnDeleteRequest { + string type_instance_id = 1; + bytes context = 2; + optional string owner_id = 3; +} + message OnDeleteResponse {} message GetValueRequest { @@ -76,9 +102,26 @@ message OnUnlockResponse {} // services -service StorageBackend { +// ValueAndContextStorageBackend handles the full lifecycle of the TypeInstance. +// TypeInstance value is always provided as a part of request. Context may be provided but it is not required. +service ValueAndContextStorageBackend { // value rpc GetValue(GetValueRequest) returns (GetValueResponse); + rpc OnCreate(OnCreateValueAndContextRequest) returns (OnCreateResponse); + rpc OnUpdate(OnUpdateValueAndContextRequest) returns (OnUpdateResponse); + rpc OnDelete(OnDeleteValueAndContextRequest) returns (OnDeleteResponse); + + // lock + rpc GetLockedBy(GetLockedByRequest) returns (GetLockedByResponse); + rpc OnLock(OnLockRequest) returns (OnLockResponse); + rpc OnUnlock(OnUnlockRequest) returns (OnUnlockResponse); +} + +// ContextStorageBackend handles TypeInstance lifecycle based on the context, which is required. TypeInstance value is never passed in input arguments. +service ContextStorageBackend { + //value + rpc GetPreCreateValue(GetPreCreateValueRequest) returns (GetPreCreateValueResponse); + rpc GetValue(GetValueRequest) returns (GetValueResponse); rpc OnCreate(OnCreateRequest) returns (OnCreateResponse); rpc OnUpdate(OnUpdateRequest) returns (OnUpdateResponse); rpc OnDelete(OnDeleteRequest) returns (OnDeleteResponse); diff --git a/hub-js/src/generated/grpc/storage_backend.ts b/hub-js/src/generated/grpc/storage_backend.ts index 64305d8d8..e7cf191e4 100644 --- a/hub-js/src/generated/grpc/storage_backend.ts +++ b/hub-js/src/generated/grpc/storage_backend.ts @@ -4,7 +4,20 @@ import _m0 from "protobufjs/minimal"; export const protobufPackage = "storage_backend"; +export interface GetPreCreateValueRequest { + context: Uint8Array; +} + +export interface GetPreCreateValueResponse { + value?: Uint8Array | undefined; +} + export interface OnCreateRequest { + typeInstanceId: string; + context: Uint8Array; +} + +export interface OnCreateValueAndContextRequest { typeInstanceId: string; value: Uint8Array; context?: Uint8Array | undefined; @@ -19,7 +32,7 @@ export interface TypeInstanceResourceVersion { value: Uint8Array; } -export interface OnUpdateRequest { +export interface OnUpdateValueAndContextRequest { typeInstanceId: string; newResourceVersion: number; newValue: Uint8Array; @@ -27,16 +40,29 @@ export interface OnUpdateRequest { ownerId?: string | undefined; } +export interface OnUpdateRequest { + typeInstanceId: string; + newResourceVersion: number; + context: Uint8Array; + ownerId?: string | undefined; +} + export interface OnUpdateResponse { context?: Uint8Array | undefined; } -export interface OnDeleteRequest { +export interface OnDeleteValueAndContextRequest { typeInstanceId: string; context?: Uint8Array | undefined; ownerId?: string | undefined; } +export interface OnDeleteRequest { + typeInstanceId: string; + context: Uint8Array; + ownerId?: string | undefined; +} + export interface OnDeleteResponse {} export interface GetValueRequest { @@ -73,14 +99,206 @@ export interface OnUnlockRequest { export interface OnUnlockResponse {} +function createBaseGetPreCreateValueRequest(): GetPreCreateValueRequest { + return { context: new Uint8Array() }; +} + +export const GetPreCreateValueRequest = { + encode( + message: GetPreCreateValueRequest, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { + if (message.context.length !== 0) { + writer.uint32(10).bytes(message.context); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): GetPreCreateValueRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetPreCreateValueRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.context = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): GetPreCreateValueRequest { + return { + context: isSet(object.context) + ? bytesFromBase64(object.context) + : new Uint8Array(), + }; + }, + + toJSON(message: GetPreCreateValueRequest): unknown { + const obj: any = {}; + message.context !== undefined && + (obj.context = base64FromBytes( + message.context !== undefined ? message.context : new Uint8Array() + )); + return obj; + }, + + fromPartial( + object: DeepPartial + ): GetPreCreateValueRequest { + const message = createBaseGetPreCreateValueRequest(); + message.context = object.context ?? new Uint8Array(); + return message; + }, +}; + +function createBaseGetPreCreateValueResponse(): GetPreCreateValueResponse { + return { value: undefined }; +} + +export const GetPreCreateValueResponse = { + encode( + message: GetPreCreateValueResponse, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { + if (message.value !== undefined) { + writer.uint32(10).bytes(message.value); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): GetPreCreateValueResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetPreCreateValueResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): GetPreCreateValueResponse { + return { + value: isSet(object.value) ? bytesFromBase64(object.value) : undefined, + }; + }, + + toJSON(message: GetPreCreateValueResponse): unknown { + const obj: any = {}; + message.value !== undefined && + (obj.value = + message.value !== undefined + ? base64FromBytes(message.value) + : undefined); + return obj; + }, + + fromPartial( + object: DeepPartial + ): GetPreCreateValueResponse { + const message = createBaseGetPreCreateValueResponse(); + message.value = object.value ?? undefined; + return message; + }, +}; + function createBaseOnCreateRequest(): OnCreateRequest { - return { typeInstanceId: "", value: new Uint8Array(), context: undefined }; + return { typeInstanceId: "", context: new Uint8Array() }; } export const OnCreateRequest = { encode( message: OnCreateRequest, writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { + if (message.typeInstanceId !== "") { + writer.uint32(10).string(message.typeInstanceId); + } + if (message.context.length !== 0) { + writer.uint32(18).bytes(message.context); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): OnCreateRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseOnCreateRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.typeInstanceId = reader.string(); + break; + case 2: + message.context = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): OnCreateRequest { + return { + typeInstanceId: isSet(object.typeInstanceId) + ? String(object.typeInstanceId) + : "", + context: isSet(object.context) + ? bytesFromBase64(object.context) + : new Uint8Array(), + }; + }, + + toJSON(message: OnCreateRequest): unknown { + const obj: any = {}; + message.typeInstanceId !== undefined && + (obj.typeInstanceId = message.typeInstanceId); + message.context !== undefined && + (obj.context = base64FromBytes( + message.context !== undefined ? message.context : new Uint8Array() + )); + return obj; + }, + + fromPartial(object: DeepPartial): OnCreateRequest { + const message = createBaseOnCreateRequest(); + message.typeInstanceId = object.typeInstanceId ?? ""; + message.context = object.context ?? new Uint8Array(); + return message; + }, +}; + +function createBaseOnCreateValueAndContextRequest(): OnCreateValueAndContextRequest { + return { typeInstanceId: "", value: new Uint8Array(), context: undefined }; +} + +export const OnCreateValueAndContextRequest = { + encode( + message: OnCreateValueAndContextRequest, + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.typeInstanceId !== "") { writer.uint32(10).string(message.typeInstanceId); @@ -94,10 +312,13 @@ export const OnCreateRequest = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): OnCreateRequest { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): OnCreateValueAndContextRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseOnCreateRequest(); + const message = createBaseOnCreateValueAndContextRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -118,7 +339,7 @@ export const OnCreateRequest = { return message; }, - fromJSON(object: any): OnCreateRequest { + fromJSON(object: any): OnCreateValueAndContextRequest { return { typeInstanceId: isSet(object.typeInstanceId) ? String(object.typeInstanceId) @@ -132,7 +353,7 @@ export const OnCreateRequest = { }; }, - toJSON(message: OnCreateRequest): unknown { + toJSON(message: OnCreateValueAndContextRequest): unknown { const obj: any = {}; message.typeInstanceId !== undefined && (obj.typeInstanceId = message.typeInstanceId); @@ -148,8 +369,10 @@ export const OnCreateRequest = { return obj; }, - fromPartial(object: DeepPartial): OnCreateRequest { - const message = createBaseOnCreateRequest(); + fromPartial( + object: DeepPartial + ): OnCreateValueAndContextRequest { + const message = createBaseOnCreateValueAndContextRequest(); message.typeInstanceId = object.typeInstanceId ?? ""; message.value = object.value ?? new Uint8Array(); message.context = object.context ?? undefined; @@ -289,7 +512,7 @@ export const TypeInstanceResourceVersion = { }, }; -function createBaseOnUpdateRequest(): OnUpdateRequest { +function createBaseOnUpdateValueAndContextRequest(): OnUpdateValueAndContextRequest { return { typeInstanceId: "", newResourceVersion: 0, @@ -299,9 +522,9 @@ function createBaseOnUpdateRequest(): OnUpdateRequest { }; } -export const OnUpdateRequest = { +export const OnUpdateValueAndContextRequest = { encode( - message: OnUpdateRequest, + message: OnUpdateValueAndContextRequest, writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.typeInstanceId !== "") { @@ -322,10 +545,13 @@ export const OnUpdateRequest = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): OnUpdateRequest { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): OnUpdateValueAndContextRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseOnUpdateRequest(); + const message = createBaseOnUpdateValueAndContextRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -352,7 +578,7 @@ export const OnUpdateRequest = { return message; }, - fromJSON(object: any): OnUpdateRequest { + fromJSON(object: any): OnUpdateValueAndContextRequest { return { typeInstanceId: isSet(object.typeInstanceId) ? String(object.typeInstanceId) @@ -370,7 +596,7 @@ export const OnUpdateRequest = { }; }, - toJSON(message: OnUpdateRequest): unknown { + toJSON(message: OnUpdateValueAndContextRequest): unknown { const obj: any = {}; message.typeInstanceId !== undefined && (obj.typeInstanceId = message.typeInstanceId); @@ -389,8 +615,10 @@ export const OnUpdateRequest = { return obj; }, - fromPartial(object: DeepPartial): OnUpdateRequest { - const message = createBaseOnUpdateRequest(); + fromPartial( + object: DeepPartial + ): OnUpdateValueAndContextRequest { + const message = createBaseOnUpdateValueAndContextRequest(); message.typeInstanceId = object.typeInstanceId ?? ""; message.newResourceVersion = object.newResourceVersion ?? 0; message.newValue = object.newValue ?? new Uint8Array(); @@ -400,6 +628,101 @@ export const OnUpdateRequest = { }, }; +function createBaseOnUpdateRequest(): OnUpdateRequest { + return { + typeInstanceId: "", + newResourceVersion: 0, + context: new Uint8Array(), + ownerId: undefined, + }; +} + +export const OnUpdateRequest = { + encode( + message: OnUpdateRequest, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { + if (message.typeInstanceId !== "") { + writer.uint32(10).string(message.typeInstanceId); + } + if (message.newResourceVersion !== 0) { + writer.uint32(16).uint32(message.newResourceVersion); + } + if (message.context.length !== 0) { + writer.uint32(26).bytes(message.context); + } + if (message.ownerId !== undefined) { + writer.uint32(34).string(message.ownerId); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): OnUpdateRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseOnUpdateRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.typeInstanceId = reader.string(); + break; + case 2: + message.newResourceVersion = reader.uint32(); + break; + case 3: + message.context = reader.bytes(); + break; + case 4: + message.ownerId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): OnUpdateRequest { + return { + typeInstanceId: isSet(object.typeInstanceId) + ? String(object.typeInstanceId) + : "", + newResourceVersion: isSet(object.newResourceVersion) + ? Number(object.newResourceVersion) + : 0, + context: isSet(object.context) + ? bytesFromBase64(object.context) + : new Uint8Array(), + ownerId: isSet(object.ownerId) ? String(object.ownerId) : undefined, + }; + }, + + toJSON(message: OnUpdateRequest): unknown { + const obj: any = {}; + message.typeInstanceId !== undefined && + (obj.typeInstanceId = message.typeInstanceId); + message.newResourceVersion !== undefined && + (obj.newResourceVersion = Math.round(message.newResourceVersion)); + message.context !== undefined && + (obj.context = base64FromBytes( + message.context !== undefined ? message.context : new Uint8Array() + )); + message.ownerId !== undefined && (obj.ownerId = message.ownerId); + return obj; + }, + + fromPartial(object: DeepPartial): OnUpdateRequest { + const message = createBaseOnUpdateRequest(); + message.typeInstanceId = object.typeInstanceId ?? ""; + message.newResourceVersion = object.newResourceVersion ?? 0; + message.context = object.context ?? new Uint8Array(); + message.ownerId = object.ownerId ?? undefined; + return message; + }, +}; + function createBaseOnUpdateResponse(): OnUpdateResponse { return { context: undefined }; } @@ -458,13 +781,13 @@ export const OnUpdateResponse = { }, }; -function createBaseOnDeleteRequest(): OnDeleteRequest { +function createBaseOnDeleteValueAndContextRequest(): OnDeleteValueAndContextRequest { return { typeInstanceId: "", context: undefined, ownerId: undefined }; } -export const OnDeleteRequest = { +export const OnDeleteValueAndContextRequest = { encode( - message: OnDeleteRequest, + message: OnDeleteValueAndContextRequest, writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.typeInstanceId !== "") { @@ -479,10 +802,13 @@ export const OnDeleteRequest = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): OnDeleteRequest { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): OnDeleteValueAndContextRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseOnDeleteRequest(); + const message = createBaseOnDeleteValueAndContextRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -503,7 +829,7 @@ export const OnDeleteRequest = { return message; }, - fromJSON(object: any): OnDeleteRequest { + fromJSON(object: any): OnDeleteValueAndContextRequest { return { typeInstanceId: isSet(object.typeInstanceId) ? String(object.typeInstanceId) @@ -515,7 +841,7 @@ export const OnDeleteRequest = { }; }, - toJSON(message: OnDeleteRequest): unknown { + toJSON(message: OnDeleteValueAndContextRequest): unknown { const obj: any = {}; message.typeInstanceId !== undefined && (obj.typeInstanceId = message.typeInstanceId); @@ -528,10 +854,90 @@ export const OnDeleteRequest = { return obj; }, + fromPartial( + object: DeepPartial + ): OnDeleteValueAndContextRequest { + const message = createBaseOnDeleteValueAndContextRequest(); + message.typeInstanceId = object.typeInstanceId ?? ""; + message.context = object.context ?? undefined; + message.ownerId = object.ownerId ?? undefined; + return message; + }, +}; + +function createBaseOnDeleteRequest(): OnDeleteRequest { + return { typeInstanceId: "", context: new Uint8Array(), ownerId: undefined }; +} + +export const OnDeleteRequest = { + encode( + message: OnDeleteRequest, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { + if (message.typeInstanceId !== "") { + writer.uint32(10).string(message.typeInstanceId); + } + if (message.context.length !== 0) { + writer.uint32(18).bytes(message.context); + } + if (message.ownerId !== undefined) { + writer.uint32(26).string(message.ownerId); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): OnDeleteRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseOnDeleteRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.typeInstanceId = reader.string(); + break; + case 2: + message.context = reader.bytes(); + break; + case 3: + message.ownerId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): OnDeleteRequest { + return { + typeInstanceId: isSet(object.typeInstanceId) + ? String(object.typeInstanceId) + : "", + context: isSet(object.context) + ? bytesFromBase64(object.context) + : new Uint8Array(), + ownerId: isSet(object.ownerId) ? String(object.ownerId) : undefined, + }; + }, + + toJSON(message: OnDeleteRequest): unknown { + const obj: any = {}; + message.typeInstanceId !== undefined && + (obj.typeInstanceId = message.typeInstanceId); + message.context !== undefined && + (obj.context = base64FromBytes( + message.context !== undefined ? message.context : new Uint8Array() + )); + message.ownerId !== undefined && (obj.ownerId = message.ownerId); + return obj; + }, + fromPartial(object: DeepPartial): OnDeleteRequest { const message = createBaseOnDeleteRequest(); message.typeInstanceId = object.typeInstanceId ?? ""; - message.context = object.context ?? undefined; + message.context = object.context ?? new Uint8Array(); message.ownerId = object.ownerId ?? undefined; return message; }, @@ -1068,9 +1474,13 @@ export const OnUnlockResponse = { }, }; -export const StorageBackendDefinition = { - name: "StorageBackend", - fullName: "storage_backend.StorageBackend", +/** + * ValueAndContextStorageBackend handles the full lifecycle of the TypeInstance. + * TypeInstance value is always provided as a part of request. Context may be provided but it is not required. + */ +export const ValueAndContextStorageBackendDefinition = { + name: "ValueAndContextStorageBackend", + fullName: "storage_backend.ValueAndContextStorageBackend", methods: { /** value */ getValue: { @@ -1081,6 +1491,80 @@ export const StorageBackendDefinition = { responseStream: false, options: {}, }, + onCreate: { + name: "OnCreate", + requestType: OnCreateValueAndContextRequest, + requestStream: false, + responseType: OnCreateResponse, + responseStream: false, + options: {}, + }, + onUpdate: { + name: "OnUpdate", + requestType: OnUpdateValueAndContextRequest, + requestStream: false, + responseType: OnUpdateResponse, + responseStream: false, + options: {}, + }, + onDelete: { + name: "OnDelete", + requestType: OnDeleteValueAndContextRequest, + requestStream: false, + responseType: OnDeleteResponse, + responseStream: false, + options: {}, + }, + /** lock */ + getLockedBy: { + name: "GetLockedBy", + requestType: GetLockedByRequest, + requestStream: false, + responseType: GetLockedByResponse, + responseStream: false, + options: {}, + }, + onLock: { + name: "OnLock", + requestType: OnLockRequest, + requestStream: false, + responseType: OnLockResponse, + responseStream: false, + options: {}, + }, + onUnlock: { + name: "OnUnlock", + requestType: OnUnlockRequest, + requestStream: false, + responseType: OnUnlockResponse, + responseStream: false, + options: {}, + }, + }, +} as const; + +/** ContextStorageBackend handles TypeInstance lifecycle based on the context, which is required. TypeInstance value is never passed in input arguments. */ +export const ContextStorageBackendDefinition = { + name: "ContextStorageBackend", + fullName: "storage_backend.ContextStorageBackend", + methods: { + /** value */ + getPreCreateValue: { + name: "GetPreCreateValue", + requestType: GetPreCreateValueRequest, + requestStream: false, + responseType: GetPreCreateValueResponse, + responseStream: false, + options: {}, + }, + getValue: { + name: "GetValue", + requestType: GetValueRequest, + requestStream: false, + responseType: GetValueResponse, + responseStream: false, + options: {}, + }, onCreate: { name: "OnCreate", requestType: OnCreateRequest, diff --git a/hub-js/src/local/storage/service.ts b/hub-js/src/local/storage/service.ts index 9e031a92e..fd9fec553 100644 --- a/hub-js/src/local/storage/service.ts +++ b/hub-js/src/local/storage/service.ts @@ -5,7 +5,11 @@ import { OnLockRequest, OnUnlockRequest, OnUpdateRequest, - StorageBackendDefinition, + ContextStorageBackendDefinition, + ValueAndContextStorageBackendDefinition, + OnUpdateValueAndContextRequest, + OnCreateValueAndContextRequest, + OnDeleteValueAndContextRequest, } from "../../generated/grpc/storage_backend"; import { Client, createChannel, createClient } from "nice-grpc"; import { Driver } from "neo4j-driver"; @@ -20,7 +24,10 @@ import { import { JSONSchemaType } from "ajv/lib/types/json-schema"; import { TextEncoder } from "util"; -type StorageClient = Client; +type StorageClient = Client< + | typeof ContextStorageBackendDefinition + | typeof ValueAndContextStorageBackendDefinition +>; interface BackendContainer { client: StorageClient; @@ -133,7 +140,7 @@ export default class DelegatedStorageService { ); } - const req: OnCreateRequest = { + const req: OnCreateRequest | OnCreateValueAndContextRequest = { typeInstanceId: input.typeInstance.id, value: DelegatedStorageService.encode(input.typeInstance.value), context: DelegatedStorageService.encode(input.backend.context), @@ -176,7 +183,7 @@ export default class DelegatedStorageService { ); } - const req: OnUpdateRequest = { + const req: OnUpdateRequest | OnUpdateValueAndContextRequest = { typeInstanceId: input.typeInstance.id, newResourceVersion: input.typeInstance.newResourceVersion, newValue: DelegatedStorageService.encode(input.typeInstance.newValue), @@ -256,7 +263,7 @@ export default class DelegatedStorageService { `External backend "${input.backend.id}": ${validateErr.message}` ); } - const req: OnDeleteRequest = { + const req: OnDeleteRequest | OnDeleteValueAndContextRequest = { typeInstanceId: input.typeInstance.id, context: DelegatedStorageService.encode(input.backend.context), ownerId: input.typeInstance.ownerID, @@ -390,10 +397,11 @@ export default class DelegatedStorageService { contextSchema = out.parsed as JSONSchemaType; } const channel = createChannel(spec.url); - const client: StorageClient = createClient( - StorageBackendDefinition, - channel - ); + + const clientDef = spec.acceptValue + ? ValueAndContextStorageBackendDefinition + : ContextStorageBackendDefinition; + const client: StorageClient = createClient(clientDef, channel); const storageSpec = { backendId: id, @@ -414,12 +422,6 @@ export default class DelegatedStorageService { return val as string; } - private encode(val: unknown) { - return new TextEncoder().encode( - DelegatedStorageService.convertToJSONIfObject(val) - ); - } - private validateStorageSpecValue(storageSpec: StorageTypeInstanceSpec) { const validate = this.ajv.compile(StorageTypeInstanceSpecSchema); diff --git a/internal/helm-storage-backend/release.go b/internal/helm-storage-backend/release.go index 399149bd1..86da49d99 100644 --- a/internal/helm-storage-backend/release.go +++ b/internal/helm-storage-backend/release.go @@ -12,7 +12,7 @@ import ( pb "capact.io/capact/pkg/hub/api/grpc/storage_backend" ) -var _ pb.StorageBackendServer = &ReleaseHandler{} +var _ pb.ContextStorageBackendServer = &ReleaseHandler{} const latestRevisionIndicator = 0 @@ -47,7 +47,7 @@ type ( // ReleaseHandler handles incoming requests to the Helm release storage backend gRPC server. type ReleaseHandler struct { - pb.UnimplementedStorageBackendServer + pb.UnimplementedContextStorageBackendServer log *zap.Logger fetcher *HelmReleaseFetcher diff --git a/internal/helm-storage-backend/template.go b/internal/helm-storage-backend/template.go index 6bfdbe529..17efeaca3 100644 --- a/internal/helm-storage-backend/template.go +++ b/internal/helm-storage-backend/template.go @@ -22,7 +22,7 @@ import ( // repositoryCache Helm cache for repositories const repositoryCache = "/tmp/helm" -var _ pb.StorageBackendServer = &TemplateHandler{} +var _ pb.ContextStorageBackendServer = &TemplateHandler{} type ( // TemplateContext holds context used by Helm template storage backend. @@ -36,7 +36,7 @@ type ( // TemplateHandler handles incoming requests to the Helm template storage backend gRPC server. type TemplateHandler struct { - pb.UnimplementedStorageBackendServer + pb.UnimplementedContextStorageBackendServer log *zap.Logger fetcher *HelmReleaseFetcher diff --git a/internal/secret-storage-backend/server.go b/internal/secret-storage-backend/server.go index 322ad09c8..ac68e81fc 100644 --- a/internal/secret-storage-backend/server.go +++ b/internal/secret-storage-backend/server.go @@ -46,11 +46,11 @@ func (p Providers) GetDefault() (tellercore.Provider, error) { return nil, invalidCountErr } -var _ pb.StorageBackendServer = &Handler{} +var _ pb.ValueAndContextStorageBackendServer = &Handler{} // Handler handles incoming requests to the Secret storage backend gRPC server. type Handler struct { - pb.UnimplementedStorageBackendServer + pb.UnimplementedValueAndContextStorageBackendServer log *zap.Logger @@ -137,7 +137,7 @@ func (h *Handler) GetLockedBy(_ context.Context, request *pb.GetLockedByRequest) } // OnCreate handles TypeInstance creation by creating secret in a given provider. -func (h *Handler) OnCreate(_ context.Context, request *pb.OnCreateRequest) (*pb.OnCreateResponse, error) { +func (h *Handler) OnCreate(_ context.Context, request *pb.OnCreateValueAndContextRequest) (*pb.OnCreateResponse, error) { if request == nil { return nil, NilRequestInputError } @@ -161,7 +161,7 @@ func (h *Handler) OnCreate(_ context.Context, request *pb.OnCreateRequest) (*pb. } // OnUpdate handles TypeInstance update by updating secret in a given provider. -func (h *Handler) OnUpdate(_ context.Context, request *pb.OnUpdateRequest) (*pb.OnUpdateResponse, error) { +func (h *Handler) OnUpdate(_ context.Context, request *pb.OnUpdateValueAndContextRequest) (*pb.OnUpdateResponse, error) { if request == nil { return nil, NilRequestInputError } @@ -242,7 +242,7 @@ func (h *Handler) OnUnlock(_ context.Context, request *pb.OnUnlockRequest) (*pb. // OnDelete handles TypeInstance deletion by removing a secret in a given provider. // It checks whether a given TypeInstance is locked before doing such operation. -func (h *Handler) OnDelete(_ context.Context, request *pb.OnDeleteRequest) (*pb.OnDeleteResponse, error) { +func (h *Handler) OnDelete(_ context.Context, request *pb.OnDeleteValueAndContextRequest) (*pb.OnDeleteResponse, error) { if request == nil { return nil, NilRequestInputError } diff --git a/internal/secret-storage-backend/server_test.go b/internal/secret-storage-backend/server_test.go index 1deadf7ee..8ddc92651 100644 --- a/internal/secret-storage-backend/server_test.go +++ b/internal/secret-storage-backend/server_test.go @@ -72,7 +72,7 @@ func TestHandler_GetValue(t *testing.T) { require.NoError(t, err) defer conn.Close() - client := storage_backend.NewStorageBackendClient(conn) + client := storage_backend.NewValueAndContextStorageBackendClient(conn) // when res, err := client.GetValue(ctx, req) @@ -145,7 +145,7 @@ func TestHandler_GetLockedBy(t *testing.T) { require.NoError(t, err) defer conn.Close() - client := storage_backend.NewStorageBackendClient(conn) + client := storage_backend.NewValueAndContextStorageBackendClient(conn) // when res, err := client.GetLockedBy(ctx, req) @@ -170,7 +170,7 @@ func TestHandler_OnCreate(t *testing.T) { providerName := "fake" reqContext := []byte(fmt.Sprintf(`{"provider":"%s"}`, providerName)) valueBytes := []byte(`{"key": true}`) - req := &storage_backend.OnCreateRequest{ + req := &storage_backend.OnCreateValueAndContextRequest{ TypeInstanceId: "uuid", Value: valueBytes, Context: reqContext, @@ -231,7 +231,7 @@ func TestHandler_OnCreate(t *testing.T) { require.NoError(t, err) defer conn.Close() - client := storage_backend.NewStorageBackendClient(conn) + client := storage_backend.NewValueAndContextStorageBackendClient(conn) // when res, err := client.OnCreate(ctx, req) @@ -259,7 +259,7 @@ func TestHandler_OnUpdate(t *testing.T) { providerName := "fake" reqContext := []byte(fmt.Sprintf(`{"provider":"%s"}`, providerName)) valueBytes := []byte(`{"key": true}`) - req := &storage_backend.OnUpdateRequest{ + req := &storage_backend.OnUpdateValueAndContextRequest{ TypeInstanceId: "uuid", NewResourceVersion: 3, NewValue: valueBytes, @@ -328,7 +328,7 @@ func TestHandler_OnUpdate(t *testing.T) { require.NoError(t, err) defer conn.Close() - client := storage_backend.NewStorageBackendClient(conn) + client := storage_backend.NewValueAndContextStorageBackendClient(conn) // when res, err := client.OnUpdate(ctx, req) @@ -433,7 +433,7 @@ func TestHandler_OnLock(t *testing.T) { require.NoError(t, err) defer conn.Close() - client := storage_backend.NewStorageBackendClient(conn) + client := storage_backend.NewValueAndContextStorageBackendClient(conn) // when res, err := client.OnLock(ctx, req) @@ -533,7 +533,7 @@ func TestHandler_OnUnlock(t *testing.T) { require.NoError(t, err) defer conn.Close() - client := storage_backend.NewStorageBackendClient(conn) + client := storage_backend.NewValueAndContextStorageBackendClient(conn) // when res, err := client.OnUnlock(ctx, req) @@ -559,7 +559,7 @@ func TestHandler_OnDelete(t *testing.T) { // given providerName := "fake" reqContext := []byte(fmt.Sprintf(`{"provider":"%s"}`, providerName)) - req := &storage_backend.OnDeleteRequest{ + req := &storage_backend.OnDeleteValueAndContextRequest{ TypeInstanceId: "uuid", Context: reqContext, } @@ -634,7 +634,7 @@ func TestHandler_OnDelete(t *testing.T) { require.NoError(t, err) defer conn.Close() - client := storage_backend.NewStorageBackendClient(conn) + client := storage_backend.NewValueAndContextStorageBackendClient(conn) // when res, err := client.OnDelete(ctx, req) @@ -743,7 +743,7 @@ func setupServerAndListener(t *testing.T, providersMap map[string]tellercore.Pro listener := bufconn.Listen(bufSize) srv := grpc.NewServer() - storage_backend.RegisterStorageBackendServer(srv, handler) + storage_backend.RegisterValueAndContextStorageBackendServer(srv, handler) go func() { err := srv.Serve(listener) diff --git a/pkg/hub/api/grpc/storage_backend/client_test.go b/pkg/hub/api/grpc/storage_backend/client_test.go index 94eff982c..a5744eee4 100644 --- a/pkg/hub/api/grpc/storage_backend/client_test.go +++ b/pkg/hub/api/grpc/storage_backend/client_test.go @@ -76,12 +76,12 @@ func executeSecretStorageBackendTestScenario(t *testing.T, srvAddr, typeInstance require.NoError(t, err) ctx := context.Background() - client := pb.NewStorageBackendClient(conn) + client := pb.NewValueAndContextStorageBackendClient(conn) // create t.Logf("Creating TI %q...\n", typeInstanceID) - _, err = client.OnCreate(ctx, &pb.OnCreateRequest{ + _, err = client.OnCreate(ctx, &pb.OnCreateValueAndContextRequest{ TypeInstanceId: typeInstanceID, Value: value, Context: reqContext, @@ -105,7 +105,7 @@ func executeSecretStorageBackendTestScenario(t *testing.T, srvAddr, typeInstance t.Logf("Updating TI %q...\n", typeInstanceID) newValueBytes := []byte(`{"key": "updated"}`) - _, err = client.OnUpdate(ctx, &pb.OnUpdateRequest{ + _, err = client.OnUpdate(ctx, &pb.OnUpdateValueAndContextRequest{ TypeInstanceId: typeInstanceID, NewResourceVersion: 2, NewValue: newValueBytes, @@ -207,7 +207,7 @@ func executeSecretStorageBackendTestScenario(t *testing.T, srvAddr, typeInstance // delete t.Logf("Deleting TI %q...\n", typeInstanceID) - _, err = client.OnDelete(ctx, &pb.OnDeleteRequest{ + _, err = client.OnDelete(ctx, &pb.OnDeleteValueAndContextRequest{ TypeInstanceId: typeInstanceID, Context: reqContext, }) diff --git a/pkg/hub/api/grpc/storage_backend/storage_backend.pb.go b/pkg/hub/api/grpc/storage_backend/storage_backend.pb.go index 08680d296..5c3a8b199 100644 --- a/pkg/hub/api/grpc/storage_backend/storage_backend.pb.go +++ b/pkg/hub/api/grpc/storage_backend/storage_backend.pb.go @@ -20,20 +20,113 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type GetPreCreateValueRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Context []byte `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"` +} + +func (x *GetPreCreateValueRequest) Reset() { + *x = GetPreCreateValueRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_backend_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPreCreateValueRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPreCreateValueRequest) ProtoMessage() {} + +func (x *GetPreCreateValueRequest) ProtoReflect() protoreflect.Message { + mi := &file_storage_backend_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPreCreateValueRequest.ProtoReflect.Descriptor instead. +func (*GetPreCreateValueRequest) Descriptor() ([]byte, []int) { + return file_storage_backend_proto_rawDescGZIP(), []int{0} +} + +func (x *GetPreCreateValueRequest) GetContext() []byte { + if x != nil { + return x.Context + } + return nil +} + +type GetPreCreateValueResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value []byte `protobuf:"bytes,1,opt,name=value,proto3,oneof" json:"value,omitempty"` +} + +func (x *GetPreCreateValueResponse) Reset() { + *x = GetPreCreateValueResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_backend_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPreCreateValueResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPreCreateValueResponse) ProtoMessage() {} + +func (x *GetPreCreateValueResponse) ProtoReflect() protoreflect.Message { + mi := &file_storage_backend_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPreCreateValueResponse.ProtoReflect.Descriptor instead. +func (*GetPreCreateValueResponse) Descriptor() ([]byte, []int) { + return file_storage_backend_proto_rawDescGZIP(), []int{1} +} + +func (x *GetPreCreateValueResponse) GetValue() []byte { + if x != nil { + return x.Value + } + return nil +} + type OnCreateRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields TypeInstanceId string `protobuf:"bytes,1,opt,name=type_instance_id,json=typeInstanceId,proto3" json:"type_instance_id,omitempty"` - Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - Context []byte `protobuf:"bytes,3,opt,name=context,proto3,oneof" json:"context,omitempty"` + Context []byte `protobuf:"bytes,2,opt,name=context,proto3" json:"context,omitempty"` } func (x *OnCreateRequest) Reset() { *x = OnCreateRequest{} if protoimpl.UnsafeEnabled { - mi := &file_storage_backend_proto_msgTypes[0] + mi := &file_storage_backend_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -46,7 +139,7 @@ func (x *OnCreateRequest) String() string { func (*OnCreateRequest) ProtoMessage() {} func (x *OnCreateRequest) ProtoReflect() protoreflect.Message { - mi := &file_storage_backend_proto_msgTypes[0] + mi := &file_storage_backend_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -59,7 +152,7 @@ func (x *OnCreateRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use OnCreateRequest.ProtoReflect.Descriptor instead. func (*OnCreateRequest) Descriptor() ([]byte, []int) { - return file_storage_backend_proto_rawDescGZIP(), []int{0} + return file_storage_backend_proto_rawDescGZIP(), []int{2} } func (x *OnCreateRequest) GetTypeInstanceId() string { @@ -69,14 +162,70 @@ func (x *OnCreateRequest) GetTypeInstanceId() string { return "" } -func (x *OnCreateRequest) GetValue() []byte { +func (x *OnCreateRequest) GetContext() []byte { + if x != nil { + return x.Context + } + return nil +} + +type OnCreateValueAndContextRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TypeInstanceId string `protobuf:"bytes,1,opt,name=type_instance_id,json=typeInstanceId,proto3" json:"type_instance_id,omitempty"` + Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + Context []byte `protobuf:"bytes,3,opt,name=context,proto3,oneof" json:"context,omitempty"` +} + +func (x *OnCreateValueAndContextRequest) Reset() { + *x = OnCreateValueAndContextRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_backend_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OnCreateValueAndContextRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OnCreateValueAndContextRequest) ProtoMessage() {} + +func (x *OnCreateValueAndContextRequest) ProtoReflect() protoreflect.Message { + mi := &file_storage_backend_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OnCreateValueAndContextRequest.ProtoReflect.Descriptor instead. +func (*OnCreateValueAndContextRequest) Descriptor() ([]byte, []int) { + return file_storage_backend_proto_rawDescGZIP(), []int{3} +} + +func (x *OnCreateValueAndContextRequest) GetTypeInstanceId() string { + if x != nil { + return x.TypeInstanceId + } + return "" +} + +func (x *OnCreateValueAndContextRequest) GetValue() []byte { if x != nil { return x.Value } return nil } -func (x *OnCreateRequest) GetContext() []byte { +func (x *OnCreateValueAndContextRequest) GetContext() []byte { if x != nil { return x.Context } @@ -94,7 +243,7 @@ type OnCreateResponse struct { func (x *OnCreateResponse) Reset() { *x = OnCreateResponse{} if protoimpl.UnsafeEnabled { - mi := &file_storage_backend_proto_msgTypes[1] + mi := &file_storage_backend_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -107,7 +256,7 @@ func (x *OnCreateResponse) String() string { func (*OnCreateResponse) ProtoMessage() {} func (x *OnCreateResponse) ProtoReflect() protoreflect.Message { - mi := &file_storage_backend_proto_msgTypes[1] + mi := &file_storage_backend_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -120,7 +269,7 @@ func (x *OnCreateResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use OnCreateResponse.ProtoReflect.Descriptor instead. func (*OnCreateResponse) Descriptor() ([]byte, []int) { - return file_storage_backend_proto_rawDescGZIP(), []int{1} + return file_storage_backend_proto_rawDescGZIP(), []int{4} } func (x *OnCreateResponse) GetContext() []byte { @@ -142,7 +291,7 @@ type TypeInstanceResourceVersion struct { func (x *TypeInstanceResourceVersion) Reset() { *x = TypeInstanceResourceVersion{} if protoimpl.UnsafeEnabled { - mi := &file_storage_backend_proto_msgTypes[2] + mi := &file_storage_backend_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -155,7 +304,7 @@ func (x *TypeInstanceResourceVersion) String() string { func (*TypeInstanceResourceVersion) ProtoMessage() {} func (x *TypeInstanceResourceVersion) ProtoReflect() protoreflect.Message { - mi := &file_storage_backend_proto_msgTypes[2] + mi := &file_storage_backend_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -168,7 +317,7 @@ func (x *TypeInstanceResourceVersion) ProtoReflect() protoreflect.Message { // Deprecated: Use TypeInstanceResourceVersion.ProtoReflect.Descriptor instead. func (*TypeInstanceResourceVersion) Descriptor() ([]byte, []int) { - return file_storage_backend_proto_rawDescGZIP(), []int{2} + return file_storage_backend_proto_rawDescGZIP(), []int{5} } func (x *TypeInstanceResourceVersion) GetResourceVersion() uint32 { @@ -185,7 +334,7 @@ func (x *TypeInstanceResourceVersion) GetValue() []byte { return nil } -type OnUpdateRequest struct { +type OnUpdateValueAndContextRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -197,10 +346,88 @@ type OnUpdateRequest struct { OwnerId *string `protobuf:"bytes,5,opt,name=owner_id,json=ownerId,proto3,oneof" json:"owner_id,omitempty"` } +func (x *OnUpdateValueAndContextRequest) Reset() { + *x = OnUpdateValueAndContextRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_backend_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OnUpdateValueAndContextRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OnUpdateValueAndContextRequest) ProtoMessage() {} + +func (x *OnUpdateValueAndContextRequest) ProtoReflect() protoreflect.Message { + mi := &file_storage_backend_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OnUpdateValueAndContextRequest.ProtoReflect.Descriptor instead. +func (*OnUpdateValueAndContextRequest) Descriptor() ([]byte, []int) { + return file_storage_backend_proto_rawDescGZIP(), []int{6} +} + +func (x *OnUpdateValueAndContextRequest) GetTypeInstanceId() string { + if x != nil { + return x.TypeInstanceId + } + return "" +} + +func (x *OnUpdateValueAndContextRequest) GetNewResourceVersion() uint32 { + if x != nil { + return x.NewResourceVersion + } + return 0 +} + +func (x *OnUpdateValueAndContextRequest) GetNewValue() []byte { + if x != nil { + return x.NewValue + } + return nil +} + +func (x *OnUpdateValueAndContextRequest) GetContext() []byte { + if x != nil { + return x.Context + } + return nil +} + +func (x *OnUpdateValueAndContextRequest) GetOwnerId() string { + if x != nil && x.OwnerId != nil { + return *x.OwnerId + } + return "" +} + +type OnUpdateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TypeInstanceId string `protobuf:"bytes,1,opt,name=type_instance_id,json=typeInstanceId,proto3" json:"type_instance_id,omitempty"` + NewResourceVersion uint32 `protobuf:"varint,2,opt,name=new_resource_version,json=newResourceVersion,proto3" json:"new_resource_version,omitempty"` + Context []byte `protobuf:"bytes,3,opt,name=context,proto3" json:"context,omitempty"` + OwnerId *string `protobuf:"bytes,4,opt,name=owner_id,json=ownerId,proto3,oneof" json:"owner_id,omitempty"` +} + func (x *OnUpdateRequest) Reset() { *x = OnUpdateRequest{} if protoimpl.UnsafeEnabled { - mi := &file_storage_backend_proto_msgTypes[3] + mi := &file_storage_backend_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -213,7 +440,7 @@ func (x *OnUpdateRequest) String() string { func (*OnUpdateRequest) ProtoMessage() {} func (x *OnUpdateRequest) ProtoReflect() protoreflect.Message { - mi := &file_storage_backend_proto_msgTypes[3] + mi := &file_storage_backend_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -226,7 +453,7 @@ func (x *OnUpdateRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use OnUpdateRequest.ProtoReflect.Descriptor instead. func (*OnUpdateRequest) Descriptor() ([]byte, []int) { - return file_storage_backend_proto_rawDescGZIP(), []int{3} + return file_storage_backend_proto_rawDescGZIP(), []int{7} } func (x *OnUpdateRequest) GetTypeInstanceId() string { @@ -243,13 +470,6 @@ func (x *OnUpdateRequest) GetNewResourceVersion() uint32 { return 0 } -func (x *OnUpdateRequest) GetNewValue() []byte { - if x != nil { - return x.NewValue - } - return nil -} - func (x *OnUpdateRequest) GetContext() []byte { if x != nil { return x.Context @@ -275,7 +495,7 @@ type OnUpdateResponse struct { func (x *OnUpdateResponse) Reset() { *x = OnUpdateResponse{} if protoimpl.UnsafeEnabled { - mi := &file_storage_backend_proto_msgTypes[4] + mi := &file_storage_backend_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -288,7 +508,7 @@ func (x *OnUpdateResponse) String() string { func (*OnUpdateResponse) ProtoMessage() {} func (x *OnUpdateResponse) ProtoReflect() protoreflect.Message { - mi := &file_storage_backend_proto_msgTypes[4] + mi := &file_storage_backend_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -301,7 +521,7 @@ func (x *OnUpdateResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use OnUpdateResponse.ProtoReflect.Descriptor instead. func (*OnUpdateResponse) Descriptor() ([]byte, []int) { - return file_storage_backend_proto_rawDescGZIP(), []int{4} + return file_storage_backend_proto_rawDescGZIP(), []int{8} } func (x *OnUpdateResponse) GetContext() []byte { @@ -311,7 +531,7 @@ func (x *OnUpdateResponse) GetContext() []byte { return nil } -type OnDeleteRequest struct { +type OnDeleteValueAndContextRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -321,10 +541,73 @@ type OnDeleteRequest struct { OwnerId *string `protobuf:"bytes,3,opt,name=owner_id,json=ownerId,proto3,oneof" json:"owner_id,omitempty"` } +func (x *OnDeleteValueAndContextRequest) Reset() { + *x = OnDeleteValueAndContextRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_backend_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OnDeleteValueAndContextRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OnDeleteValueAndContextRequest) ProtoMessage() {} + +func (x *OnDeleteValueAndContextRequest) ProtoReflect() protoreflect.Message { + mi := &file_storage_backend_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OnDeleteValueAndContextRequest.ProtoReflect.Descriptor instead. +func (*OnDeleteValueAndContextRequest) Descriptor() ([]byte, []int) { + return file_storage_backend_proto_rawDescGZIP(), []int{9} +} + +func (x *OnDeleteValueAndContextRequest) GetTypeInstanceId() string { + if x != nil { + return x.TypeInstanceId + } + return "" +} + +func (x *OnDeleteValueAndContextRequest) GetContext() []byte { + if x != nil { + return x.Context + } + return nil +} + +func (x *OnDeleteValueAndContextRequest) GetOwnerId() string { + if x != nil && x.OwnerId != nil { + return *x.OwnerId + } + return "" +} + +type OnDeleteRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TypeInstanceId string `protobuf:"bytes,1,opt,name=type_instance_id,json=typeInstanceId,proto3" json:"type_instance_id,omitempty"` + Context []byte `protobuf:"bytes,2,opt,name=context,proto3" json:"context,omitempty"` + OwnerId *string `protobuf:"bytes,3,opt,name=owner_id,json=ownerId,proto3,oneof" json:"owner_id,omitempty"` +} + func (x *OnDeleteRequest) Reset() { *x = OnDeleteRequest{} if protoimpl.UnsafeEnabled { - mi := &file_storage_backend_proto_msgTypes[5] + mi := &file_storage_backend_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -337,7 +620,7 @@ func (x *OnDeleteRequest) String() string { func (*OnDeleteRequest) ProtoMessage() {} func (x *OnDeleteRequest) ProtoReflect() protoreflect.Message { - mi := &file_storage_backend_proto_msgTypes[5] + mi := &file_storage_backend_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -350,7 +633,7 @@ func (x *OnDeleteRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use OnDeleteRequest.ProtoReflect.Descriptor instead. func (*OnDeleteRequest) Descriptor() ([]byte, []int) { - return file_storage_backend_proto_rawDescGZIP(), []int{5} + return file_storage_backend_proto_rawDescGZIP(), []int{10} } func (x *OnDeleteRequest) GetTypeInstanceId() string { @@ -383,7 +666,7 @@ type OnDeleteResponse struct { func (x *OnDeleteResponse) Reset() { *x = OnDeleteResponse{} if protoimpl.UnsafeEnabled { - mi := &file_storage_backend_proto_msgTypes[6] + mi := &file_storage_backend_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -396,7 +679,7 @@ func (x *OnDeleteResponse) String() string { func (*OnDeleteResponse) ProtoMessage() {} func (x *OnDeleteResponse) ProtoReflect() protoreflect.Message { - mi := &file_storage_backend_proto_msgTypes[6] + mi := &file_storage_backend_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -409,7 +692,7 @@ func (x *OnDeleteResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use OnDeleteResponse.ProtoReflect.Descriptor instead. func (*OnDeleteResponse) Descriptor() ([]byte, []int) { - return file_storage_backend_proto_rawDescGZIP(), []int{6} + return file_storage_backend_proto_rawDescGZIP(), []int{11} } type GetValueRequest struct { @@ -425,7 +708,7 @@ type GetValueRequest struct { func (x *GetValueRequest) Reset() { *x = GetValueRequest{} if protoimpl.UnsafeEnabled { - mi := &file_storage_backend_proto_msgTypes[7] + mi := &file_storage_backend_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -438,7 +721,7 @@ func (x *GetValueRequest) String() string { func (*GetValueRequest) ProtoMessage() {} func (x *GetValueRequest) ProtoReflect() protoreflect.Message { - mi := &file_storage_backend_proto_msgTypes[7] + mi := &file_storage_backend_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -451,7 +734,7 @@ func (x *GetValueRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetValueRequest.ProtoReflect.Descriptor instead. func (*GetValueRequest) Descriptor() ([]byte, []int) { - return file_storage_backend_proto_rawDescGZIP(), []int{7} + return file_storage_backend_proto_rawDescGZIP(), []int{12} } func (x *GetValueRequest) GetTypeInstanceId() string { @@ -486,7 +769,7 @@ type GetValueResponse struct { func (x *GetValueResponse) Reset() { *x = GetValueResponse{} if protoimpl.UnsafeEnabled { - mi := &file_storage_backend_proto_msgTypes[8] + mi := &file_storage_backend_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -499,7 +782,7 @@ func (x *GetValueResponse) String() string { func (*GetValueResponse) ProtoMessage() {} func (x *GetValueResponse) ProtoReflect() protoreflect.Message { - mi := &file_storage_backend_proto_msgTypes[8] + mi := &file_storage_backend_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -512,7 +795,7 @@ func (x *GetValueResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetValueResponse.ProtoReflect.Descriptor instead. func (*GetValueResponse) Descriptor() ([]byte, []int) { - return file_storage_backend_proto_rawDescGZIP(), []int{8} + return file_storage_backend_proto_rawDescGZIP(), []int{13} } func (x *GetValueResponse) GetValue() []byte { @@ -534,7 +817,7 @@ type GetLockedByRequest struct { func (x *GetLockedByRequest) Reset() { *x = GetLockedByRequest{} if protoimpl.UnsafeEnabled { - mi := &file_storage_backend_proto_msgTypes[9] + mi := &file_storage_backend_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -547,7 +830,7 @@ func (x *GetLockedByRequest) String() string { func (*GetLockedByRequest) ProtoMessage() {} func (x *GetLockedByRequest) ProtoReflect() protoreflect.Message { - mi := &file_storage_backend_proto_msgTypes[9] + mi := &file_storage_backend_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -560,7 +843,7 @@ func (x *GetLockedByRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetLockedByRequest.ProtoReflect.Descriptor instead. func (*GetLockedByRequest) Descriptor() ([]byte, []int) { - return file_storage_backend_proto_rawDescGZIP(), []int{9} + return file_storage_backend_proto_rawDescGZIP(), []int{14} } func (x *GetLockedByRequest) GetTypeInstanceId() string { @@ -588,7 +871,7 @@ type GetLockedByResponse struct { func (x *GetLockedByResponse) Reset() { *x = GetLockedByResponse{} if protoimpl.UnsafeEnabled { - mi := &file_storage_backend_proto_msgTypes[10] + mi := &file_storage_backend_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -601,7 +884,7 @@ func (x *GetLockedByResponse) String() string { func (*GetLockedByResponse) ProtoMessage() {} func (x *GetLockedByResponse) ProtoReflect() protoreflect.Message { - mi := &file_storage_backend_proto_msgTypes[10] + mi := &file_storage_backend_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -614,7 +897,7 @@ func (x *GetLockedByResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetLockedByResponse.ProtoReflect.Descriptor instead. func (*GetLockedByResponse) Descriptor() ([]byte, []int) { - return file_storage_backend_proto_rawDescGZIP(), []int{10} + return file_storage_backend_proto_rawDescGZIP(), []int{15} } func (x *GetLockedByResponse) GetLockedBy() string { @@ -637,7 +920,7 @@ type OnLockRequest struct { func (x *OnLockRequest) Reset() { *x = OnLockRequest{} if protoimpl.UnsafeEnabled { - mi := &file_storage_backend_proto_msgTypes[11] + mi := &file_storage_backend_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -650,7 +933,7 @@ func (x *OnLockRequest) String() string { func (*OnLockRequest) ProtoMessage() {} func (x *OnLockRequest) ProtoReflect() protoreflect.Message { - mi := &file_storage_backend_proto_msgTypes[11] + mi := &file_storage_backend_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -663,7 +946,7 @@ func (x *OnLockRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use OnLockRequest.ProtoReflect.Descriptor instead. func (*OnLockRequest) Descriptor() ([]byte, []int) { - return file_storage_backend_proto_rawDescGZIP(), []int{11} + return file_storage_backend_proto_rawDescGZIP(), []int{16} } func (x *OnLockRequest) GetTypeInstanceId() string { @@ -696,7 +979,7 @@ type OnLockResponse struct { func (x *OnLockResponse) Reset() { *x = OnLockResponse{} if protoimpl.UnsafeEnabled { - mi := &file_storage_backend_proto_msgTypes[12] + mi := &file_storage_backend_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -709,7 +992,7 @@ func (x *OnLockResponse) String() string { func (*OnLockResponse) ProtoMessage() {} func (x *OnLockResponse) ProtoReflect() protoreflect.Message { - mi := &file_storage_backend_proto_msgTypes[12] + mi := &file_storage_backend_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -722,7 +1005,7 @@ func (x *OnLockResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use OnLockResponse.ProtoReflect.Descriptor instead. func (*OnLockResponse) Descriptor() ([]byte, []int) { - return file_storage_backend_proto_rawDescGZIP(), []int{12} + return file_storage_backend_proto_rawDescGZIP(), []int{17} } type OnUnlockRequest struct { @@ -737,7 +1020,7 @@ type OnUnlockRequest struct { func (x *OnUnlockRequest) Reset() { *x = OnUnlockRequest{} if protoimpl.UnsafeEnabled { - mi := &file_storage_backend_proto_msgTypes[13] + mi := &file_storage_backend_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -750,7 +1033,7 @@ func (x *OnUnlockRequest) String() string { func (*OnUnlockRequest) ProtoMessage() {} func (x *OnUnlockRequest) ProtoReflect() protoreflect.Message { - mi := &file_storage_backend_proto_msgTypes[13] + mi := &file_storage_backend_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -763,7 +1046,7 @@ func (x *OnUnlockRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use OnUnlockRequest.ProtoReflect.Descriptor instead. func (*OnUnlockRequest) Descriptor() ([]byte, []int) { - return file_storage_backend_proto_rawDescGZIP(), []int{13} + return file_storage_backend_proto_rawDescGZIP(), []int{18} } func (x *OnUnlockRequest) GetTypeInstanceId() string { @@ -789,7 +1072,7 @@ type OnUnlockResponse struct { func (x *OnUnlockResponse) Reset() { *x = OnUnlockResponse{} if protoimpl.UnsafeEnabled { - mi := &file_storage_backend_proto_msgTypes[14] + mi := &file_storage_backend_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -802,7 +1085,7 @@ func (x *OnUnlockResponse) String() string { func (*OnUnlockResponse) ProtoMessage() {} func (x *OnUnlockResponse) ProtoReflect() protoreflect.Message { - mi := &file_storage_backend_proto_msgTypes[14] + mi := &file_storage_backend_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -815,7 +1098,7 @@ func (x *OnUnlockResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use OnUnlockResponse.ProtoReflect.Descriptor instead. func (*OnUnlockResponse) Descriptor() ([]byte, []int) { - return file_storage_backend_proto_rawDescGZIP(), []int{14} + return file_storage_backend_proto_rawDescGZIP(), []int{19} } var File_storage_backend_proto protoreflect.FileDescriptor @@ -823,129 +1106,212 @@ var File_storage_backend_proto protoreflect.FileDescriptor var file_storage_backend_proto_rawDesc = []byte{ 0x0a, 0x15, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, - 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x22, 0x7c, 0x0a, 0x0f, 0x4f, 0x6e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x74, - 0x79, 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x79, 0x70, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, - 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x07, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x3d, 0x0a, 0x10, 0x4f, 0x6e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x07, 0x63, + 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x22, 0x34, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, + 0x72, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x40, + 0x0a, 0x19, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x22, 0x55, 0x0a, 0x0f, 0x4f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, + 0x79, 0x70, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, + 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x8b, 0x01, 0x0a, 0x1e, 0x4f, 0x6e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x41, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x79, + 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x79, 0x70, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x5e, 0x0a, 0x1b, 0x54, 0x79, 0x70, 0x65, 0x49, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xe2, 0x01, 0x0a, 0x0f, 0x4f, 0x6e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x79, 0x70, - 0x65, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x79, 0x70, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, - 0x65, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x6e, 0x65, 0x77, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x12, 0x6e, 0x65, 0x77, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x88, 0x01, - 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x88, 0x01, - 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, 0x0b, 0x0a, - 0x09, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x22, 0x3d, 0x0a, 0x10, 0x4f, 0x6e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, - 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, - 0x00, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, - 0x08, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x93, 0x01, 0x0a, 0x0f, 0x4f, 0x6e, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, - 0x10, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x79, 0x70, 0x65, 0x49, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, - 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, - 0x72, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x22, - 0x12, 0x0a, 0x10, 0x4f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x80, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x3d, 0x0a, 0x10, 0x4f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x22, 0x5e, 0x0a, 0x1b, 0x54, 0x79, 0x70, 0x65, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x22, 0xf1, 0x01, 0x0a, 0x1e, 0x4f, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x41, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x79, 0x70, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, - 0x64, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x37, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, - 0x58, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x42, 0x79, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x6e, - 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0e, 0x74, 0x79, 0x70, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, - 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x45, 0x0a, 0x13, 0x47, 0x65, 0x74, - 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x42, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x20, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x42, 0x79, 0x88, - 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x62, 0x79, - 0x22, 0x70, 0x0a, 0x0d, 0x4f, 0x6e, 0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x64, 0x12, 0x30, 0x0a, 0x14, 0x6e, 0x65, 0x77, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x12, 0x6e, 0x65, 0x77, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0c, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x88, 0x01, 0x01, 0x12, + 0x1e, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x01, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, + 0x0a, 0x0a, 0x08, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, 0x0b, 0x0a, 0x09, 0x5f, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x22, 0xb4, 0x01, 0x0a, 0x0f, 0x4f, 0x6e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x10, + 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x79, 0x70, 0x65, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x6e, 0x65, 0x77, 0x5f, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x12, 0x6e, 0x65, 0x77, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x12, 0x1e, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x88, + 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x22, + 0x3d, 0x0a, 0x10, 0x4f, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x88, + 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0xa2, + 0x01, 0x0a, 0x1e, 0x4f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x41, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x79, 0x70, - 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, - 0x62, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, - 0x42, 0x79, 0x22, 0x10, 0x0a, 0x0e, 0x4f, 0x6e, 0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x55, 0x0a, 0x0f, 0x4f, 0x6e, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, + 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x07, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x07, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x6f, 0x77, + 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, + 0x5f, 0x69, 0x64, 0x22, 0x82, 0x01, 0x0a, 0x0f, 0x4f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x79, 0x70, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x12, 0x0a, 0x10, 0x4f, - 0x6e, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, - 0xca, 0x04, 0x0a, 0x0e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x65, - 0x6e, 0x64, 0x12, 0x4f, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x20, + 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x1e, 0x0a, 0x08, 0x6f, + 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x22, 0x12, 0x0a, 0x10, 0x4f, 0x6e, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x80, 0x01, 0x0a, + 0x0f, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x28, 0x0a, 0x10, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x79, 0x70, 0x65, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, + 0x37, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x58, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4c, + 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x42, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, + 0x0a, 0x10, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x79, 0x70, 0x65, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x22, 0x45, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x42, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x09, 0x6c, 0x6f, 0x63, + 0x6b, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, + 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x42, 0x79, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, + 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x22, 0x70, 0x0a, 0x0d, 0x4f, 0x6e, 0x4c, + 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x79, + 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x79, 0x70, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x1b, + 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x42, 0x79, 0x22, 0x10, 0x0a, 0x0e, 0x4f, + 0x6e, 0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x55, 0x0a, + 0x0f, 0x4f, 0x6e, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x28, 0x0a, 0x10, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x79, 0x70, 0x65, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x22, 0x12, 0x0a, 0x10, 0x4f, 0x6e, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x86, 0x05, 0x0a, 0x1d, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x41, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x12, 0x4f, 0x0a, 0x08, 0x47, 0x65, + 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x20, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x08, 0x4f, + 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x2f, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x4f, 0x6e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x41, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x4f, 0x6e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x08, 0x4f, + 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x2f, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x4f, 0x6e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x41, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x4f, 0x6e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x08, 0x4f, + 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x2f, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x4f, 0x6e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x41, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x4f, 0x6e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x0b, 0x47, + 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x42, 0x79, 0x12, 0x23, 0x2e, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, + 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x42, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x24, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, + 0x64, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x42, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x06, 0x4f, 0x6e, 0x4c, 0x6f, 0x63, 0x6b, 0x12, + 0x1e, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, + 0x64, 0x2e, 0x4f, 0x6e, 0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1f, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, + 0x64, 0x2e, 0x4f, 0x6e, 0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x4f, 0x0a, 0x08, 0x4f, 0x6e, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x20, 0x2e, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x4f, + 0x6e, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, - 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x21, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, - 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x08, 0x4f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, - 0x20, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, - 0x64, 0x2e, 0x4f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x21, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, - 0x65, 0x6e, 0x64, 0x2e, 0x4f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x08, 0x4f, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x12, 0x20, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, - 0x6e, 0x64, 0x2e, 0x4f, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x61, 0x63, - 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x4f, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x08, 0x4f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x12, 0x20, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, - 0x65, 0x6e, 0x64, 0x2e, 0x4f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x61, - 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x4f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x63, - 0x6b, 0x65, 0x64, 0x42, 0x79, 0x12, 0x23, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, - 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x65, - 0x64, 0x42, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x73, 0x74, 0x6f, + 0x2e, 0x4f, 0x6e, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x32, 0xbd, 0x05, 0x0a, 0x15, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x12, 0x6a, 0x0a, 0x11, 0x47, + 0x65, 0x74, 0x50, 0x72, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x29, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, + 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x47, 0x65, + 0x74, 0x50, 0x72, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x12, 0x20, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x61, + 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, + 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x08, 0x4f, 0x6e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x12, 0x20, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, + 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x4f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x4f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x08, 0x4f, 0x6e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x20, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, + 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x4f, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x4f, 0x6e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x08, 0x4f, 0x6e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x20, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x4f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x4f, 0x6e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x0b, 0x47, + 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x42, 0x79, 0x12, 0x23, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, - 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x42, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x49, 0x0a, 0x06, 0x4f, 0x6e, 0x4c, 0x6f, 0x63, 0x6b, 0x12, 0x1e, 0x2e, 0x73, 0x74, 0x6f, - 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x4f, 0x6e, 0x4c, - 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x73, 0x74, 0x6f, - 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x4f, 0x6e, 0x4c, - 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x08, 0x4f, - 0x6e, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x20, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, - 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x4f, 0x6e, 0x55, 0x6e, 0x6c, 0x6f, - 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x73, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x4f, 0x6e, 0x55, 0x6e, - 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x13, 0x5a, 0x11, - 0x2e, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, - 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x42, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x24, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, + 0x64, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x42, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x06, 0x4f, 0x6e, 0x4c, 0x6f, 0x63, 0x6b, 0x12, + 0x1e, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, + 0x64, 0x2e, 0x4f, 0x6e, 0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1f, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, + 0x64, 0x2e, 0x4f, 0x6e, 0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x4f, 0x0a, 0x08, 0x4f, 0x6e, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x20, 0x2e, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x4f, + 0x6e, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, + 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, + 0x2e, 0x4f, 0x6e, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x42, 0x13, 0x5a, 0x11, 0x2e, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, + 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -960,41 +1326,62 @@ func file_storage_backend_proto_rawDescGZIP() []byte { return file_storage_backend_proto_rawDescData } -var file_storage_backend_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_storage_backend_proto_msgTypes = make([]protoimpl.MessageInfo, 20) var file_storage_backend_proto_goTypes = []interface{}{ - (*OnCreateRequest)(nil), // 0: storage_backend.OnCreateRequest - (*OnCreateResponse)(nil), // 1: storage_backend.OnCreateResponse - (*TypeInstanceResourceVersion)(nil), // 2: storage_backend.TypeInstanceResourceVersion - (*OnUpdateRequest)(nil), // 3: storage_backend.OnUpdateRequest - (*OnUpdateResponse)(nil), // 4: storage_backend.OnUpdateResponse - (*OnDeleteRequest)(nil), // 5: storage_backend.OnDeleteRequest - (*OnDeleteResponse)(nil), // 6: storage_backend.OnDeleteResponse - (*GetValueRequest)(nil), // 7: storage_backend.GetValueRequest - (*GetValueResponse)(nil), // 8: storage_backend.GetValueResponse - (*GetLockedByRequest)(nil), // 9: storage_backend.GetLockedByRequest - (*GetLockedByResponse)(nil), // 10: storage_backend.GetLockedByResponse - (*OnLockRequest)(nil), // 11: storage_backend.OnLockRequest - (*OnLockResponse)(nil), // 12: storage_backend.OnLockResponse - (*OnUnlockRequest)(nil), // 13: storage_backend.OnUnlockRequest - (*OnUnlockResponse)(nil), // 14: storage_backend.OnUnlockResponse + (*GetPreCreateValueRequest)(nil), // 0: storage_backend.GetPreCreateValueRequest + (*GetPreCreateValueResponse)(nil), // 1: storage_backend.GetPreCreateValueResponse + (*OnCreateRequest)(nil), // 2: storage_backend.OnCreateRequest + (*OnCreateValueAndContextRequest)(nil), // 3: storage_backend.OnCreateValueAndContextRequest + (*OnCreateResponse)(nil), // 4: storage_backend.OnCreateResponse + (*TypeInstanceResourceVersion)(nil), // 5: storage_backend.TypeInstanceResourceVersion + (*OnUpdateValueAndContextRequest)(nil), // 6: storage_backend.OnUpdateValueAndContextRequest + (*OnUpdateRequest)(nil), // 7: storage_backend.OnUpdateRequest + (*OnUpdateResponse)(nil), // 8: storage_backend.OnUpdateResponse + (*OnDeleteValueAndContextRequest)(nil), // 9: storage_backend.OnDeleteValueAndContextRequest + (*OnDeleteRequest)(nil), // 10: storage_backend.OnDeleteRequest + (*OnDeleteResponse)(nil), // 11: storage_backend.OnDeleteResponse + (*GetValueRequest)(nil), // 12: storage_backend.GetValueRequest + (*GetValueResponse)(nil), // 13: storage_backend.GetValueResponse + (*GetLockedByRequest)(nil), // 14: storage_backend.GetLockedByRequest + (*GetLockedByResponse)(nil), // 15: storage_backend.GetLockedByResponse + (*OnLockRequest)(nil), // 16: storage_backend.OnLockRequest + (*OnLockResponse)(nil), // 17: storage_backend.OnLockResponse + (*OnUnlockRequest)(nil), // 18: storage_backend.OnUnlockRequest + (*OnUnlockResponse)(nil), // 19: storage_backend.OnUnlockResponse } var file_storage_backend_proto_depIdxs = []int32{ - 7, // 0: storage_backend.StorageBackend.GetValue:input_type -> storage_backend.GetValueRequest - 0, // 1: storage_backend.StorageBackend.OnCreate:input_type -> storage_backend.OnCreateRequest - 3, // 2: storage_backend.StorageBackend.OnUpdate:input_type -> storage_backend.OnUpdateRequest - 5, // 3: storage_backend.StorageBackend.OnDelete:input_type -> storage_backend.OnDeleteRequest - 9, // 4: storage_backend.StorageBackend.GetLockedBy:input_type -> storage_backend.GetLockedByRequest - 11, // 5: storage_backend.StorageBackend.OnLock:input_type -> storage_backend.OnLockRequest - 13, // 6: storage_backend.StorageBackend.OnUnlock:input_type -> storage_backend.OnUnlockRequest - 8, // 7: storage_backend.StorageBackend.GetValue:output_type -> storage_backend.GetValueResponse - 1, // 8: storage_backend.StorageBackend.OnCreate:output_type -> storage_backend.OnCreateResponse - 4, // 9: storage_backend.StorageBackend.OnUpdate:output_type -> storage_backend.OnUpdateResponse - 6, // 10: storage_backend.StorageBackend.OnDelete:output_type -> storage_backend.OnDeleteResponse - 10, // 11: storage_backend.StorageBackend.GetLockedBy:output_type -> storage_backend.GetLockedByResponse - 12, // 12: storage_backend.StorageBackend.OnLock:output_type -> storage_backend.OnLockResponse - 14, // 13: storage_backend.StorageBackend.OnUnlock:output_type -> storage_backend.OnUnlockResponse - 7, // [7:14] is the sub-list for method output_type - 0, // [0:7] is the sub-list for method input_type + 12, // 0: storage_backend.ValueAndContextStorageBackend.GetValue:input_type -> storage_backend.GetValueRequest + 3, // 1: storage_backend.ValueAndContextStorageBackend.OnCreate:input_type -> storage_backend.OnCreateValueAndContextRequest + 6, // 2: storage_backend.ValueAndContextStorageBackend.OnUpdate:input_type -> storage_backend.OnUpdateValueAndContextRequest + 9, // 3: storage_backend.ValueAndContextStorageBackend.OnDelete:input_type -> storage_backend.OnDeleteValueAndContextRequest + 14, // 4: storage_backend.ValueAndContextStorageBackend.GetLockedBy:input_type -> storage_backend.GetLockedByRequest + 16, // 5: storage_backend.ValueAndContextStorageBackend.OnLock:input_type -> storage_backend.OnLockRequest + 18, // 6: storage_backend.ValueAndContextStorageBackend.OnUnlock:input_type -> storage_backend.OnUnlockRequest + 0, // 7: storage_backend.ContextStorageBackend.GetPreCreateValue:input_type -> storage_backend.GetPreCreateValueRequest + 12, // 8: storage_backend.ContextStorageBackend.GetValue:input_type -> storage_backend.GetValueRequest + 2, // 9: storage_backend.ContextStorageBackend.OnCreate:input_type -> storage_backend.OnCreateRequest + 7, // 10: storage_backend.ContextStorageBackend.OnUpdate:input_type -> storage_backend.OnUpdateRequest + 10, // 11: storage_backend.ContextStorageBackend.OnDelete:input_type -> storage_backend.OnDeleteRequest + 14, // 12: storage_backend.ContextStorageBackend.GetLockedBy:input_type -> storage_backend.GetLockedByRequest + 16, // 13: storage_backend.ContextStorageBackend.OnLock:input_type -> storage_backend.OnLockRequest + 18, // 14: storage_backend.ContextStorageBackend.OnUnlock:input_type -> storage_backend.OnUnlockRequest + 13, // 15: storage_backend.ValueAndContextStorageBackend.GetValue:output_type -> storage_backend.GetValueResponse + 4, // 16: storage_backend.ValueAndContextStorageBackend.OnCreate:output_type -> storage_backend.OnCreateResponse + 8, // 17: storage_backend.ValueAndContextStorageBackend.OnUpdate:output_type -> storage_backend.OnUpdateResponse + 11, // 18: storage_backend.ValueAndContextStorageBackend.OnDelete:output_type -> storage_backend.OnDeleteResponse + 15, // 19: storage_backend.ValueAndContextStorageBackend.GetLockedBy:output_type -> storage_backend.GetLockedByResponse + 17, // 20: storage_backend.ValueAndContextStorageBackend.OnLock:output_type -> storage_backend.OnLockResponse + 19, // 21: storage_backend.ValueAndContextStorageBackend.OnUnlock:output_type -> storage_backend.OnUnlockResponse + 1, // 22: storage_backend.ContextStorageBackend.GetPreCreateValue:output_type -> storage_backend.GetPreCreateValueResponse + 13, // 23: storage_backend.ContextStorageBackend.GetValue:output_type -> storage_backend.GetValueResponse + 4, // 24: storage_backend.ContextStorageBackend.OnCreate:output_type -> storage_backend.OnCreateResponse + 8, // 25: storage_backend.ContextStorageBackend.OnUpdate:output_type -> storage_backend.OnUpdateResponse + 11, // 26: storage_backend.ContextStorageBackend.OnDelete:output_type -> storage_backend.OnDeleteResponse + 15, // 27: storage_backend.ContextStorageBackend.GetLockedBy:output_type -> storage_backend.GetLockedByResponse + 17, // 28: storage_backend.ContextStorageBackend.OnLock:output_type -> storage_backend.OnLockResponse + 19, // 29: storage_backend.ContextStorageBackend.OnUnlock:output_type -> storage_backend.OnUnlockResponse + 15, // [15:30] is the sub-list for method output_type + 0, // [0:15] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name @@ -1007,7 +1394,7 @@ func file_storage_backend_proto_init() { } if !protoimpl.UnsafeEnabled { file_storage_backend_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OnCreateRequest); i { + switch v := v.(*GetPreCreateValueRequest); i { case 0: return &v.state case 1: @@ -1019,7 +1406,7 @@ func file_storage_backend_proto_init() { } } file_storage_backend_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OnCreateResponse); i { + switch v := v.(*GetPreCreateValueResponse); i { case 0: return &v.state case 1: @@ -1031,7 +1418,7 @@ func file_storage_backend_proto_init() { } } file_storage_backend_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TypeInstanceResourceVersion); i { + switch v := v.(*OnCreateRequest); i { case 0: return &v.state case 1: @@ -1043,7 +1430,7 @@ func file_storage_backend_proto_init() { } } file_storage_backend_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OnUpdateRequest); i { + switch v := v.(*OnCreateValueAndContextRequest); i { case 0: return &v.state case 1: @@ -1055,7 +1442,7 @@ func file_storage_backend_proto_init() { } } file_storage_backend_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OnUpdateResponse); i { + switch v := v.(*OnCreateResponse); i { case 0: return &v.state case 1: @@ -1067,7 +1454,7 @@ func file_storage_backend_proto_init() { } } file_storage_backend_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OnDeleteRequest); i { + switch v := v.(*TypeInstanceResourceVersion); i { case 0: return &v.state case 1: @@ -1079,7 +1466,7 @@ func file_storage_backend_proto_init() { } } file_storage_backend_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OnDeleteResponse); i { + switch v := v.(*OnUpdateValueAndContextRequest); i { case 0: return &v.state case 1: @@ -1091,7 +1478,7 @@ func file_storage_backend_proto_init() { } } file_storage_backend_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetValueRequest); i { + switch v := v.(*OnUpdateRequest); i { case 0: return &v.state case 1: @@ -1103,7 +1490,7 @@ func file_storage_backend_proto_init() { } } file_storage_backend_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetValueResponse); i { + switch v := v.(*OnUpdateResponse); i { case 0: return &v.state case 1: @@ -1115,7 +1502,7 @@ func file_storage_backend_proto_init() { } } file_storage_backend_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLockedByRequest); i { + switch v := v.(*OnDeleteValueAndContextRequest); i { case 0: return &v.state case 1: @@ -1127,7 +1514,7 @@ func file_storage_backend_proto_init() { } } file_storage_backend_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLockedByResponse); i { + switch v := v.(*OnDeleteRequest); i { case 0: return &v.state case 1: @@ -1139,7 +1526,7 @@ func file_storage_backend_proto_init() { } } file_storage_backend_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OnLockRequest); i { + switch v := v.(*OnDeleteResponse); i { case 0: return &v.state case 1: @@ -1151,7 +1538,7 @@ func file_storage_backend_proto_init() { } } file_storage_backend_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OnLockResponse); i { + switch v := v.(*GetValueRequest); i { case 0: return &v.state case 1: @@ -1163,7 +1550,7 @@ func file_storage_backend_proto_init() { } } file_storage_backend_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OnUnlockRequest); i { + switch v := v.(*GetValueResponse); i { case 0: return &v.state case 1: @@ -1175,6 +1562,66 @@ func file_storage_backend_proto_init() { } } file_storage_backend_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetLockedByRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_backend_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetLockedByResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_backend_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OnLockRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_backend_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OnLockResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_backend_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OnUnlockRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_backend_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*OnUnlockResponse); i { case 0: return &v.state @@ -1187,22 +1634,25 @@ func file_storage_backend_proto_init() { } } } - file_storage_backend_proto_msgTypes[0].OneofWrappers = []interface{}{} file_storage_backend_proto_msgTypes[1].OneofWrappers = []interface{}{} file_storage_backend_proto_msgTypes[3].OneofWrappers = []interface{}{} file_storage_backend_proto_msgTypes[4].OneofWrappers = []interface{}{} - file_storage_backend_proto_msgTypes[5].OneofWrappers = []interface{}{} + file_storage_backend_proto_msgTypes[6].OneofWrappers = []interface{}{} + file_storage_backend_proto_msgTypes[7].OneofWrappers = []interface{}{} file_storage_backend_proto_msgTypes[8].OneofWrappers = []interface{}{} + file_storage_backend_proto_msgTypes[9].OneofWrappers = []interface{}{} file_storage_backend_proto_msgTypes[10].OneofWrappers = []interface{}{} + file_storage_backend_proto_msgTypes[13].OneofWrappers = []interface{}{} + file_storage_backend_proto_msgTypes[15].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_storage_backend_proto_rawDesc, NumEnums: 0, - NumMessages: 15, + NumMessages: 20, NumExtensions: 0, - NumServices: 1, + NumServices: 2, }, GoTypes: file_storage_backend_proto_goTypes, DependencyIndexes: file_storage_backend_proto_depIdxs, diff --git a/pkg/hub/api/grpc/storage_backend/storage_backend_grpc.pb.go b/pkg/hub/api/grpc/storage_backend/storage_backend_grpc.pb.go index f7e997e60..a1dcd6377 100644 --- a/pkg/hub/api/grpc/storage_backend/storage_backend_grpc.pb.go +++ b/pkg/hub/api/grpc/storage_backend/storage_backend_grpc.pb.go @@ -18,12 +18,320 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 -// StorageBackendClient is the client API for StorageBackend service. +// ValueAndContextStorageBackendClient is the client API for ValueAndContextStorageBackend service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type StorageBackendClient interface { +type ValueAndContextStorageBackendClient interface { // value GetValue(ctx context.Context, in *GetValueRequest, opts ...grpc.CallOption) (*GetValueResponse, error) + OnCreate(ctx context.Context, in *OnCreateValueAndContextRequest, opts ...grpc.CallOption) (*OnCreateResponse, error) + OnUpdate(ctx context.Context, in *OnUpdateValueAndContextRequest, opts ...grpc.CallOption) (*OnUpdateResponse, error) + OnDelete(ctx context.Context, in *OnDeleteValueAndContextRequest, opts ...grpc.CallOption) (*OnDeleteResponse, error) + // lock + GetLockedBy(ctx context.Context, in *GetLockedByRequest, opts ...grpc.CallOption) (*GetLockedByResponse, error) + OnLock(ctx context.Context, in *OnLockRequest, opts ...grpc.CallOption) (*OnLockResponse, error) + OnUnlock(ctx context.Context, in *OnUnlockRequest, opts ...grpc.CallOption) (*OnUnlockResponse, error) +} + +type valueAndContextStorageBackendClient struct { + cc grpc.ClientConnInterface +} + +func NewValueAndContextStorageBackendClient(cc grpc.ClientConnInterface) ValueAndContextStorageBackendClient { + return &valueAndContextStorageBackendClient{cc} +} + +func (c *valueAndContextStorageBackendClient) GetValue(ctx context.Context, in *GetValueRequest, opts ...grpc.CallOption) (*GetValueResponse, error) { + out := new(GetValueResponse) + err := c.cc.Invoke(ctx, "/storage_backend.ValueAndContextStorageBackend/GetValue", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *valueAndContextStorageBackendClient) OnCreate(ctx context.Context, in *OnCreateValueAndContextRequest, opts ...grpc.CallOption) (*OnCreateResponse, error) { + out := new(OnCreateResponse) + err := c.cc.Invoke(ctx, "/storage_backend.ValueAndContextStorageBackend/OnCreate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *valueAndContextStorageBackendClient) OnUpdate(ctx context.Context, in *OnUpdateValueAndContextRequest, opts ...grpc.CallOption) (*OnUpdateResponse, error) { + out := new(OnUpdateResponse) + err := c.cc.Invoke(ctx, "/storage_backend.ValueAndContextStorageBackend/OnUpdate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *valueAndContextStorageBackendClient) OnDelete(ctx context.Context, in *OnDeleteValueAndContextRequest, opts ...grpc.CallOption) (*OnDeleteResponse, error) { + out := new(OnDeleteResponse) + err := c.cc.Invoke(ctx, "/storage_backend.ValueAndContextStorageBackend/OnDelete", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *valueAndContextStorageBackendClient) GetLockedBy(ctx context.Context, in *GetLockedByRequest, opts ...grpc.CallOption) (*GetLockedByResponse, error) { + out := new(GetLockedByResponse) + err := c.cc.Invoke(ctx, "/storage_backend.ValueAndContextStorageBackend/GetLockedBy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *valueAndContextStorageBackendClient) OnLock(ctx context.Context, in *OnLockRequest, opts ...grpc.CallOption) (*OnLockResponse, error) { + out := new(OnLockResponse) + err := c.cc.Invoke(ctx, "/storage_backend.ValueAndContextStorageBackend/OnLock", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *valueAndContextStorageBackendClient) OnUnlock(ctx context.Context, in *OnUnlockRequest, opts ...grpc.CallOption) (*OnUnlockResponse, error) { + out := new(OnUnlockResponse) + err := c.cc.Invoke(ctx, "/storage_backend.ValueAndContextStorageBackend/OnUnlock", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ValueAndContextStorageBackendServer is the server API for ValueAndContextStorageBackend service. +// All implementations must embed UnimplementedValueAndContextStorageBackendServer +// for forward compatibility +type ValueAndContextStorageBackendServer interface { + // value + GetValue(context.Context, *GetValueRequest) (*GetValueResponse, error) + OnCreate(context.Context, *OnCreateValueAndContextRequest) (*OnCreateResponse, error) + OnUpdate(context.Context, *OnUpdateValueAndContextRequest) (*OnUpdateResponse, error) + OnDelete(context.Context, *OnDeleteValueAndContextRequest) (*OnDeleteResponse, error) + // lock + GetLockedBy(context.Context, *GetLockedByRequest) (*GetLockedByResponse, error) + OnLock(context.Context, *OnLockRequest) (*OnLockResponse, error) + OnUnlock(context.Context, *OnUnlockRequest) (*OnUnlockResponse, error) + mustEmbedUnimplementedValueAndContextStorageBackendServer() +} + +// UnimplementedValueAndContextStorageBackendServer must be embedded to have forward compatible implementations. +type UnimplementedValueAndContextStorageBackendServer struct { +} + +func (UnimplementedValueAndContextStorageBackendServer) GetValue(context.Context, *GetValueRequest) (*GetValueResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetValue not implemented") +} +func (UnimplementedValueAndContextStorageBackendServer) OnCreate(context.Context, *OnCreateValueAndContextRequest) (*OnCreateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method OnCreate not implemented") +} +func (UnimplementedValueAndContextStorageBackendServer) OnUpdate(context.Context, *OnUpdateValueAndContextRequest) (*OnUpdateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method OnUpdate not implemented") +} +func (UnimplementedValueAndContextStorageBackendServer) OnDelete(context.Context, *OnDeleteValueAndContextRequest) (*OnDeleteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method OnDelete not implemented") +} +func (UnimplementedValueAndContextStorageBackendServer) GetLockedBy(context.Context, *GetLockedByRequest) (*GetLockedByResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetLockedBy not implemented") +} +func (UnimplementedValueAndContextStorageBackendServer) OnLock(context.Context, *OnLockRequest) (*OnLockResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method OnLock not implemented") +} +func (UnimplementedValueAndContextStorageBackendServer) OnUnlock(context.Context, *OnUnlockRequest) (*OnUnlockResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method OnUnlock not implemented") +} +func (UnimplementedValueAndContextStorageBackendServer) mustEmbedUnimplementedValueAndContextStorageBackendServer() { +} + +// UnsafeValueAndContextStorageBackendServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ValueAndContextStorageBackendServer will +// result in compilation errors. +type UnsafeValueAndContextStorageBackendServer interface { + mustEmbedUnimplementedValueAndContextStorageBackendServer() +} + +func RegisterValueAndContextStorageBackendServer(s grpc.ServiceRegistrar, srv ValueAndContextStorageBackendServer) { + s.RegisterService(&ValueAndContextStorageBackend_ServiceDesc, srv) +} + +func _ValueAndContextStorageBackend_GetValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetValueRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ValueAndContextStorageBackendServer).GetValue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/storage_backend.ValueAndContextStorageBackend/GetValue", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ValueAndContextStorageBackendServer).GetValue(ctx, req.(*GetValueRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ValueAndContextStorageBackend_OnCreate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OnCreateValueAndContextRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ValueAndContextStorageBackendServer).OnCreate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/storage_backend.ValueAndContextStorageBackend/OnCreate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ValueAndContextStorageBackendServer).OnCreate(ctx, req.(*OnCreateValueAndContextRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ValueAndContextStorageBackend_OnUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OnUpdateValueAndContextRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ValueAndContextStorageBackendServer).OnUpdate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/storage_backend.ValueAndContextStorageBackend/OnUpdate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ValueAndContextStorageBackendServer).OnUpdate(ctx, req.(*OnUpdateValueAndContextRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ValueAndContextStorageBackend_OnDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OnDeleteValueAndContextRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ValueAndContextStorageBackendServer).OnDelete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/storage_backend.ValueAndContextStorageBackend/OnDelete", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ValueAndContextStorageBackendServer).OnDelete(ctx, req.(*OnDeleteValueAndContextRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ValueAndContextStorageBackend_GetLockedBy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetLockedByRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ValueAndContextStorageBackendServer).GetLockedBy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/storage_backend.ValueAndContextStorageBackend/GetLockedBy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ValueAndContextStorageBackendServer).GetLockedBy(ctx, req.(*GetLockedByRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ValueAndContextStorageBackend_OnLock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OnLockRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ValueAndContextStorageBackendServer).OnLock(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/storage_backend.ValueAndContextStorageBackend/OnLock", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ValueAndContextStorageBackendServer).OnLock(ctx, req.(*OnLockRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ValueAndContextStorageBackend_OnUnlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OnUnlockRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ValueAndContextStorageBackendServer).OnUnlock(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/storage_backend.ValueAndContextStorageBackend/OnUnlock", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ValueAndContextStorageBackendServer).OnUnlock(ctx, req.(*OnUnlockRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ValueAndContextStorageBackend_ServiceDesc is the grpc.ServiceDesc for ValueAndContextStorageBackend service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ValueAndContextStorageBackend_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "storage_backend.ValueAndContextStorageBackend", + HandlerType: (*ValueAndContextStorageBackendServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetValue", + Handler: _ValueAndContextStorageBackend_GetValue_Handler, + }, + { + MethodName: "OnCreate", + Handler: _ValueAndContextStorageBackend_OnCreate_Handler, + }, + { + MethodName: "OnUpdate", + Handler: _ValueAndContextStorageBackend_OnUpdate_Handler, + }, + { + MethodName: "OnDelete", + Handler: _ValueAndContextStorageBackend_OnDelete_Handler, + }, + { + MethodName: "GetLockedBy", + Handler: _ValueAndContextStorageBackend_GetLockedBy_Handler, + }, + { + MethodName: "OnLock", + Handler: _ValueAndContextStorageBackend_OnLock_Handler, + }, + { + MethodName: "OnUnlock", + Handler: _ValueAndContextStorageBackend_OnUnlock_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "storage_backend.proto", +} + +// ContextStorageBackendClient is the client API for ContextStorageBackend service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ContextStorageBackendClient interface { + //value + GetPreCreateValue(ctx context.Context, in *GetPreCreateValueRequest, opts ...grpc.CallOption) (*GetPreCreateValueResponse, error) + GetValue(ctx context.Context, in *GetValueRequest, opts ...grpc.CallOption) (*GetValueResponse, error) OnCreate(ctx context.Context, in *OnCreateRequest, opts ...grpc.CallOption) (*OnCreateResponse, error) OnUpdate(ctx context.Context, in *OnUpdateRequest, opts ...grpc.CallOption) (*OnUpdateResponse, error) OnDelete(ctx context.Context, in *OnDeleteRequest, opts ...grpc.CallOption) (*OnDeleteResponse, error) @@ -33,82 +341,92 @@ type StorageBackendClient interface { OnUnlock(ctx context.Context, in *OnUnlockRequest, opts ...grpc.CallOption) (*OnUnlockResponse, error) } -type storageBackendClient struct { +type contextStorageBackendClient struct { cc grpc.ClientConnInterface } -func NewStorageBackendClient(cc grpc.ClientConnInterface) StorageBackendClient { - return &storageBackendClient{cc} +func NewContextStorageBackendClient(cc grpc.ClientConnInterface) ContextStorageBackendClient { + return &contextStorageBackendClient{cc} } -func (c *storageBackendClient) GetValue(ctx context.Context, in *GetValueRequest, opts ...grpc.CallOption) (*GetValueResponse, error) { +func (c *contextStorageBackendClient) GetPreCreateValue(ctx context.Context, in *GetPreCreateValueRequest, opts ...grpc.CallOption) (*GetPreCreateValueResponse, error) { + out := new(GetPreCreateValueResponse) + err := c.cc.Invoke(ctx, "/storage_backend.ContextStorageBackend/GetPreCreateValue", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *contextStorageBackendClient) GetValue(ctx context.Context, in *GetValueRequest, opts ...grpc.CallOption) (*GetValueResponse, error) { out := new(GetValueResponse) - err := c.cc.Invoke(ctx, "/storage_backend.StorageBackend/GetValue", in, out, opts...) + err := c.cc.Invoke(ctx, "/storage_backend.ContextStorageBackend/GetValue", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *storageBackendClient) OnCreate(ctx context.Context, in *OnCreateRequest, opts ...grpc.CallOption) (*OnCreateResponse, error) { +func (c *contextStorageBackendClient) OnCreate(ctx context.Context, in *OnCreateRequest, opts ...grpc.CallOption) (*OnCreateResponse, error) { out := new(OnCreateResponse) - err := c.cc.Invoke(ctx, "/storage_backend.StorageBackend/OnCreate", in, out, opts...) + err := c.cc.Invoke(ctx, "/storage_backend.ContextStorageBackend/OnCreate", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *storageBackendClient) OnUpdate(ctx context.Context, in *OnUpdateRequest, opts ...grpc.CallOption) (*OnUpdateResponse, error) { +func (c *contextStorageBackendClient) OnUpdate(ctx context.Context, in *OnUpdateRequest, opts ...grpc.CallOption) (*OnUpdateResponse, error) { out := new(OnUpdateResponse) - err := c.cc.Invoke(ctx, "/storage_backend.StorageBackend/OnUpdate", in, out, opts...) + err := c.cc.Invoke(ctx, "/storage_backend.ContextStorageBackend/OnUpdate", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *storageBackendClient) OnDelete(ctx context.Context, in *OnDeleteRequest, opts ...grpc.CallOption) (*OnDeleteResponse, error) { +func (c *contextStorageBackendClient) OnDelete(ctx context.Context, in *OnDeleteRequest, opts ...grpc.CallOption) (*OnDeleteResponse, error) { out := new(OnDeleteResponse) - err := c.cc.Invoke(ctx, "/storage_backend.StorageBackend/OnDelete", in, out, opts...) + err := c.cc.Invoke(ctx, "/storage_backend.ContextStorageBackend/OnDelete", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *storageBackendClient) GetLockedBy(ctx context.Context, in *GetLockedByRequest, opts ...grpc.CallOption) (*GetLockedByResponse, error) { +func (c *contextStorageBackendClient) GetLockedBy(ctx context.Context, in *GetLockedByRequest, opts ...grpc.CallOption) (*GetLockedByResponse, error) { out := new(GetLockedByResponse) - err := c.cc.Invoke(ctx, "/storage_backend.StorageBackend/GetLockedBy", in, out, opts...) + err := c.cc.Invoke(ctx, "/storage_backend.ContextStorageBackend/GetLockedBy", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *storageBackendClient) OnLock(ctx context.Context, in *OnLockRequest, opts ...grpc.CallOption) (*OnLockResponse, error) { +func (c *contextStorageBackendClient) OnLock(ctx context.Context, in *OnLockRequest, opts ...grpc.CallOption) (*OnLockResponse, error) { out := new(OnLockResponse) - err := c.cc.Invoke(ctx, "/storage_backend.StorageBackend/OnLock", in, out, opts...) + err := c.cc.Invoke(ctx, "/storage_backend.ContextStorageBackend/OnLock", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *storageBackendClient) OnUnlock(ctx context.Context, in *OnUnlockRequest, opts ...grpc.CallOption) (*OnUnlockResponse, error) { +func (c *contextStorageBackendClient) OnUnlock(ctx context.Context, in *OnUnlockRequest, opts ...grpc.CallOption) (*OnUnlockResponse, error) { out := new(OnUnlockResponse) - err := c.cc.Invoke(ctx, "/storage_backend.StorageBackend/OnUnlock", in, out, opts...) + err := c.cc.Invoke(ctx, "/storage_backend.ContextStorageBackend/OnUnlock", in, out, opts...) if err != nil { return nil, err } return out, nil } -// StorageBackendServer is the server API for StorageBackend service. -// All implementations must embed UnimplementedStorageBackendServer +// ContextStorageBackendServer is the server API for ContextStorageBackend service. +// All implementations must embed UnimplementedContextStorageBackendServer // for forward compatibility -type StorageBackendServer interface { - // value +type ContextStorageBackendServer interface { + //value + GetPreCreateValue(context.Context, *GetPreCreateValueRequest) (*GetPreCreateValueResponse, error) GetValue(context.Context, *GetValueRequest) (*GetValueResponse, error) OnCreate(context.Context, *OnCreateRequest) (*OnCreateResponse, error) OnUpdate(context.Context, *OnUpdateRequest) (*OnUpdateResponse, error) @@ -117,207 +435,232 @@ type StorageBackendServer interface { GetLockedBy(context.Context, *GetLockedByRequest) (*GetLockedByResponse, error) OnLock(context.Context, *OnLockRequest) (*OnLockResponse, error) OnUnlock(context.Context, *OnUnlockRequest) (*OnUnlockResponse, error) - mustEmbedUnimplementedStorageBackendServer() + mustEmbedUnimplementedContextStorageBackendServer() } -// UnimplementedStorageBackendServer must be embedded to have forward compatible implementations. -type UnimplementedStorageBackendServer struct { +// UnimplementedContextStorageBackendServer must be embedded to have forward compatible implementations. +type UnimplementedContextStorageBackendServer struct { } -func (UnimplementedStorageBackendServer) GetValue(context.Context, *GetValueRequest) (*GetValueResponse, error) { +func (UnimplementedContextStorageBackendServer) GetPreCreateValue(context.Context, *GetPreCreateValueRequest) (*GetPreCreateValueResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPreCreateValue not implemented") +} +func (UnimplementedContextStorageBackendServer) GetValue(context.Context, *GetValueRequest) (*GetValueResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetValue not implemented") } -func (UnimplementedStorageBackendServer) OnCreate(context.Context, *OnCreateRequest) (*OnCreateResponse, error) { +func (UnimplementedContextStorageBackendServer) OnCreate(context.Context, *OnCreateRequest) (*OnCreateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method OnCreate not implemented") } -func (UnimplementedStorageBackendServer) OnUpdate(context.Context, *OnUpdateRequest) (*OnUpdateResponse, error) { +func (UnimplementedContextStorageBackendServer) OnUpdate(context.Context, *OnUpdateRequest) (*OnUpdateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method OnUpdate not implemented") } -func (UnimplementedStorageBackendServer) OnDelete(context.Context, *OnDeleteRequest) (*OnDeleteResponse, error) { +func (UnimplementedContextStorageBackendServer) OnDelete(context.Context, *OnDeleteRequest) (*OnDeleteResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method OnDelete not implemented") } -func (UnimplementedStorageBackendServer) GetLockedBy(context.Context, *GetLockedByRequest) (*GetLockedByResponse, error) { +func (UnimplementedContextStorageBackendServer) GetLockedBy(context.Context, *GetLockedByRequest) (*GetLockedByResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetLockedBy not implemented") } -func (UnimplementedStorageBackendServer) OnLock(context.Context, *OnLockRequest) (*OnLockResponse, error) { +func (UnimplementedContextStorageBackendServer) OnLock(context.Context, *OnLockRequest) (*OnLockResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method OnLock not implemented") } -func (UnimplementedStorageBackendServer) OnUnlock(context.Context, *OnUnlockRequest) (*OnUnlockResponse, error) { +func (UnimplementedContextStorageBackendServer) OnUnlock(context.Context, *OnUnlockRequest) (*OnUnlockResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method OnUnlock not implemented") } -func (UnimplementedStorageBackendServer) mustEmbedUnimplementedStorageBackendServer() {} +func (UnimplementedContextStorageBackendServer) mustEmbedUnimplementedContextStorageBackendServer() {} -// UnsafeStorageBackendServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to StorageBackendServer will +// UnsafeContextStorageBackendServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ContextStorageBackendServer will // result in compilation errors. -type UnsafeStorageBackendServer interface { - mustEmbedUnimplementedStorageBackendServer() +type UnsafeContextStorageBackendServer interface { + mustEmbedUnimplementedContextStorageBackendServer() } -func RegisterStorageBackendServer(s grpc.ServiceRegistrar, srv StorageBackendServer) { - s.RegisterService(&StorageBackend_ServiceDesc, srv) +func RegisterContextStorageBackendServer(s grpc.ServiceRegistrar, srv ContextStorageBackendServer) { + s.RegisterService(&ContextStorageBackend_ServiceDesc, srv) } -func _StorageBackend_GetValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _ContextStorageBackend_GetPreCreateValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPreCreateValueRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ContextStorageBackendServer).GetPreCreateValue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/storage_backend.ContextStorageBackend/GetPreCreateValue", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ContextStorageBackendServer).GetPreCreateValue(ctx, req.(*GetPreCreateValueRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ContextStorageBackend_GetValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetValueRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(StorageBackendServer).GetValue(ctx, in) + return srv.(ContextStorageBackendServer).GetValue(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/storage_backend.StorageBackend/GetValue", + FullMethod: "/storage_backend.ContextStorageBackend/GetValue", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StorageBackendServer).GetValue(ctx, req.(*GetValueRequest)) + return srv.(ContextStorageBackendServer).GetValue(ctx, req.(*GetValueRequest)) } return interceptor(ctx, in, info, handler) } -func _StorageBackend_OnCreate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _ContextStorageBackend_OnCreate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(OnCreateRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(StorageBackendServer).OnCreate(ctx, in) + return srv.(ContextStorageBackendServer).OnCreate(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/storage_backend.StorageBackend/OnCreate", + FullMethod: "/storage_backend.ContextStorageBackend/OnCreate", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StorageBackendServer).OnCreate(ctx, req.(*OnCreateRequest)) + return srv.(ContextStorageBackendServer).OnCreate(ctx, req.(*OnCreateRequest)) } return interceptor(ctx, in, info, handler) } -func _StorageBackend_OnUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _ContextStorageBackend_OnUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(OnUpdateRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(StorageBackendServer).OnUpdate(ctx, in) + return srv.(ContextStorageBackendServer).OnUpdate(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/storage_backend.StorageBackend/OnUpdate", + FullMethod: "/storage_backend.ContextStorageBackend/OnUpdate", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StorageBackendServer).OnUpdate(ctx, req.(*OnUpdateRequest)) + return srv.(ContextStorageBackendServer).OnUpdate(ctx, req.(*OnUpdateRequest)) } return interceptor(ctx, in, info, handler) } -func _StorageBackend_OnDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _ContextStorageBackend_OnDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(OnDeleteRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(StorageBackendServer).OnDelete(ctx, in) + return srv.(ContextStorageBackendServer).OnDelete(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/storage_backend.StorageBackend/OnDelete", + FullMethod: "/storage_backend.ContextStorageBackend/OnDelete", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StorageBackendServer).OnDelete(ctx, req.(*OnDeleteRequest)) + return srv.(ContextStorageBackendServer).OnDelete(ctx, req.(*OnDeleteRequest)) } return interceptor(ctx, in, info, handler) } -func _StorageBackend_GetLockedBy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _ContextStorageBackend_GetLockedBy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetLockedByRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(StorageBackendServer).GetLockedBy(ctx, in) + return srv.(ContextStorageBackendServer).GetLockedBy(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/storage_backend.StorageBackend/GetLockedBy", + FullMethod: "/storage_backend.ContextStorageBackend/GetLockedBy", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StorageBackendServer).GetLockedBy(ctx, req.(*GetLockedByRequest)) + return srv.(ContextStorageBackendServer).GetLockedBy(ctx, req.(*GetLockedByRequest)) } return interceptor(ctx, in, info, handler) } -func _StorageBackend_OnLock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _ContextStorageBackend_OnLock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(OnLockRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(StorageBackendServer).OnLock(ctx, in) + return srv.(ContextStorageBackendServer).OnLock(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/storage_backend.StorageBackend/OnLock", + FullMethod: "/storage_backend.ContextStorageBackend/OnLock", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StorageBackendServer).OnLock(ctx, req.(*OnLockRequest)) + return srv.(ContextStorageBackendServer).OnLock(ctx, req.(*OnLockRequest)) } return interceptor(ctx, in, info, handler) } -func _StorageBackend_OnUnlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _ContextStorageBackend_OnUnlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(OnUnlockRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(StorageBackendServer).OnUnlock(ctx, in) + return srv.(ContextStorageBackendServer).OnUnlock(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/storage_backend.StorageBackend/OnUnlock", + FullMethod: "/storage_backend.ContextStorageBackend/OnUnlock", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StorageBackendServer).OnUnlock(ctx, req.(*OnUnlockRequest)) + return srv.(ContextStorageBackendServer).OnUnlock(ctx, req.(*OnUnlockRequest)) } return interceptor(ctx, in, info, handler) } -// StorageBackend_ServiceDesc is the grpc.ServiceDesc for StorageBackend service. +// ContextStorageBackend_ServiceDesc is the grpc.ServiceDesc for ContextStorageBackend service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) -var StorageBackend_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "storage_backend.StorageBackend", - HandlerType: (*StorageBackendServer)(nil), +var ContextStorageBackend_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "storage_backend.ContextStorageBackend", + HandlerType: (*ContextStorageBackendServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "GetPreCreateValue", + Handler: _ContextStorageBackend_GetPreCreateValue_Handler, + }, { MethodName: "GetValue", - Handler: _StorageBackend_GetValue_Handler, + Handler: _ContextStorageBackend_GetValue_Handler, }, { MethodName: "OnCreate", - Handler: _StorageBackend_OnCreate_Handler, + Handler: _ContextStorageBackend_OnCreate_Handler, }, { MethodName: "OnUpdate", - Handler: _StorageBackend_OnUpdate_Handler, + Handler: _ContextStorageBackend_OnUpdate_Handler, }, { MethodName: "OnDelete", - Handler: _StorageBackend_OnDelete_Handler, + Handler: _ContextStorageBackend_OnDelete_Handler, }, { MethodName: "GetLockedBy", - Handler: _StorageBackend_GetLockedBy_Handler, + Handler: _ContextStorageBackend_GetLockedBy_Handler, }, { MethodName: "OnLock", - Handler: _StorageBackend_OnLock_Handler, + Handler: _ContextStorageBackend_OnLock_Handler, }, { MethodName: "OnUnlock", - Handler: _StorageBackend_OnUnlock_Handler, + Handler: _ContextStorageBackend_OnUnlock_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/test/local-hub/external_storage_backend_test.go b/test/local-hub/external_storage_backend_test.go index 8861293b2..d7585c9b2 100644 --- a/test/local-hub/external_storage_backend_test.go +++ b/test/local-hub/external_storage_backend_test.go @@ -472,7 +472,7 @@ func getDataDirectlyFromStorage(t *testing.T, addr string, details []gqllocalapi require.NoError(t, err) ctx := context.Background() - client := pb.NewStorageBackendClient(conn) + client := pb.NewValueAndContextStorageBackendClient(conn) var out = map[string]externalData{} for _, ti := range details {