From bac23e0779ed24f5df40fb0633463977f8e990e3 Mon Sep 17 00:00:00 2001 From: Ishan Arya Date: Wed, 16 Oct 2024 12:16:14 +0530 Subject: [PATCH] feat: add dry run (#116) * feat: add dry run * feat: add swagger * test: add dry run tests * refactor: use option pattern * tests: fix call * tests: fix params --------- Co-authored-by: Ishan Arya --- Makefile | 2 +- core/write.go | 41 +- core/write_test.go | 155 ++++++- internal/server/v1/mocks/resource_service.go | 135 ++++-- internal/server/v1/resources/server.go | 13 +- internal/server/v1/resources/server_test.go | 20 +- proto/entropy.swagger.yaml | 12 +- .../entropy/v1beta1/resource.pb.go | 418 ++++++++++-------- .../entropy/v1beta1/resource.pb.gw.go | 18 + .../entropy/v1beta1/resource.pb.validate.go | 6 + 10 files changed, 551 insertions(+), 269 deletions(-) diff --git a/Makefile b/Makefile index 3c2e44cb..e8542198 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ NAME=github.com/goto/entropy VERSION=$(shell git describe --tags --always --first-parent 2>/dev/null) COMMIT=$(shell git rev-parse --short HEAD) -PROTON_COMMIT="564a3d2fa0aa14e435dc4f264fbf63ff2dcf09c2" +PROTON_COMMIT="6c5bc2b621abe2812cc8288a5f6363570bab911a" BUILD_TIME=$(shell date) COVERAGE_DIR=coverage BUILD_DIR=dist diff --git a/core/write.go b/core/write.go index 186c4488..d60da769 100644 --- a/core/write.go +++ b/core/write.go @@ -9,7 +9,15 @@ import ( "github.com/goto/entropy/pkg/errors" ) -func (svc *Service) CreateResource(ctx context.Context, res resource.Resource) (*resource.Resource, error) { +type Options struct { + DryRun bool +} + +func WithDryRun(dryRun bool) Options { + return Options{DryRun: dryRun} +} + +func (svc *Service) CreateResource(ctx context.Context, res resource.Resource, resourceOpts ...Options) (*resource.Resource, error) { if err := res.Validate(true); err != nil { return nil, err } @@ -22,10 +30,15 @@ func (svc *Service) CreateResource(ctx context.Context, res resource.Resource) ( } res.Spec.Configs = nil - return svc.execAction(ctx, res, act) + dryRun := false + for _, opt := range resourceOpts { + dryRun = opt.DryRun + } + + return svc.execAction(ctx, res, act, dryRun) } -func (svc *Service) UpdateResource(ctx context.Context, urn string, req resource.UpdateRequest) (*resource.Resource, error) { +func (svc *Service) UpdateResource(ctx context.Context, urn string, req resource.UpdateRequest, resourceOpts ...Options) (*resource.Resource, error) { if len(req.Spec.Dependencies) != 0 { return nil, errors.ErrUnsupported.WithMsgf("updating dependencies is not supported") } else if len(req.Spec.Configs) == 0 { @@ -37,17 +50,17 @@ func (svc *Service) UpdateResource(ctx context.Context, urn string, req resource Params: req.Spec.Configs, Labels: req.Labels, UserID: req.UserID, - }) + }, resourceOpts...) } func (svc *Service) DeleteResource(ctx context.Context, urn string) error { _, actionErr := svc.ApplyAction(ctx, urn, module.ActionRequest{ Name: module.DeleteAction, - }) + }, WithDryRun(false)) return actionErr } -func (svc *Service) ApplyAction(ctx context.Context, urn string, act module.ActionRequest) (*resource.Resource, error) { +func (svc *Service) ApplyAction(ctx context.Context, urn string, act module.ActionRequest, resourceOpts ...Options) (*resource.Resource, error) { res, err := svc.GetResource(ctx, urn) if err != nil { return nil, err @@ -56,10 +69,15 @@ func (svc *Service) ApplyAction(ctx context.Context, urn string, act module.Acti WithMsgf("cannot perform '%s' on resource in '%s'", act.Name, res.State.Status) } - return svc.execAction(ctx, *res, act) + dryRun := false + for _, opt := range resourceOpts { + dryRun = opt.DryRun + } + + return svc.execAction(ctx, *res, act, dryRun) } -func (svc *Service) execAction(ctx context.Context, res resource.Resource, act module.ActionRequest) (*resource.Resource, error) { +func (svc *Service) execAction(ctx context.Context, res resource.Resource, act module.ActionRequest, dryRun bool) (*resource.Resource, error) { planned, err := svc.planChange(ctx, res, act) if err != nil { return nil, err @@ -77,8 +95,11 @@ func (svc *Service) execAction(ctx context.Context, res resource.Resource, act m } reason := fmt.Sprintf("action:%s", act.Name) - if err := svc.upsert(ctx, *planned, isCreate(act.Name), true, reason); err != nil { - return nil, err + + if !dryRun { + if err := svc.upsert(ctx, *planned, isCreate(act.Name), true, reason); err != nil { + return nil, err + } } return planned, nil } diff --git a/core/write_test.go b/core/write_test.go index fac9f57d..2f832b96 100644 --- a/core/write_test.go +++ b/core/write_test.go @@ -26,6 +26,7 @@ func TestService_CreateResource(t *testing.T) { setup func(t *testing.T) *core.Service res resource.Resource want *resource.Resource + options []core.Options wantErr error }{ { @@ -278,6 +279,41 @@ func TestService_CreateResource(t *testing.T) { }, wantErr: nil, }, + { + name: "AlreadyExistsWithDryRun", + setup: func(t *testing.T) *core.Service { + t.Helper() + mod := &mocks.ModuleService{} + mod.EXPECT(). + PlanAction(mock.Anything, mock.Anything, mock.Anything). + Return(&resource.Resource{ + Kind: "mock", + Name: "child", + Project: "project", + State: resource.State{Status: resource.StatusCompleted}, + }, nil).Once() + + resourceRepo := &mocks.ResourceStore{} + + return core.New(resourceRepo, mod, deadClock, defaultSyncBackoff, defaultMaxRetries) + }, + res: resource.Resource{ + Kind: "mock", + Name: "child", + Project: "project", + }, + want: &resource.Resource{ + URN: "orn:entropy:mock:project:child", + Kind: "mock", + Name: "child", + Project: "project", + State: resource.State{Status: resource.StatusCompleted}, + CreatedAt: frozenTime, + UpdatedAt: frozenTime, + }, + options: []core.Options{core.WithDryRun(true)}, + wantErr: nil, + }, } for _, tt := range tests { @@ -286,7 +322,7 @@ func TestService_CreateResource(t *testing.T) { t.Parallel() svc := tt.setup(t) - got, err := svc.CreateResource(context.Background(), tt.res) + got, err := svc.CreateResource(context.Background(), tt.res, tt.options...) if tt.wantErr != nil { assert.Error(t, err) assert.True(t, errors.Is(err, tt.wantErr)) @@ -310,12 +346,25 @@ func TestService_UpdateResource(t *testing.T) { CreatedAt: frozenTime, } + testResourceForDryRun := resource.Resource{ + URN: "orn:entropy:mock:project:childtwo", + Kind: "mock", + Name: "childtwo", + Project: "project", + State: resource.State{Status: resource.StatusCompleted}, + Spec: resource.Spec{ + Configs: []byte(`{"foo": "bar-old"}`), + }, + CreatedAt: frozenTime, + } + tests := []struct { name string setup func(t *testing.T) *core.Service urn string update resource.UpdateRequest want *resource.Resource + options []core.Options wantErr error }{ { @@ -472,6 +521,57 @@ func TestService_UpdateResource(t *testing.T) { }, wantErr: nil, }, + { + name: "SuccessWithDryRun", + setup: func(t *testing.T) *core.Service { + t.Helper() + mod := &mocks.ModuleService{} + mod.EXPECT(). + PlanAction(mock.Anything, mock.Anything, mock.Anything). + Return(&resource.Resource{ + URN: "orn:entropy:mock:project:childtwo", + Kind: "mock", + Name: "childtwo", + Project: "project", + Spec: resource.Spec{ + Configs: []byte(`{"foo": "bar"}`), + }, + State: resource.State{Status: resource.StatusPending}, + CreatedAt: frozenTime, + }, nil).Once() + mod.EXPECT(). + GetOutput(mock.Anything, mock.Anything). + Return(nil, nil). + Once() + + resourceRepo := &mocks.ResourceStore{} + resourceRepo.EXPECT(). + GetByURN(mock.Anything, "orn:entropy:mock:project:childtwo"). + Return(&testResourceForDryRun, nil).Once() + + return core.New(resourceRepo, mod, deadClock, defaultSyncBackoff, defaultMaxRetries) + }, + urn: "orn:entropy:mock:project:childtwo", + update: resource.UpdateRequest{ + Spec: resource.Spec{Configs: []byte(`{"foo": "bar"}`)}, + Labels: map[string]string{"created_by": "test_user", "group": "test_group"}, + }, + want: &resource.Resource{ + URN: "orn:entropy:mock:project:childtwo", + Kind: "mock", + Name: "childtwo", + Project: "project", + CreatedAt: frozenTime, + UpdatedAt: frozenTime, + State: resource.State{Status: resource.StatusPending}, + Labels: map[string]string{"created_by": "test_user", "group": "test_group"}, + Spec: resource.Spec{ + Configs: []byte(`{"foo": "bar"}`), + }, + }, + options: []core.Options{core.WithDryRun(true)}, + wantErr: nil, + }, } for _, tt := range tests { @@ -480,7 +580,7 @@ func TestService_UpdateResource(t *testing.T) { t.Parallel() svc := tt.setup(t) - got, err := svc.UpdateResource(context.Background(), tt.urn, tt.update) + got, err := svc.UpdateResource(context.Background(), tt.urn, tt.update, tt.options...) if tt.wantErr != nil { assert.Error(t, err) assert.True(t, errors.Is(err, tt.wantErr)) @@ -641,6 +741,7 @@ func TestService_ApplyAction(t *testing.T) { urn string action module.ActionRequest want *resource.Resource + options []core.Options wantErr error }{ { @@ -771,6 +872,54 @@ func TestService_ApplyAction(t *testing.T) { }, wantErr: nil, }, + { + name: "SuccessWithDryRun", + setup: func(t *testing.T) *core.Service { + t.Helper() + mod := &mocks.ModuleService{} + mod.EXPECT(). + PlanAction(mock.Anything, mock.Anything, sampleAction). + Return(&resource.Resource{ + URN: "orn:entropy:mock:foo:bar", + Kind: "mock", + Project: "foo", + Name: "bar", + State: resource.State{Status: resource.StatusPending}, + }, nil).Once() + mod.EXPECT(). + GetOutput(mock.Anything, mock.Anything). + Return(nil, nil). + Once() + + resourceRepo := &mocks.ResourceStore{} + resourceRepo.EXPECT(). + GetByURN(mock.Anything, "orn:entropy:mock:foo:bar"). + Return(&resource.Resource{ + URN: "orn:entropy:mock:foo:bar", + Kind: "mock", + Project: "foo", + Name: "bar", + CreatedAt: frozenTime, + State: resource.State{Status: resource.StatusCompleted}, + }, nil). + Once() + + return core.New(resourceRepo, mod, deadClock, defaultSyncBackoff, defaultMaxRetries) + }, + urn: "orn:entropy:mock:foo:bar", + action: sampleAction, + want: &resource.Resource{ + URN: "orn:entropy:mock:foo:bar", + Kind: "mock", + Project: "foo", + Name: "bar", + State: resource.State{Status: resource.StatusPending}, + CreatedAt: frozenTime, + UpdatedAt: frozenTime, + }, + wantErr: nil, + options: []core.Options{core.WithDryRun(true)}, + }, } for _, tt := range tests { @@ -779,7 +928,7 @@ func TestService_ApplyAction(t *testing.T) { t.Parallel() svc := tt.setup(t) - got, err := svc.ApplyAction(context.Background(), tt.urn, tt.action) + got, err := svc.ApplyAction(context.Background(), tt.urn, tt.action, tt.options...) if tt.wantErr != nil { assert.Error(t, err) assert.True(t, errors.Is(err, tt.wantErr), cmp.Diff(tt.want, err)) diff --git a/internal/server/v1/mocks/resource_service.go b/internal/server/v1/mocks/resource_service.go index e2d638df..404a1ef4 100644 --- a/internal/server/v1/mocks/resource_service.go +++ b/internal/server/v1/mocks/resource_service.go @@ -1,13 +1,15 @@ -// Code generated by mockery v2.42.1. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks import ( context "context" - module "github.com/goto/entropy/core/module" + core "github.com/goto/entropy/core" mock "github.com/stretchr/testify/mock" + module "github.com/goto/entropy/core/module" + resource "github.com/goto/entropy/core/resource" ) @@ -24,9 +26,16 @@ func (_m *ResourceService) EXPECT() *ResourceService_Expecter { return &ResourceService_Expecter{mock: &_m.Mock} } -// ApplyAction provides a mock function with given fields: ctx, urn, action -func (_m *ResourceService) ApplyAction(ctx context.Context, urn string, action module.ActionRequest) (*resource.Resource, error) { - ret := _m.Called(ctx, urn, action) +// ApplyAction provides a mock function with given fields: ctx, urn, action, resourceOpts +func (_m *ResourceService) ApplyAction(ctx context.Context, urn string, action module.ActionRequest, resourceOpts ...core.Options) (*resource.Resource, error) { + _va := make([]interface{}, len(resourceOpts)) + for _i := range resourceOpts { + _va[_i] = resourceOpts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, urn, action) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) if len(ret) == 0 { panic("no return value specified for ApplyAction") @@ -34,19 +43,19 @@ func (_m *ResourceService) ApplyAction(ctx context.Context, urn string, action m var r0 *resource.Resource var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, module.ActionRequest) (*resource.Resource, error)); ok { - return rf(ctx, urn, action) + if rf, ok := ret.Get(0).(func(context.Context, string, module.ActionRequest, ...core.Options) (*resource.Resource, error)); ok { + return rf(ctx, urn, action, resourceOpts...) } - if rf, ok := ret.Get(0).(func(context.Context, string, module.ActionRequest) *resource.Resource); ok { - r0 = rf(ctx, urn, action) + if rf, ok := ret.Get(0).(func(context.Context, string, module.ActionRequest, ...core.Options) *resource.Resource); ok { + r0 = rf(ctx, urn, action, resourceOpts...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*resource.Resource) } } - if rf, ok := ret.Get(1).(func(context.Context, string, module.ActionRequest) error); ok { - r1 = rf(ctx, urn, action) + if rf, ok := ret.Get(1).(func(context.Context, string, module.ActionRequest, ...core.Options) error); ok { + r1 = rf(ctx, urn, action, resourceOpts...) } else { r1 = ret.Error(1) } @@ -63,13 +72,21 @@ type ResourceService_ApplyAction_Call struct { // - ctx context.Context // - urn string // - action module.ActionRequest -func (_e *ResourceService_Expecter) ApplyAction(ctx interface{}, urn interface{}, action interface{}) *ResourceService_ApplyAction_Call { - return &ResourceService_ApplyAction_Call{Call: _e.mock.On("ApplyAction", ctx, urn, action)} +// - resourceOpts ...core.Options +func (_e *ResourceService_Expecter) ApplyAction(ctx interface{}, urn interface{}, action interface{}, resourceOpts ...interface{}) *ResourceService_ApplyAction_Call { + return &ResourceService_ApplyAction_Call{Call: _e.mock.On("ApplyAction", + append([]interface{}{ctx, urn, action}, resourceOpts...)...)} } -func (_c *ResourceService_ApplyAction_Call) Run(run func(ctx context.Context, urn string, action module.ActionRequest)) *ResourceService_ApplyAction_Call { +func (_c *ResourceService_ApplyAction_Call) Run(run func(ctx context.Context, urn string, action module.ActionRequest, resourceOpts ...core.Options)) *ResourceService_ApplyAction_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(module.ActionRequest)) + variadicArgs := make([]core.Options, len(args)-3) + for i, a := range args[3:] { + if a != nil { + variadicArgs[i] = a.(core.Options) + } + } + run(args[0].(context.Context), args[1].(string), args[2].(module.ActionRequest), variadicArgs...) }) return _c } @@ -79,14 +96,21 @@ func (_c *ResourceService_ApplyAction_Call) Return(_a0 *resource.Resource, _a1 e return _c } -func (_c *ResourceService_ApplyAction_Call) RunAndReturn(run func(context.Context, string, module.ActionRequest) (*resource.Resource, error)) *ResourceService_ApplyAction_Call { +func (_c *ResourceService_ApplyAction_Call) RunAndReturn(run func(context.Context, string, module.ActionRequest, ...core.Options) (*resource.Resource, error)) *ResourceService_ApplyAction_Call { _c.Call.Return(run) return _c } -// CreateResource provides a mock function with given fields: ctx, res -func (_m *ResourceService) CreateResource(ctx context.Context, res resource.Resource) (*resource.Resource, error) { - ret := _m.Called(ctx, res) +// CreateResource provides a mock function with given fields: ctx, res, resourceOpts +func (_m *ResourceService) CreateResource(ctx context.Context, res resource.Resource, resourceOpts ...core.Options) (*resource.Resource, error) { + _va := make([]interface{}, len(resourceOpts)) + for _i := range resourceOpts { + _va[_i] = resourceOpts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, res) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) if len(ret) == 0 { panic("no return value specified for CreateResource") @@ -94,19 +118,19 @@ func (_m *ResourceService) CreateResource(ctx context.Context, res resource.Reso var r0 *resource.Resource var r1 error - if rf, ok := ret.Get(0).(func(context.Context, resource.Resource) (*resource.Resource, error)); ok { - return rf(ctx, res) + if rf, ok := ret.Get(0).(func(context.Context, resource.Resource, ...core.Options) (*resource.Resource, error)); ok { + return rf(ctx, res, resourceOpts...) } - if rf, ok := ret.Get(0).(func(context.Context, resource.Resource) *resource.Resource); ok { - r0 = rf(ctx, res) + if rf, ok := ret.Get(0).(func(context.Context, resource.Resource, ...core.Options) *resource.Resource); ok { + r0 = rf(ctx, res, resourceOpts...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*resource.Resource) } } - if rf, ok := ret.Get(1).(func(context.Context, resource.Resource) error); ok { - r1 = rf(ctx, res) + if rf, ok := ret.Get(1).(func(context.Context, resource.Resource, ...core.Options) error); ok { + r1 = rf(ctx, res, resourceOpts...) } else { r1 = ret.Error(1) } @@ -122,13 +146,21 @@ type ResourceService_CreateResource_Call struct { // CreateResource is a helper method to define mock.On call // - ctx context.Context // - res resource.Resource -func (_e *ResourceService_Expecter) CreateResource(ctx interface{}, res interface{}) *ResourceService_CreateResource_Call { - return &ResourceService_CreateResource_Call{Call: _e.mock.On("CreateResource", ctx, res)} +// - resourceOpts ...core.Options +func (_e *ResourceService_Expecter) CreateResource(ctx interface{}, res interface{}, resourceOpts ...interface{}) *ResourceService_CreateResource_Call { + return &ResourceService_CreateResource_Call{Call: _e.mock.On("CreateResource", + append([]interface{}{ctx, res}, resourceOpts...)...)} } -func (_c *ResourceService_CreateResource_Call) Run(run func(ctx context.Context, res resource.Resource)) *ResourceService_CreateResource_Call { +func (_c *ResourceService_CreateResource_Call) Run(run func(ctx context.Context, res resource.Resource, resourceOpts ...core.Options)) *ResourceService_CreateResource_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(resource.Resource)) + variadicArgs := make([]core.Options, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(core.Options) + } + } + run(args[0].(context.Context), args[1].(resource.Resource), variadicArgs...) }) return _c } @@ -138,7 +170,7 @@ func (_c *ResourceService_CreateResource_Call) Return(_a0 *resource.Resource, _a return _c } -func (_c *ResourceService_CreateResource_Call) RunAndReturn(run func(context.Context, resource.Resource) (*resource.Resource, error)) *ResourceService_CreateResource_Call { +func (_c *ResourceService_CreateResource_Call) RunAndReturn(run func(context.Context, resource.Resource, ...core.Options) (*resource.Resource, error)) *ResourceService_CreateResource_Call { _c.Call.Return(run) return _c } @@ -426,9 +458,16 @@ func (_c *ResourceService_ListResources_Call) RunAndReturn(run func(context.Cont return _c } -// UpdateResource provides a mock function with given fields: ctx, urn, req -func (_m *ResourceService) UpdateResource(ctx context.Context, urn string, req resource.UpdateRequest) (*resource.Resource, error) { - ret := _m.Called(ctx, urn, req) +// UpdateResource provides a mock function with given fields: ctx, urn, req, resourceOpts +func (_m *ResourceService) UpdateResource(ctx context.Context, urn string, req resource.UpdateRequest, resourceOpts ...core.Options) (*resource.Resource, error) { + _va := make([]interface{}, len(resourceOpts)) + for _i := range resourceOpts { + _va[_i] = resourceOpts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, urn, req) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) if len(ret) == 0 { panic("no return value specified for UpdateResource") @@ -436,19 +475,19 @@ func (_m *ResourceService) UpdateResource(ctx context.Context, urn string, req r var r0 *resource.Resource var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, resource.UpdateRequest) (*resource.Resource, error)); ok { - return rf(ctx, urn, req) + if rf, ok := ret.Get(0).(func(context.Context, string, resource.UpdateRequest, ...core.Options) (*resource.Resource, error)); ok { + return rf(ctx, urn, req, resourceOpts...) } - if rf, ok := ret.Get(0).(func(context.Context, string, resource.UpdateRequest) *resource.Resource); ok { - r0 = rf(ctx, urn, req) + if rf, ok := ret.Get(0).(func(context.Context, string, resource.UpdateRequest, ...core.Options) *resource.Resource); ok { + r0 = rf(ctx, urn, req, resourceOpts...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*resource.Resource) } } - if rf, ok := ret.Get(1).(func(context.Context, string, resource.UpdateRequest) error); ok { - r1 = rf(ctx, urn, req) + if rf, ok := ret.Get(1).(func(context.Context, string, resource.UpdateRequest, ...core.Options) error); ok { + r1 = rf(ctx, urn, req, resourceOpts...) } else { r1 = ret.Error(1) } @@ -465,13 +504,21 @@ type ResourceService_UpdateResource_Call struct { // - ctx context.Context // - urn string // - req resource.UpdateRequest -func (_e *ResourceService_Expecter) UpdateResource(ctx interface{}, urn interface{}, req interface{}) *ResourceService_UpdateResource_Call { - return &ResourceService_UpdateResource_Call{Call: _e.mock.On("UpdateResource", ctx, urn, req)} +// - resourceOpts ...core.Options +func (_e *ResourceService_Expecter) UpdateResource(ctx interface{}, urn interface{}, req interface{}, resourceOpts ...interface{}) *ResourceService_UpdateResource_Call { + return &ResourceService_UpdateResource_Call{Call: _e.mock.On("UpdateResource", + append([]interface{}{ctx, urn, req}, resourceOpts...)...)} } -func (_c *ResourceService_UpdateResource_Call) Run(run func(ctx context.Context, urn string, req resource.UpdateRequest)) *ResourceService_UpdateResource_Call { +func (_c *ResourceService_UpdateResource_Call) Run(run func(ctx context.Context, urn string, req resource.UpdateRequest, resourceOpts ...core.Options)) *ResourceService_UpdateResource_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(resource.UpdateRequest)) + variadicArgs := make([]core.Options, len(args)-3) + for i, a := range args[3:] { + if a != nil { + variadicArgs[i] = a.(core.Options) + } + } + run(args[0].(context.Context), args[1].(string), args[2].(resource.UpdateRequest), variadicArgs...) }) return _c } @@ -481,7 +528,7 @@ func (_c *ResourceService_UpdateResource_Call) Return(_a0 *resource.Resource, _a return _c } -func (_c *ResourceService_UpdateResource_Call) RunAndReturn(run func(context.Context, string, resource.UpdateRequest) (*resource.Resource, error)) *ResourceService_UpdateResource_Call { +func (_c *ResourceService_UpdateResource_Call) RunAndReturn(run func(context.Context, string, resource.UpdateRequest, ...core.Options) (*resource.Resource, error)) *ResourceService_UpdateResource_Call { _c.Call.Return(run) return _c } diff --git a/internal/server/v1/resources/server.go b/internal/server/v1/resources/server.go index 869772d7..35a66efb 100644 --- a/internal/server/v1/resources/server.go +++ b/internal/server/v1/resources/server.go @@ -5,6 +5,7 @@ package resources import ( "context" + "github.com/goto/entropy/core" "github.com/goto/entropy/core/module" "github.com/goto/entropy/core/resource" "github.com/goto/entropy/internal/server/serverutils" @@ -14,11 +15,11 @@ import ( type ResourceService interface { GetResource(ctx context.Context, urn string) (*resource.Resource, error) ListResources(ctx context.Context, filter resource.Filter, withSpecConfigs bool) (resource.PagedResource, error) - CreateResource(ctx context.Context, res resource.Resource) (*resource.Resource, error) - UpdateResource(ctx context.Context, urn string, req resource.UpdateRequest) (*resource.Resource, error) + CreateResource(ctx context.Context, res resource.Resource, resourceOpts ...core.Options) (*resource.Resource, error) + UpdateResource(ctx context.Context, urn string, req resource.UpdateRequest, resourceOpts ...core.Options) (*resource.Resource, error) DeleteResource(ctx context.Context, urn string) error - ApplyAction(ctx context.Context, urn string, action module.ActionRequest) (*resource.Resource, error) + ApplyAction(ctx context.Context, urn string, action module.ActionRequest, resourceOpts ...core.Options) (*resource.Resource, error) GetLog(ctx context.Context, urn string, filter map[string]string) (<-chan module.LogChunk, error) GetRevisions(ctx context.Context, selector resource.RevisionsSelector) ([]resource.Revision, error) @@ -48,7 +49,7 @@ func (server APIServer) CreateResource(ctx context.Context, request *entropyv1be res.CreatedBy = userIdentifier res.UpdatedBy = userIdentifier - result, err := server.resourceSvc.CreateResource(ctx, *res) + result, err := server.resourceSvc.CreateResource(ctx, *res, core.WithDryRun(request.GetDryRun())) if err != nil { return nil, serverutils.ToRPCError(err) } @@ -80,7 +81,7 @@ func (server APIServer) UpdateResource(ctx context.Context, request *entropyv1be UserID: userIdentifier, } - res, err := server.resourceSvc.UpdateResource(ctx, request.GetUrn(), updateRequest) + res, err := server.resourceSvc.UpdateResource(ctx, request.GetUrn(), updateRequest, core.WithDryRun(request.GetDryRun())) if err != nil { return nil, serverutils.ToRPCError(err) } @@ -169,7 +170,7 @@ func (server APIServer) ApplyAction(ctx context.Context, request *entropyv1beta1 UserID: userIdentifier, } - updatedRes, err := server.resourceSvc.ApplyAction(ctx, request.GetUrn(), action) + updatedRes, err := server.resourceSvc.ApplyAction(ctx, request.GetUrn(), action, core.WithDryRun(request.GetDryRun())) if err != nil { return nil, serverutils.ToRPCError(err) } diff --git a/internal/server/v1/resources/server_test.go b/internal/server/v1/resources/server_test.go index ae1f8b2e..92f7ef46 100644 --- a/internal/server/v1/resources/server_test.go +++ b/internal/server/v1/resources/server_test.go @@ -17,6 +17,7 @@ import ( "google.golang.org/protobuf/types/known/structpb" "google.golang.org/protobuf/types/known/timestamppb" + "github.com/goto/entropy/core" "github.com/goto/entropy/core/resource" "github.com/goto/entropy/internal/server/v1/mocks" "github.com/goto/entropy/pkg/errors" @@ -44,7 +45,7 @@ func TestAPIServer_CreateResource(t *testing.T) { t.Helper() resourceService := &mocks.ResourceService{} resourceService.EXPECT(). - CreateResource(mock.Anything, mock.Anything). + CreateResource(mock.Anything, mock.Anything, core.WithDryRun(false)). Return(nil, errors.ErrConflict).Once() return NewAPIServer(resourceService) }, @@ -68,7 +69,7 @@ func TestAPIServer_CreateResource(t *testing.T) { t.Helper() resourceService := &mocks.ResourceService{} resourceService.EXPECT(). - CreateResource(mock.Anything, mock.Anything). + CreateResource(mock.Anything, mock.Anything, core.WithDryRun(false)). Return(nil, errors.ErrInvalid).Once() return NewAPIServer(resourceService) @@ -93,7 +94,7 @@ func TestAPIServer_CreateResource(t *testing.T) { t.Helper() resourceService := &mocks.ResourceService{} resourceService.EXPECT(). - CreateResource(mock.Anything, mock.Anything). + CreateResource(mock.Anything, mock.Anything, core.WithDryRun(false)). Return(&resource.Resource{ URN: "p-testdata-gl-testname-log", Kind: "log", @@ -189,7 +190,7 @@ func TestAPIServer_UpdateResource(t *testing.T) { t.Helper() resourceService := &mocks.ResourceService{} resourceService.EXPECT(). - UpdateResource(mock.Anything, "p-testdata-gl-testname-log", mock.Anything). + UpdateResource(mock.Anything, "p-testdata-gl-testname-log", mock.Anything, core.WithDryRun(false)). Return(nil, errors.ErrNotFound).Once() return NewAPIServer(resourceService) }, @@ -208,7 +209,7 @@ func TestAPIServer_UpdateResource(t *testing.T) { t.Helper() resourceService := &mocks.ResourceService{} resourceService.EXPECT(). - UpdateResource(mock.Anything, "p-testdata-gl-testname-log", mock.Anything). + UpdateResource(mock.Anything, "p-testdata-gl-testname-log", mock.Anything, core.WithDryRun(false)). Return(nil, errors.ErrInvalid).Once() return NewAPIServer(resourceService) }, @@ -227,7 +228,7 @@ func TestAPIServer_UpdateResource(t *testing.T) { t.Helper() resourceService := &mocks.ResourceService{} resourceService.EXPECT(). - UpdateResource(mock.Anything, "p-testdata-gl-testname-log", mock.Anything). + UpdateResource(mock.Anything, "p-testdata-gl-testname-log", mock.Anything, core.WithDryRun(false)). Return(&resource.Resource{ URN: "p-testdata-gl-testname-log", Kind: "log", @@ -455,7 +456,8 @@ func TestAPIServer_ListResources(t *testing.T) { Status: resource.StatusPending, }, }, - }}, nil).Once() + }, + }, nil).Once() return NewAPIServer(resourceService) }, @@ -592,7 +594,7 @@ func TestAPIServer_ApplyAction(t *testing.T) { t.Helper() resourceService := &mocks.ResourceService{} resourceService.EXPECT(). - ApplyAction(mock.Anything, "p-testdata-gl-testname-log", mock.Anything). + ApplyAction(mock.Anything, "p-testdata-gl-testname-log", mock.Anything, core.WithDryRun(false)). Return(nil, errors.ErrNotFound).Once() return NewAPIServer(resourceService) }, @@ -609,7 +611,7 @@ func TestAPIServer_ApplyAction(t *testing.T) { t.Helper() resourceService := &mocks.ResourceService{} resourceService.EXPECT(). - ApplyAction(mock.Anything, "p-testdata-gl-testname-log", mock.Anything). + ApplyAction(mock.Anything, "p-testdata-gl-testname-log", mock.Anything, core.WithDryRun(false)). Return(&resource.Resource{ URN: "p-testdata-gl-testname-log", Kind: "log", diff --git a/proto/entropy.swagger.yaml b/proto/entropy.swagger.yaml index 3c41a681..af46685d 100644 --- a/proto/entropy.swagger.yaml +++ b/proto/entropy.swagger.yaml @@ -170,6 +170,10 @@ paths: required: true schema: $ref: '#/definitions/Resource' + - name: dry_run + in: query + required: false + type: boolean tags: - ResourceService /v1beta1/resources/{urn}: @@ -237,6 +241,8 @@ paths: type: object additionalProperties: type: string + dry_run: + type: boolean tags: - ResourceService /v1beta1/resources/{urn}/actions/{action}: @@ -264,6 +270,10 @@ paths: in: body required: true schema: {} + - name: dry_run + in: query + required: false + type: boolean tags: - ResourceService /v1beta1/resources/{urn}/logs: @@ -457,7 +467,7 @@ definitions: `NullValue` is a singleton enumeration to represent the null value for the `Value` type union. - The JSON representation for `NullValue` is JSON `null`. + The JSON representation for `NullValue` is JSON `null`. - NULL_VALUE: Null value. Resource: diff --git a/proto/gotocompany/entropy/v1beta1/resource.pb.go b/proto/gotocompany/entropy/v1beta1/resource.pb.go index dcda79ad..85c9ddad 100644 --- a/proto/gotocompany/entropy/v1beta1/resource.pb.go +++ b/proto/gotocompany/entropy/v1beta1/resource.pb.go @@ -758,6 +758,7 @@ type CreateResourceRequest struct { unknownFields protoimpl.UnknownFields Resource *Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` + DryRun bool `protobuf:"varint,2,opt,name=dry_run,json=dryRun,proto3" json:"dry_run,omitempty"` } func (x *CreateResourceRequest) Reset() { @@ -799,6 +800,13 @@ func (x *CreateResourceRequest) GetResource() *Resource { return nil } +func (x *CreateResourceRequest) GetDryRun() bool { + if x != nil { + return x.DryRun + } + return false +} + type CreateResourceResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -854,6 +862,7 @@ type UpdateResourceRequest struct { Urn string `protobuf:"bytes,1,opt,name=urn,proto3" json:"urn,omitempty"` NewSpec *ResourceSpec `protobuf:"bytes,2,opt,name=new_spec,json=newSpec,proto3" json:"new_spec,omitempty"` Labels map[string]string `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + DryRun bool `protobuf:"varint,4,opt,name=dry_run,json=dryRun,proto3" json:"dry_run,omitempty"` } func (x *UpdateResourceRequest) Reset() { @@ -909,6 +918,13 @@ func (x *UpdateResourceRequest) GetLabels() map[string]string { return nil } +func (x *UpdateResourceRequest) GetDryRun() bool { + if x != nil { + return x.DryRun + } + return false +} + type UpdateResourceResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1050,6 +1066,7 @@ type ApplyActionRequest struct { Action string `protobuf:"bytes,2,opt,name=action,proto3" json:"action,omitempty"` Params *structpb.Value `protobuf:"bytes,3,opt,name=params,proto3" json:"params,omitempty"` Labels map[string]string `protobuf:"bytes,4,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + DryRun bool `protobuf:"varint,5,opt,name=dry_run,json=dryRun,proto3" json:"dry_run,omitempty"` } func (x *ApplyActionRequest) Reset() { @@ -1112,6 +1129,13 @@ func (x *ApplyActionRequest) GetLabels() map[string]string { return nil } +func (x *ApplyActionRequest) GetDryRun() bool { + if x != nil { + return x.DryRun + } + return false +} + type ApplyActionResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1646,216 +1670,220 @@ var file_gotocompany_entropy_v1beta1_resource_proto_rawDesc = []byte{ 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x5a, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x73, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x22, 0x5b, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, - 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, - 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x22, 0x82, 0x02, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, - 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6e, 0x12, 0x44, 0x0a, - 0x08, 0x6e, 0x65, 0x77, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x29, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, 0x6e, - 0x74, 0x72, 0x6f, 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x52, 0x07, 0x6e, 0x65, 0x77, 0x53, - 0x70, 0x65, 0x63, 0x12, 0x56, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, - 0x79, 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, - 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x5b, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x41, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, - 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x22, 0x29, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, - 0x75, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6e, 0x22, 0x18, - 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xfe, 0x01, 0x0a, 0x12, 0x41, 0x70, 0x70, - 0x6c, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, - 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x06, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x53, 0x0a, 0x06, 0x6c, 0x61, 0x62, - 0x65, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x67, 0x6f, 0x74, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x22, 0x5b, 0x0a, + 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x41, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39, - 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x58, 0x0a, 0x13, 0x41, 0x70, 0x70, - 0x6c, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x41, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, - 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x22, 0xa4, 0x01, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x43, 0x68, 0x75, 0x6e, 0x6b, - 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x12, 0x49, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x9b, 0x02, 0x0a, 0x15, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x75, 0x72, 0x6e, 0x12, 0x44, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x5f, 0x73, 0x70, + 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, + 0x70, 0x65, 0x63, 0x52, 0x07, 0x6e, 0x65, 0x77, 0x53, 0x70, 0x65, 0x63, 0x12, 0x56, 0x0a, 0x06, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x67, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x6f, + 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x1a, 0x39, 0x0a, + 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x5b, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x41, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x2e, 0x4c, 0x61, 0x62, 0x65, - 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, - 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xac, 0x01, 0x0a, 0x0d, 0x47, - 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, - 0x75, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6e, 0x12, 0x4e, - 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, - 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, 0x6e, 0x74, - 0x72, 0x6f, 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x1a, 0x39, - 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4d, 0x0a, 0x0e, 0x47, 0x65, 0x74, - 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x63, - 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x43, 0x68, 0x75, 0x6e, - 0x6b, 0x52, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x22, 0xf3, 0x02, 0x0a, 0x10, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, - 0x03, 0x75, 0x72, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6e, 0x12, - 0x51, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x39, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, 0x6e, - 0x74, 0x72, 0x6f, 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x4c, - 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, - 0x6c, 0x73, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x3d, 0x0a, - 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, + 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x29, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, + 0x0a, 0x03, 0x75, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6e, + 0x22, 0x18, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x97, 0x02, 0x0a, 0x12, 0x41, + 0x70, 0x70, 0x6c, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x75, 0x72, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x06, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x53, 0x0a, 0x06, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, - 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x16, 0x0a, 0x06, - 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, - 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x62, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x42, 0x79, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x2f, - 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x76, - 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, - 0x03, 0x75, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6e, 0x22, - 0x6b, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, - 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x4b, 0x0a, 0x09, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, - 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x09, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0x91, 0x0a, 0x0a, - 0x0f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x92, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x73, 0x12, 0x31, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, - 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, - 0x61, 0x6e, 0x79, 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x14, 0x12, 0x12, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x92, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2f, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, + 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x41, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x12, 0x17, 0x0a, 0x07, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x06, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0x58, 0x0a, 0x13, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x08, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, + 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, 0x6e, 0x74, 0x72, + 0x6f, 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xa4, + 0x01, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x49, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x31, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, 0x6e, + 0x74, 0x72, 0x6f, 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x6f, + 0x67, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, + 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xac, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6e, 0x12, 0x4e, 0x0a, 0x06, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x1a, 0x39, 0x0a, 0x0b, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4d, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, + 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x52, 0x05, 0x63, 0x68, + 0x75, 0x6e, 0x6b, 0x22, 0xf3, 0x02, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6e, 0x12, 0x51, 0x0a, 0x06, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x67, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x39, 0x0a, + 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x3d, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, - 0x12, 0x18, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x72, 0x6e, 0x7d, 0x12, 0x9f, 0x01, 0x0a, 0x0e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x32, 0x2e, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, + 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, + 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, + 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x1a, 0x39, + 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x2f, 0x0a, 0x1b, 0x47, 0x65, 0x74, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6e, 0x22, 0x6b, 0x0a, 0x1c, 0x47, 0x65, + 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x09, 0x72, 0x65, + 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, 0x6e, 0x74, 0x72, - 0x6f, 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x33, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, + 0x6f, 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, + 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0x91, 0x0a, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x92, 0x01, 0x0a, 0x0d, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x31, 0x2e, + 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, 0x6e, 0x74, 0x72, + 0x6f, 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x32, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, + 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, + 0x12, 0x92, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x12, 0x2f, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, + 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x30, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x3a, 0x08, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x12, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x9e, 0x01, 0x0a, - 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, - 0x32, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, 0x6e, - 0x74, 0x72, 0x6f, 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, - 0x79, 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, - 0x3a, 0x01, 0x2a, 0x32, 0x18, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x72, 0x6e, 0x7d, 0x12, 0x9b, 0x01, - 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x12, 0x32, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, - 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, - 0x6e, 0x79, 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x1a, 0x2a, 0x18, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x72, 0x6e, 0x7d, 0x12, 0xab, 0x01, 0x0a, 0x0b, - 0x41, 0x70, 0x70, 0x6c, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x2e, 0x67, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, - 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x67, + 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, + 0x7b, 0x75, 0x72, 0x6e, 0x7d, 0x12, 0x9f, 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x32, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x6f, - 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x3a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x29, + 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x3a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x22, 0x12, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x9e, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x32, 0x2e, 0x67, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, + 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, 0x6e, 0x74, + 0x72, 0x6f, 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x3a, 0x01, 0x2a, 0x32, 0x18, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x72, 0x6e, 0x7d, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x7b, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x12, 0x8a, 0x01, 0x0a, 0x06, 0x47, 0x65, - 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, - 0x6e, 0x79, 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2b, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, - 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x72, 0x6e, 0x7d, 0x2f, - 0x6c, 0x6f, 0x67, 0x73, 0x30, 0x01, 0x12, 0xb7, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x38, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, 0x6e, - 0x74, 0x72, 0x6f, 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x67, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x76, + 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x72, 0x6e, 0x7d, 0x12, 0x9b, 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x32, 0x2e, 0x67, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, + 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x33, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, 0x6e, + 0x74, 0x72, 0x6f, 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x2a, 0x18, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x2f, 0x7b, 0x75, 0x72, 0x6e, 0x7d, 0x2f, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x42, 0x77, 0x0a, 0x26, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, - 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x6f, - 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x14, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, - 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2f, 0x65, 0x6e, 0x74, 0x72, 0x6f, - 0x70, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x65, 0x6e, 0x74, 0x72, 0x6f, - 0x70, 0x79, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x2f, 0x7b, 0x75, 0x72, 0x6e, 0x7d, 0x12, 0xab, 0x01, 0x0a, 0x0b, 0x41, 0x70, 0x70, 0x6c, 0x79, + 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, + 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x33, 0x3a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x29, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, + 0x72, 0x6e, 0x7d, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x7d, 0x12, 0x8a, 0x01, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x12, + 0x2a, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, 0x6e, + 0x74, 0x72, 0x6f, 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x67, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, + 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, + 0x12, 0x1d, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x72, 0x6e, 0x7d, 0x2f, 0x6c, 0x6f, 0x67, 0x73, 0x30, + 0x01, 0x12, 0xb7, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x38, 0x2e, 0x67, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, + 0x6e, 0x79, 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, + 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x72, 0x6e, + 0x7d, 0x2f, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x77, 0x0a, 0x26, 0x63, + 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x14, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x74, 0x6f, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2f, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/gotocompany/entropy/v1beta1/resource.pb.gw.go b/proto/gotocompany/entropy/v1beta1/resource.pb.gw.go index 3f28d8ed..810745a5 100644 --- a/proto/gotocompany/entropy/v1beta1/resource.pb.gw.go +++ b/proto/gotocompany/entropy/v1beta1/resource.pb.gw.go @@ -119,6 +119,10 @@ func local_request_ResourceService_GetResource_0(ctx context.Context, marshaler } +var ( + filter_ResourceService_CreateResource_0 = &utilities.DoubleArray{Encoding: map[string]int{"resource": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}} +) + func request_ResourceService_CreateResource_0(ctx context.Context, marshaler runtime.Marshaler, client ResourceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq CreateResourceRequest var metadata runtime.ServerMetadata @@ -131,6 +135,13 @@ func request_ResourceService_CreateResource_0(ctx context.Context, marshaler run return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ResourceService_CreateResource_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.CreateResource(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err @@ -148,6 +159,13 @@ func local_request_ResourceService_CreateResource_0(ctx context.Context, marshal return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ResourceService_CreateResource_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.CreateResource(ctx, &protoReq) return msg, metadata, err diff --git a/proto/gotocompany/entropy/v1beta1/resource.pb.validate.go b/proto/gotocompany/entropy/v1beta1/resource.pb.validate.go index 6f4d787f..ee1882d9 100644 --- a/proto/gotocompany/entropy/v1beta1/resource.pb.validate.go +++ b/proto/gotocompany/entropy/v1beta1/resource.pb.validate.go @@ -1509,6 +1509,8 @@ func (m *CreateResourceRequest) validate(all bool) error { } } + // no validation rules for DryRun + if len(errors) > 0 { return CreateResourceRequestMultiError(errors) } @@ -1775,6 +1777,8 @@ func (m *UpdateResourceRequest) validate(all bool) error { // no validation rules for Labels + // no validation rules for DryRun + if len(errors) > 0 { return UpdateResourceRequestMultiError(errors) } @@ -2249,6 +2253,8 @@ func (m *ApplyActionRequest) validate(all bool) error { // no validation rules for Labels + // no validation rules for DryRun + if len(errors) > 0 { return ApplyActionRequestMultiError(errors) }