From 9cd79fc829959b66172ebb9427ae0e01dbea4594 Mon Sep 17 00:00:00 2001 From: Mateusz Szostok Date: Thu, 10 Mar 2022 12:53:22 +0100 Subject: [PATCH] Apply fixes after second review --- hub-js/proto/storage_backend.proto | 2 + hub-js/src/generated/grpc/storage_backend.ts | 23 +- hub-js/src/index.ts | 4 +- .../local/resolver/field/spec-value-field.ts | 4 +- hub-js/src/local/resolver/mutation/context.ts | 4 +- .../resolver/mutation/create-type-instance.ts | 2 +- .../mutation/create-type-instances.ts | 2 +- .../resolver/mutation/delete-type-instance.ts | 9 +- .../resolver/mutation/lock-type-instances.ts | 2 +- .../mutation/unlock-type-instances.ts | 2 +- .../mutation/update-type-instances.ts | 8 +- hub-js/src/local/storage/service.ts | 21 +- ...gs-context.ts => update-args-container.ts} | 43 ++-- hub-js/src/local/types/type-instance.ts | 6 +- internal/secret-storage-backend/server.go | 15 +- .../storage_backend/storage_backend.pb.go | 210 ++++++++++-------- 16 files changed, 214 insertions(+), 143 deletions(-) rename hub-js/src/local/storage/{update-args-context.ts => update-args-container.ts} (69%) diff --git a/hub-js/proto/storage_backend.proto b/hub-js/proto/storage_backend.proto index 2dd6dab4a..d38cca1fa 100644 --- a/hub-js/proto/storage_backend.proto +++ b/hub-js/proto/storage_backend.proto @@ -22,6 +22,7 @@ message OnUpdateRequest { uint32 new_resource_version = 2; bytes new_value = 3; optional bytes context = 4; + optional string owner_id = 5; } message OnUpdateResponse { @@ -31,6 +32,7 @@ message OnUpdateResponse { message OnDeleteRequest { string type_instance_id = 1; optional bytes context = 2; + optional string owner_id = 3; } message OnDeleteResponse {} diff --git a/hub-js/src/generated/grpc/storage_backend.ts b/hub-js/src/generated/grpc/storage_backend.ts index bf03eb0e8..64305d8d8 100644 --- a/hub-js/src/generated/grpc/storage_backend.ts +++ b/hub-js/src/generated/grpc/storage_backend.ts @@ -24,6 +24,7 @@ export interface OnUpdateRequest { newResourceVersion: number; newValue: Uint8Array; context?: Uint8Array | undefined; + ownerId?: string | undefined; } export interface OnUpdateResponse { @@ -33,6 +34,7 @@ export interface OnUpdateResponse { export interface OnDeleteRequest { typeInstanceId: string; context?: Uint8Array | undefined; + ownerId?: string | undefined; } export interface OnDeleteResponse {} @@ -293,6 +295,7 @@ function createBaseOnUpdateRequest(): OnUpdateRequest { newResourceVersion: 0, newValue: new Uint8Array(), context: undefined, + ownerId: undefined, }; } @@ -313,6 +316,9 @@ export const OnUpdateRequest = { if (message.context !== undefined) { writer.uint32(34).bytes(message.context); } + if (message.ownerId !== undefined) { + writer.uint32(42).string(message.ownerId); + } return writer; }, @@ -335,6 +341,9 @@ export const OnUpdateRequest = { case 4: message.context = reader.bytes(); break; + case 5: + message.ownerId = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -357,6 +366,7 @@ export const OnUpdateRequest = { context: isSet(object.context) ? bytesFromBase64(object.context) : undefined, + ownerId: isSet(object.ownerId) ? String(object.ownerId) : undefined, }; }, @@ -375,6 +385,7 @@ export const OnUpdateRequest = { message.context !== undefined ? base64FromBytes(message.context) : undefined); + message.ownerId !== undefined && (obj.ownerId = message.ownerId); return obj; }, @@ -384,6 +395,7 @@ export const OnUpdateRequest = { message.newResourceVersion = object.newResourceVersion ?? 0; message.newValue = object.newValue ?? new Uint8Array(); message.context = object.context ?? undefined; + message.ownerId = object.ownerId ?? undefined; return message; }, }; @@ -447,7 +459,7 @@ export const OnUpdateResponse = { }; function createBaseOnDeleteRequest(): OnDeleteRequest { - return { typeInstanceId: "", context: undefined }; + return { typeInstanceId: "", context: undefined, ownerId: undefined }; } export const OnDeleteRequest = { @@ -461,6 +473,9 @@ export const OnDeleteRequest = { if (message.context !== undefined) { writer.uint32(18).bytes(message.context); } + if (message.ownerId !== undefined) { + writer.uint32(26).string(message.ownerId); + } return writer; }, @@ -477,6 +492,9 @@ export const OnDeleteRequest = { case 2: message.context = reader.bytes(); break; + case 3: + message.ownerId = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -493,6 +511,7 @@ export const OnDeleteRequest = { context: isSet(object.context) ? bytesFromBase64(object.context) : undefined, + ownerId: isSet(object.ownerId) ? String(object.ownerId) : undefined, }; }, @@ -505,6 +524,7 @@ export const OnDeleteRequest = { message.context !== undefined ? base64FromBytes(message.context) : undefined); + message.ownerId !== undefined && (obj.ownerId = message.ownerId); return obj; }, @@ -512,6 +532,7 @@ export const OnDeleteRequest = { const message = createBaseOnDeleteRequest(); message.typeInstanceId = object.typeInstanceId ?? ""; message.context = object.context ?? undefined; + message.ownerId = object.ownerId ?? undefined; return message; }, }; diff --git a/hub-js/src/index.ts b/hub-js/src/index.ts index 4cc6e1f12..d05fe6c2b 100644 --- a/hub-js/src/index.ts +++ b/hub-js/src/index.ts @@ -14,7 +14,7 @@ import { config } from "./config"; import { logger } from "./logger"; import { ensureCoreStorageTypeInstance } from "./local/resolver/mutation/register-built-in-storage"; import DelegatedStorageService from "./local/storage/service"; -import UpdateArgsContext from "./local/storage/update-args-context"; +import UpdateArgsContainer from "./local/storage/update-args-container"; async function main() { logger.info("Using Neo4j database", { endpoint: config.neo4j.endpoint }); @@ -73,7 +73,7 @@ async function setupHttpServer( return { driver, delegatedStorage, - updateArgs: new UpdateArgsContext(), + updateArgs: new UpdateArgsContainer(), }; }, }); diff --git a/hub-js/src/local/resolver/field/spec-value-field.ts b/hub-js/src/local/resolver/field/spec-value-field.ts index 89c4832fa..c278ff177 100644 --- a/hub-js/src/local/resolver/field/spec-value-field.ts +++ b/hub-js/src/local/resolver/field/spec-value-field.ts @@ -1,7 +1,7 @@ import { logger } from "../../../logger"; import { GetInput } from "../../storage/service"; import { Context } from "../mutation/context"; -import { Operation } from "../../storage/update-args-context"; +import { Operation } from "../../storage/update-args-container"; import _ from "lodash"; import { Mutex } from "async-mutex"; @@ -87,6 +87,7 @@ async function resolveMutationReturnValue( newValue = resp[tiId]; } + console.log(context.updateArgs.GetOwnerID(fetchInput.typeInstance.id)); // 2. Update TypeInstance's value const update = { backend: fetchInput.backend, @@ -94,6 +95,7 @@ async function resolveMutationReturnValue( id: fetchInput.typeInstance.id, newResourceVersion: fetchInput.typeInstance.resourceVersion, newValue, + ownerID: context.updateArgs.GetOwnerID(fetchInput.typeInstance.id), }, }; diff --git a/hub-js/src/local/resolver/mutation/context.ts b/hub-js/src/local/resolver/mutation/context.ts index 7b91d52f5..d9ff1895c 100644 --- a/hub-js/src/local/resolver/mutation/context.ts +++ b/hub-js/src/local/resolver/mutation/context.ts @@ -1,6 +1,6 @@ import { Driver } from "neo4j-driver"; import DelegatedStorageService from "../../storage/service"; -import UpdateArgsContext from "../../storage/update-args-context"; +import UpdateArgsContainer from "../../storage/update-args-container"; export interface ContextWithDriver { driver: Driver; @@ -11,7 +11,7 @@ export interface ContextWithDelegatedStorage { } export interface ContextWithUpdateArgs { - updateArgs: UpdateArgsContext; + updateArgs: UpdateArgsContainer; } export interface Context diff --git a/hub-js/src/local/resolver/mutation/create-type-instance.ts b/hub-js/src/local/resolver/mutation/create-type-instance.ts index 8a76d9d66..6648cd384 100644 --- a/hub-js/src/local/resolver/mutation/create-type-instance.ts +++ b/hub-js/src/local/resolver/mutation/create-type-instance.ts @@ -10,7 +10,7 @@ interface CreateTypeInstanceArgs { } export async function createTypeInstance( - _: undefined, + _: unknown, args: CreateTypeInstanceArgs, context: Context ) { diff --git a/hub-js/src/local/resolver/mutation/create-type-instances.ts b/hub-js/src/local/resolver/mutation/create-type-instances.ts index da4ea2ba4..520e68a5f 100644 --- a/hub-js/src/local/resolver/mutation/create-type-instances.ts +++ b/hub-js/src/local/resolver/mutation/create-type-instances.ts @@ -48,7 +48,7 @@ export type TypeInstanceInput = Omit & { }; export async function createTypeInstances( - _: undefined, + _: unknown, args: CreateTypeInstancesArgs, context: Context ) { diff --git a/hub-js/src/local/resolver/mutation/delete-type-instance.ts b/hub-js/src/local/resolver/mutation/delete-type-instance.ts index 06762d66a..7cec7e530 100644 --- a/hub-js/src/local/resolver/mutation/delete-type-instance.ts +++ b/hub-js/src/local/resolver/mutation/delete-type-instance.ts @@ -6,9 +6,10 @@ import { tryToExtractCustomCypherError, } from "./cypher-errors"; import { logger } from "../../../logger"; +import { TypeInstanceBackendInput } from "../../types/type-instance"; export async function deleteTypeInstance( - _: undefined, + _: unknown, args: { id: string; ownerID: string }, context: Context ) { @@ -89,8 +90,7 @@ export async function deleteTypeInstance( ); // NOTE: Use map to ensure that external storage is not called multiple time for the same ID - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const deleteExternally = new Map(); + const deleteExternally = new Map(); result.records.forEach((record) => { const out = record.get("out"); @@ -104,8 +104,9 @@ export async function deleteTypeInstance( await context.delegatedStorage.Delete({ typeInstance: { id, + ownerID: args.ownerID, }, - backend, + backend: backend as TypeInstanceBackendInput, }); } diff --git a/hub-js/src/local/resolver/mutation/lock-type-instances.ts b/hub-js/src/local/resolver/mutation/lock-type-instances.ts index 1b9fe9e9c..fbddc8b6c 100644 --- a/hub-js/src/local/resolver/mutation/lock-type-instances.ts +++ b/hub-js/src/local/resolver/mutation/lock-type-instances.ts @@ -29,7 +29,7 @@ interface ExternallyStoredOutput { } export async function lockTypeInstances( - _: undefined, + _: unknown, args: LockingTypeInstanceInput, context: Context ) { diff --git a/hub-js/src/local/resolver/mutation/unlock-type-instances.ts b/hub-js/src/local/resolver/mutation/unlock-type-instances.ts index 875475025..16e78128c 100644 --- a/hub-js/src/local/resolver/mutation/unlock-type-instances.ts +++ b/hub-js/src/local/resolver/mutation/unlock-type-instances.ts @@ -10,7 +10,7 @@ import { logger } from "../../../logger"; interface UnLockTypeInstanceInput extends LockingTypeInstanceInput {} export async function unlockTypeInstances( - _: undefined, + _: unknown, args: UnLockTypeInstanceInput, context: Context ) { diff --git a/hub-js/src/local/resolver/mutation/update-type-instances.ts b/hub-js/src/local/resolver/mutation/update-type-instances.ts index 763b88972..c153b32cb 100644 --- a/hub-js/src/local/resolver/mutation/update-type-instances.ts +++ b/hub-js/src/local/resolver/mutation/update-type-instances.ts @@ -9,21 +9,22 @@ import { } from "./cypher-errors"; import { logger } from "../../../logger"; import { Context } from "./context"; -import { Operation } from "../../storage/update-args-context"; +import { Operation } from "../../storage/update-args-container"; interface UpdateTypeInstancesInput { in: [ { id: string; + ownerID?: string; typeInstance: { - value?: undefined; + value?: unknown; }; } ]; } export async function updateTypeInstances( - _: undefined, + _: unknown, args: UpdateTypeInstancesInput, context: Context, resolveInfo: GraphQLResolveInfo @@ -33,6 +34,7 @@ export async function updateTypeInstances( context.updateArgs.SetOperation(Operation.UpdateTypeInstancesMutation); args.in.forEach((x) => { context.updateArgs.SetValue(x.id, x.typeInstance.value); + context.updateArgs.SetOwnerID(x.id, x.ownerID); }); const neo4jSession = context.driver.session(); diff --git a/hub-js/src/local/storage/service.ts b/hub-js/src/local/storage/service.ts index 6ae6c7b75..139e086a5 100644 --- a/hub-js/src/local/storage/service.ts +++ b/hub-js/src/local/storage/service.ts @@ -28,8 +28,7 @@ export interface StoreInput { backend: TypeInstanceBackendInput; typeInstance: { id: string; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - value: any; + value: unknown; }; } @@ -38,8 +37,8 @@ export interface UpdateInput { typeInstance: { id: string; newResourceVersion: number; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - newValue: any; + newValue: unknown; + ownerID?: string; }; } @@ -55,6 +54,7 @@ export interface DeleteInput { backend: TypeInstanceBackendInput; typeInstance: { id: string; + ownerID?: string; }; } @@ -74,8 +74,7 @@ export interface UnlockInput { } export interface UpdatedContexts { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - [key: string]: any; + [key: string]: unknown; } export default class DelegatedStorageService { @@ -158,6 +157,7 @@ export default class DelegatedStorageService { newResourceVersion: input.typeInstance.newResourceVersion, newValue: this.encode(input.typeInstance.newValue), context: this.encode(input.backend.context), + ownerId: input.typeInstance.ownerID, }; await cli.onUpdate(req); @@ -236,6 +236,7 @@ export default class DelegatedStorageService { const req: OnDeleteRequest = { typeInstanceId: input.typeInstance.id, context: this.encode(input.backend.context), + ownerId: input.typeInstance.ownerID, }; await cli.onDelete(req); } @@ -362,16 +363,14 @@ export default class DelegatedStorageService { return this.registeredClients.get(id); } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - private static convertToJSONIfObject(val: any) { + private static convertToJSONIfObject(val: unknown): string | undefined { if (val instanceof Array || typeof val === "object") { return JSON.stringify(val); } - return val; + return val as string; } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - private encode(val: any) { + private encode(val: unknown) { return new TextEncoder().encode( DelegatedStorageService.convertToJSONIfObject(val) ); diff --git a/hub-js/src/local/storage/update-args-context.ts b/hub-js/src/local/storage/update-args-container.ts similarity index 69% rename from hub-js/src/local/storage/update-args-context.ts rename to hub-js/src/local/storage/update-args-container.ts index a5725caad..d8b094791 100644 --- a/hub-js/src/local/storage/update-args-context.ts +++ b/hub-js/src/local/storage/update-args-container.ts @@ -3,21 +3,16 @@ export enum Operation { UpdateTypeInstancesMutation, } -interface GetValueOutput { - value: undefined; - latestKnownRevision: number; -} - -export default class UpdateArgsContext { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - private valuesPerTypeInstance: Map; +export default class UpdateArgsContainer { + private valuesPerTypeInstance: Map; private latestKnownRevPerTypeInstance: Map; private currentOperation: Operation; + private currentOperationOwnerID: Map; constructor() { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - this.valuesPerTypeInstance = new Map(); - this.latestKnownRevPerTypeInstance = new Map(); + this.valuesPerTypeInstance = new Map(); + this.latestKnownRevPerTypeInstance = new Map(); + this.currentOperationOwnerID = new Map(); this.currentOperation = Operation.None; } @@ -60,8 +55,7 @@ export default class UpdateArgsContext { * @param value - User specified TypeInstance's value. * */ - // eslint-disable-next-line @typescript-eslint/no-explicit-any - SetValue(id: string, value: any) { + SetValue(id: string, value: unknown) { return this.valuesPerTypeInstance.set(id, value); } @@ -72,7 +66,7 @@ export default class UpdateArgsContext { * @return - TypeInstance's value if set by other resolver. * */ - GetValue(id: string): GetValueOutput { + GetValue(id: string): unknown { return this.valuesPerTypeInstance.get(id); } @@ -100,4 +94,25 @@ export default class UpdateArgsContext { GetLastKnownRev(id: string) { return this.latestKnownRevPerTypeInstance.get(id) || 0; } + + /** + * Returns the owner id of the current operation (sent in GQL request). + * + * @return - current owner id. + * + */ + GetOwnerID(id: string): string | undefined { + return this.currentOperationOwnerID.get(id); + } + + /** + * Set the owner id of the current operation (sent in GQL request). May be undefined. + * + * @param id - related TypeInstance id. + * @param ownerId - current owner id. + * + */ + SetOwnerID(id: string, ownerId?: string) { + this.currentOperationOwnerID.set(id, ownerId); + } } diff --git a/hub-js/src/local/types/type-instance.ts b/hub-js/src/local/types/type-instance.ts index c28db7e3c..498c6b9ad 100644 --- a/hub-js/src/local/types/type-instance.ts +++ b/hub-js/src/local/types/type-instance.ts @@ -1,18 +1,18 @@ export interface TypeInstanceBackendInput { id: string; - context?: undefined; + context?: unknown; } export interface CreateTypeInstanceInput { alias?: string; backend?: TypeInstanceBackendInput; - value?: undefined; + value?: unknown; } export interface TypeInstanceBackendDetails { abstract: boolean; id: string; - context?: undefined; + context?: unknown; } export interface CreateTypeInstancesInput { diff --git a/internal/secret-storage-backend/server.go b/internal/secret-storage-backend/server.go index 8cb099011..8458e6c72 100644 --- a/internal/secret-storage-backend/server.go +++ b/internal/secret-storage-backend/server.go @@ -16,6 +16,7 @@ import ( ) // TODO(review): ALL CHANGES WILL BE REVERTED BEFORE MERGING. IT WAS CHANGED ONLY FOR DEMO/PR TESTING PURPOSES. +// TODO(review): Changes related to ownerID will stay. // Context holds Secret storage backend specific parameters. type Context struct { @@ -177,7 +178,7 @@ func (h *Handler) OnUpdate(_ context.Context, request *pb.OnUpdateRequest) (*pb. key := h.storageKeyForTypeInstanceValue(provider, request.TypeInstanceId, request.NewResourceVersion) - if err := h.ensureSecretCanBeUpdated(provider, key); err != nil { + if err := h.ensureSecretCanBeUpdated(provider, key, request.OwnerId); err != nil { return nil, err } @@ -259,7 +260,7 @@ func (h *Handler) OnDelete(_ context.Context, request *pb.OnDeleteRequest) (*pb. key := tellercore.KeyPath{ Path: h.storagePathForTypeInstance(provider, request.TypeInstanceId), } - err = h.ensureSecretCanBeDeleted(provider, key) + err = h.ensureSecretCanBeDeleted(provider, key, request.OwnerId) if err != nil { return nil, err } @@ -382,7 +383,7 @@ func (h *Handler) ensureSecretCanBeCreated(provider tellercore.Provider, key tel return nil } -func (h *Handler) ensureSecretCanBeUpdated(provider tellercore.Provider, key tellercore.KeyPath) error { +func (h *Handler) ensureSecretCanBeUpdated(provider tellercore.Provider, key tellercore.KeyPath, ownerID *string) error { entries, err := h.getEntriesForPath(provider, key) if err != nil { return h.internalError(err) @@ -394,6 +395,9 @@ func (h *Handler) ensureSecretCanBeUpdated(provider tellercore.Provider, key tel for _, entry := range entries { if entry.Key == lockedByField { + if ownerID != nil && entry.Value == *ownerID { + continue + } return h.typeInstanceLockedError(key.Path, entry.Value) } if entry.Key == key.Field { @@ -417,7 +421,7 @@ func (h *Handler) ensureSecretIsNotLocked(provider tellercore.Provider, typeInst return nil } -func (h *Handler) ensureSecretCanBeDeleted(provider tellercore.Provider, key tellercore.KeyPath) error { +func (h *Handler) ensureSecretCanBeDeleted(provider tellercore.Provider, key tellercore.KeyPath, ownerID *string) error { entries, err := h.getEntriesForPath(provider, key) if err != nil { return h.internalError(err) @@ -431,6 +435,9 @@ func (h *Handler) ensureSecretCanBeDeleted(provider tellercore.Provider, key tel if entry.Key != lockedByField { continue } + if ownerID != nil && entry.Value == *ownerID { + continue + } return h.typeInstanceLockedError(key.Path, entry.Value) } 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 fca5494a1..08680d296 100644 --- a/pkg/hub/api/grpc/storage_backend/storage_backend.pb.go +++ b/pkg/hub/api/grpc/storage_backend/storage_backend.pb.go @@ -190,10 +190,11 @@ type OnUpdateRequest struct { 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"` - NewValue []byte `protobuf:"bytes,3,opt,name=new_value,json=newValue,proto3" json:"new_value,omitempty"` - Context []byte `protobuf:"bytes,4,opt,name=context,proto3,oneof" json:"context,omitempty"` + 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"` + NewValue []byte `protobuf:"bytes,3,opt,name=new_value,json=newValue,proto3" json:"new_value,omitempty"` + Context []byte `protobuf:"bytes,4,opt,name=context,proto3,oneof" json:"context,omitempty"` + OwnerId *string `protobuf:"bytes,5,opt,name=owner_id,json=ownerId,proto3,oneof" json:"owner_id,omitempty"` } func (x *OnUpdateRequest) Reset() { @@ -256,6 +257,13 @@ func (x *OnUpdateRequest) GetContext() []byte { return nil } +func (x *OnUpdateRequest) GetOwnerId() string { + if x != nil && x.OwnerId != nil { + return *x.OwnerId + } + return "" +} + type OnUpdateResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -308,8 +316,9 @@ type OnDeleteRequest struct { 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,oneof" json:"context,omitempty"` + 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,oneof" json:"context,omitempty"` + OwnerId *string `protobuf:"bytes,3,opt,name=owner_id,json=ownerId,proto3,oneof" json:"owner_id,omitempty"` } func (x *OnDeleteRequest) Reset() { @@ -358,6 +367,13 @@ func (x *OnDeleteRequest) GetContext() []byte { return nil } +func (x *OnDeleteRequest) GetOwnerId() string { + if x != nil && x.OwnerId != nil { + return *x.OwnerId + } + return "" +} + type OnDeleteResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -825,7 +841,7 @@ var file_storage_backend_proto_rawDesc = []byte{ 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, 0xb5, 0x01, 0x0a, 0x0f, 0x4f, 0x6e, 0x55, 0x70, 0x64, 0x61, + 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, @@ -836,94 +852,100 @@ var file_storage_backend_proto_rawDesc = []byte{ 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, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 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, 0x66, 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, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 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, 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, 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, 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, + 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, + 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, + 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, 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, + 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, + 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 (