diff --git a/perxis-proto b/perxis-proto index f10336dc4a4f58111c12dd95afec82be18388803..2fd02d31a11e9c98547acc4f8416d17c5367411c 160000 --- a/perxis-proto +++ b/perxis-proto @@ -1 +1 @@ -Subproject commit f10336dc4a4f58111c12dd95afec82be18388803 +Subproject commit 2fd02d31a11e9c98547acc4f8416d17c5367411c diff --git a/pkg/spaces/middleware/access_logging_middleware.go b/pkg/spaces/middleware/access_logging_middleware.go index 5a21e84e7dcd6b5044e247a4c449003aaff5e182..9596d7d4fc2daa611a0db631eef56fe6d5531488 100644 --- a/pkg/spaces/middleware/access_logging_middleware.go +++ b/pkg/spaces/middleware/access_logging_middleware.go @@ -11,6 +11,7 @@ import ( "time" "git.perx.ru/perxis/perxis-go/pkg/auth" + "git.perx.ru/perxis/perxis-go/pkg/options" "git.perx.ru/perxis/perxis-go/pkg/spaces" "go.uber.org/zap" ) @@ -86,6 +87,27 @@ func (m *accessLoggingMiddleware) Delete(ctx context.Context, spaceId string) (e return err } +func (m *accessLoggingMiddleware) Find(ctx context.Context, filter *spaces.Filter, fo *options.FindOptions) (spaces []*spaces.Space, total int, err error) { + begin := time.Now() + + m.logger.Debug("Find.Request", + zap.Reflect("principal", auth.GetPrincipal(ctx)), + zap.Reflect("filter", filter), + zap.Reflect("fo", fo), + ) + + spaces, total, err = m.next.Find(ctx, filter, fo) + + m.logger.Debug("Find.Response", + zap.Duration("time", time.Since(begin)), + zap.Reflect("spaces", spaces), + zap.Reflect("total", total), + zap.Error(err), + ) + + return spaces, total, err +} + func (m *accessLoggingMiddleware) Get(ctx context.Context, spaceId string) (space *spaces.Space, err error) { begin := time.Now() diff --git a/pkg/spaces/middleware/caching_middleware.go b/pkg/spaces/middleware/caching_middleware.go index 97029a526f6fa701ed8d34090e52f4579214bcbe..03e220e2a86b8dfb563b0ef35085271cea4151c0 100644 --- a/pkg/spaces/middleware/caching_middleware.go +++ b/pkg/spaces/middleware/caching_middleware.go @@ -4,6 +4,7 @@ import ( "context" "git.perx.ru/perxis/perxis-go/pkg/cache" + "git.perx.ru/perxis/perxis-go/pkg/options" service "git.perx.ru/perxis/perxis-go/pkg/spaces" ) @@ -63,6 +64,10 @@ func (m cachingMiddleware) List(ctx context.Context, orgId string) (spaces []*se return spaces, err } +func (m cachingMiddleware) Find(ctx context.Context, filter *service.Filter, fo *options.FindOptions) (spaces []*service.Space, total int, err error) { + return m.next.Find(ctx, filter, fo) +} + func (m cachingMiddleware) Update(ctx context.Context, space *service.Space) (err error) { err = m.next.Update(ctx, space) diff --git a/pkg/spaces/middleware/error_logging_middleware.go b/pkg/spaces/middleware/error_logging_middleware.go index 0afa3eec8b1cec0319afedabcfaabcf7e4899119..677b48366b6304e47988578bcb694ad758ba3ab0 100644 --- a/pkg/spaces/middleware/error_logging_middleware.go +++ b/pkg/spaces/middleware/error_logging_middleware.go @@ -9,6 +9,7 @@ package middleware import ( "context" + "git.perx.ru/perxis/perxis-go/pkg/options" "git.perx.ru/perxis/perxis-go/pkg/spaces" "go.uber.org/zap" ) @@ -59,6 +60,16 @@ func (m *errorLoggingMiddleware) Delete(ctx context.Context, spaceId string) (er return m.next.Delete(ctx, spaceId) } +func (m *errorLoggingMiddleware) Find(ctx context.Context, filter *spaces.Filter, fo *options.FindOptions) (spaces []*spaces.Space, total int, err error) { + logger := m.logger + defer func() { + if err != nil { + logger.Warn("response error", zap.Error(err)) + } + }() + return m.next.Find(ctx, filter, fo) +} + func (m *errorLoggingMiddleware) Get(ctx context.Context, spaceId string) (space *spaces.Space, err error) { logger := m.logger defer func() { diff --git a/pkg/spaces/middleware/logging_middleware.go b/pkg/spaces/middleware/logging_middleware.go index 4c5852e1f882612baa919aa2ce3209a3f0e438b1..a45ec2df50923d480f9c94f3c2f26bf266121aff 100644 --- a/pkg/spaces/middleware/logging_middleware.go +++ b/pkg/spaces/middleware/logging_middleware.go @@ -5,6 +5,7 @@ import ( "fmt" "git.perx.ru/perxis/perxis-go/id" + "git.perx.ru/perxis/perxis-go/pkg/options" "git.perx.ru/perxis/perxis-go/pkg/spaces" logzap "git.perx.ru/perxis/perxis-go/zap" @@ -112,6 +113,20 @@ func (m *loggingMiddleware) List(ctx context.Context, orgId string) (spaces []*s return spaces, err } +func (m *loggingMiddleware) Find(ctx context.Context, filter *spaces.Filter, fo *options.FindOptions) (spaces []*spaces.Space, total int, err error) { + logger := m.logger.With( + logzap.Caller(ctx), + ) + + spaces, total, err = m.next.Find(ctx, filter, fo) + if err != nil { + logger.Error("Failed to find", zap.Error(err)) + return + } + + return spaces, total, err +} + func (m *loggingMiddleware) ListTransfers(ctx context.Context, orgID string) (spaces []*spaces.Space, err error) { logger := m.logger.With( logzap.Caller(ctx), diff --git a/pkg/spaces/middleware/middleware.go b/pkg/spaces/middleware/middleware.go index 15f2bc259beacd5ea312632ba042a33b59022f32..73c3b8c3538e6bf9a6457617afc35f68f429aaf3 100644 --- a/pkg/spaces/middleware/middleware.go +++ b/pkg/spaces/middleware/middleware.go @@ -21,7 +21,7 @@ func WithLog(s spaces.Spaces, logger *zap.Logger, log_access bool) spaces.Spaces if log_access { s = AccessLoggingMiddleware(logger)(s) } - s = LoggingMiddleware(logger)(s) + s = ErrorLoggingMiddleware(logger)(s) s = RecoveringMiddleware(logger)(s) return s diff --git a/pkg/spaces/middleware/recovering_middleware.go b/pkg/spaces/middleware/recovering_middleware.go index 162f9a4cd0aa6e4a5201dfdfb0c3b1ff0ab7b39f..cca581b6643b32bf21f31964aac200bb9613515d 100644 --- a/pkg/spaces/middleware/recovering_middleware.go +++ b/pkg/spaces/middleware/recovering_middleware.go @@ -10,6 +10,7 @@ import ( "context" "fmt" + "git.perx.ru/perxis/perxis-go/pkg/options" "git.perx.ru/perxis/perxis-go/pkg/spaces" "go.uber.org/zap" ) @@ -66,6 +67,18 @@ func (m *recoveringMiddleware) Delete(ctx context.Context, spaceId string) (err return m.next.Delete(ctx, spaceId) } +func (m *recoveringMiddleware) Find(ctx context.Context, filter *spaces.Filter, fo *options.FindOptions) (spaces []*spaces.Space, total int, err error) { + logger := m.logger + defer func() { + if r := recover(); r != nil { + logger.Error("panic", zap.Error(fmt.Errorf("%v", r))) + err = fmt.Errorf("%v", r) + } + }() + + return m.next.Find(ctx, filter, fo) +} + func (m *recoveringMiddleware) Get(ctx context.Context, spaceId string) (space *spaces.Space, err error) { logger := m.logger defer func() { diff --git a/pkg/spaces/middleware/telemetry_middleware.go b/pkg/spaces/middleware/telemetry_middleware.go index 38a47697e66d375629524faf47501218d08b759d..e9623692afe644e58cb1b406b4b06a3208edc710 100644 --- a/pkg/spaces/middleware/telemetry_middleware.go +++ b/pkg/spaces/middleware/telemetry_middleware.go @@ -12,6 +12,7 @@ import ( "context" "time" + "git.perx.ru/perxis/perxis-go/pkg/options" "git.perx.ru/perxis/perxis-go/pkg/spaces" "git.perx.ru/perxis/perxis-go/pkg/telemetry/metrics" "go.opentelemetry.io/otel" @@ -148,6 +149,42 @@ func (_d telemetryMiddleware) Delete(ctx context.Context, spaceId string) (err e return _d.Spaces.Delete(ctx, spaceId) } +// Find implements spaces.Spaces +func (_d telemetryMiddleware) Find(ctx context.Context, filter *spaces.Filter, fo *options.FindOptions) (spaces []*spaces.Space, total int, err error) { + attributes := otelmetric.WithAttributeSet(attribute.NewSet( + attribute.String("service", "Spaces"), + attribute.String("method", "Find"), + )) + + _d.requestMetrics.Total.Add(ctx, 1, attributes) + + start := time.Now() + ctx, _span := otel.Tracer(_d._instance).Start(ctx, "Spaces.Find") + + defer func() { + _d.requestMetrics.DurationMilliseconds.Record(ctx, time.Since(start).Milliseconds(), attributes) + + if _d._spanDecorator != nil { + _d._spanDecorator(_span, map[string]interface{}{ + "ctx": ctx, + "filter": filter, + "fo": fo}, map[string]interface{}{ + "spaces": spaces, + "total": total, + "err": err}) + } else if err != nil { + _d.requestMetrics.FailedTotal.Add(ctx, 1, attributes) + + _span.RecordError(err) + _span.SetAttributes(attribute.String("event", "error")) + _span.SetAttributes(attribute.String("message", err.Error())) + } + + _span.End() + }() + return _d.Spaces.Find(ctx, filter, fo) +} + // Get implements spaces.Spaces func (_d telemetryMiddleware) Get(ctx context.Context, spaceId string) (space *spaces.Space, err error) { attributes := otelmetric.WithAttributeSet(attribute.NewSet( diff --git a/pkg/spaces/mocks/Spaces.go b/pkg/spaces/mocks/Spaces.go index 5e67d52deeab49a82d05ee410c4711106c387cb7..76121895f428dbcd8aa8117f4a8e376845d81e0b 100644 --- a/pkg/spaces/mocks/Spaces.go +++ b/pkg/spaces/mocks/Spaces.go @@ -5,8 +5,10 @@ package mocks import ( context "context" - spaces "git.perx.ru/perxis/perxis-go/pkg/spaces" + options "git.perx.ru/perxis/perxis-go/pkg/options" mock "github.com/stretchr/testify/mock" + + spaces "git.perx.ru/perxis/perxis-go/pkg/spaces" ) // Spaces is an autogenerated mock type for the Spaces type @@ -80,6 +82,43 @@ func (_m *Spaces) Delete(ctx context.Context, spaceId string) error { return r0 } +// Find provides a mock function with given fields: ctx, filter, fo +func (_m *Spaces) Find(ctx context.Context, filter *spaces.Filter, fo *options.FindOptions) ([]*spaces.Space, int, error) { + ret := _m.Called(ctx, filter, fo) + + if len(ret) == 0 { + panic("no return value specified for Find") + } + + var r0 []*spaces.Space + var r1 int + var r2 error + if rf, ok := ret.Get(0).(func(context.Context, *spaces.Filter, *options.FindOptions) ([]*spaces.Space, int, error)); ok { + return rf(ctx, filter, fo) + } + if rf, ok := ret.Get(0).(func(context.Context, *spaces.Filter, *options.FindOptions) []*spaces.Space); ok { + r0 = rf(ctx, filter, fo) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*spaces.Space) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *spaces.Filter, *options.FindOptions) int); ok { + r1 = rf(ctx, filter, fo) + } else { + r1 = ret.Get(1).(int) + } + + if rf, ok := ret.Get(2).(func(context.Context, *spaces.Filter, *options.FindOptions) error); ok { + r2 = rf(ctx, filter, fo) + } else { + r2 = ret.Error(2) + } + + return r0, r1, r2 +} + // Get provides a mock function with given fields: ctx, spaceId func (_m *Spaces) Get(ctx context.Context, spaceId string) (*spaces.Space, error) { ret := _m.Called(ctx, spaceId) diff --git a/pkg/spaces/service.go b/pkg/spaces/service.go index 1877e468a70e3145b9289c685a129739ba29e01b..e8baf1851b57f8ed95fda4f2467489c053cf4a78 100644 --- a/pkg/spaces/service.go +++ b/pkg/spaces/service.go @@ -5,6 +5,7 @@ import ( "time" "git.perx.ru/perxis/perxis-go/pkg/errors" + "git.perx.ru/perxis/perxis-go/pkg/options" "github.com/avast/retry-go/v4" ) @@ -26,6 +27,7 @@ type Spaces interface { Create(ctx context.Context, space *Space) (created *Space, err error) Get(ctx context.Context, spaceId string) (space *Space, err error) List(ctx context.Context, orgId string) (spaces []*Space, err error) + Find(ctx context.Context, filter *Filter, fo *options.FindOptions) (spaces []*Space, total int, err error) Update(ctx context.Context, space *Space) (err error) UpdateConfig(ctx context.Context, spaceId string, config *Config) (err error) diff --git a/pkg/spaces/transport/client.go b/pkg/spaces/transport/client.go index f7f2edcd2b04d986c03720966b7c677c3ac6be2d..52a30a561eb51812831f15b26c1b1665691ee6d3 100644 --- a/pkg/spaces/transport/client.go +++ b/pkg/spaces/transport/client.go @@ -5,6 +5,7 @@ package transport import ( "context" + "git.perx.ru/perxis/perxis-go/pkg/options" spaces "git.perx.ru/perxis/perxis-go/pkg/spaces" ) @@ -35,6 +36,15 @@ func (set EndpointsSet) List(arg0 context.Context, arg1 string) (res0 []*spaces. return response.(*ListResponse).Spaces, res1 } +func (set EndpointsSet) Find(arg0 context.Context, arg1 *spaces.Filter, arg2 *options.FindOptions) (res0 []*spaces.Space, res1 int, res2 error) { + request := FindRequest{Filter: arg1, Options: arg2} + response, res2 := set.FindEndpoint(arg0, &request) + if res2 != nil { + return + } + return response.(*FindResponse).Spaces, response.(*FindResponse).Total, res2 +} + func (set EndpointsSet) Update(arg0 context.Context, arg1 *spaces.Space) (res0 error) { request := UpdateRequest{Space: arg1} _, res0 = set.UpdateEndpoint(arg0, &request) diff --git a/pkg/spaces/transport/endpoints.microgen.go b/pkg/spaces/transport/endpoints.microgen.go index 335f9ca4f52a6378f41563733e4b6f4f84b77d4c..8ab541ba98b0a4475addcd7e6e7dd4f7c1f2ed2d 100644 --- a/pkg/spaces/transport/endpoints.microgen.go +++ b/pkg/spaces/transport/endpoints.microgen.go @@ -9,6 +9,7 @@ type EndpointsSet struct { CreateEndpoint endpoint.Endpoint GetEndpoint endpoint.Endpoint ListEndpoint endpoint.Endpoint + FindEndpoint endpoint.Endpoint UpdateEndpoint endpoint.Endpoint UpdateConfigEndpoint endpoint.Endpoint DeleteEndpoint endpoint.Endpoint diff --git a/pkg/spaces/transport/exchanges.microgen.go b/pkg/spaces/transport/exchanges.microgen.go index 414ec9702c29fc0bef9fe84f728d1deaa816667a..5fe6cfbad14530dc543091ea0df0dc960f75a023 100644 --- a/pkg/spaces/transport/exchanges.microgen.go +++ b/pkg/spaces/transport/exchanges.microgen.go @@ -2,7 +2,10 @@ package transport -import spaces "git.perx.ru/perxis/perxis-go/pkg/spaces" +import ( + "git.perx.ru/perxis/perxis-go/pkg/options" + spaces "git.perx.ru/perxis/perxis-go/pkg/spaces" +) type ( CreateRequest struct { @@ -26,6 +29,15 @@ type ( Spaces []*spaces.Space `json:"spaces"` } + FindRequest struct { + Filter *spaces.Filter `json:"filter"` + Options *options.FindOptions `json:"options"` + } + FindResponse struct { + Spaces []*spaces.Space `json:"spaces"` + Total int `json:"total"` + } + UpdateRequest struct { Space *spaces.Space `json:"space"` } diff --git a/pkg/spaces/transport/grpc/client.go b/pkg/spaces/transport/grpc/client.go index 67e3f4019f1b1351d9985403ed39f17912913625..a4c431a7d80e0953a46fb9e7048ef63fa8f31a93 100644 --- a/pkg/spaces/transport/grpc/client.go +++ b/pkg/spaces/transport/grpc/client.go @@ -15,6 +15,7 @@ func NewClient(conn *grpc.ClientConn, opts ...grpckit.ClientOption) transport.En CreateEndpoint: grpcerr.ClientMiddleware(c.CreateEndpoint), GetEndpoint: grpcerr.ClientMiddleware(c.GetEndpoint), ListEndpoint: grpcerr.ClientMiddleware(c.ListEndpoint), + FindEndpoint: grpcerr.ClientMiddleware(c.FindEndpoint), UpdateEndpoint: grpcerr.ClientMiddleware(c.UpdateEndpoint), UpdateConfigEndpoint: grpcerr.ClientMiddleware(c.UpdateConfigEndpoint), DeleteEndpoint: grpcerr.ClientMiddleware(c.DeleteEndpoint), diff --git a/pkg/spaces/transport/grpc/client.microgen.go b/pkg/spaces/transport/grpc/client.microgen.go index 9a92bde894407be7520aa0f27a2112c5f4294cf0..1e7095cd261f03111fafaafc361ca49b7f12cb70 100644 --- a/pkg/spaces/transport/grpc/client.microgen.go +++ b/pkg/spaces/transport/grpc/client.microgen.go @@ -50,6 +50,13 @@ func NewGRPCClient(conn *grpc.ClientConn, addr string, opts ...grpckit.ClientOpt pb.ListResponse{}, opts..., ).Endpoint(), + FindEndpoint: grpckit.NewClient( + conn, addr, "Find", + _Encode_Find_Request, + _Decode_Find_Response, + pb.FindResponse{}, + opts..., + ).Endpoint(), ListTransfersEndpoint: grpckit.NewClient( conn, addr, "ListTransfers", _Encode_ListTransfers_Request, diff --git a/pkg/spaces/transport/grpc/protobuf_endpoint_converters.microgen.go b/pkg/spaces/transport/grpc/protobuf_endpoint_converters.microgen.go index efe05ac83e9006e3d8345d25beca40fa0f4187ac..6797cc200801de828c8cefe14c085280188a6a75 100644 --- a/pkg/spaces/transport/grpc/protobuf_endpoint_converters.microgen.go +++ b/pkg/spaces/transport/grpc/protobuf_endpoint_converters.microgen.go @@ -7,6 +7,7 @@ import ( "context" "errors" + transportgrpc "git.perx.ru/perxis/perxis-go/pkg/items/transport/grpc" transport "git.perx.ru/perxis/perxis-go/pkg/spaces/transport" pb "git.perx.ru/perxis/perxis-go/proto/spaces" empty "google.golang.org/protobuf/types/known/emptypb" @@ -40,6 +41,22 @@ func _Encode_List_Request(ctx context.Context, request interface{}) (interface{} return &pb.ListRequest{OrgId: req.OrgId}, nil } +func _Encode_Find_Request(ctx context.Context, request interface{}) (interface{}, error) { + if request == nil { + return nil, errors.New("nil FindRequest") + } + req := request.(*transport.FindRequest) + reqFilter, err := SpaceFilterToProto(req.Filter) + if err != nil { + return nil, err + } + reqOptions, err := transportgrpc.PtrServicesFindOptionsToProto(req.Options) + if err != nil { + return nil, err + } + return &pb.FindRequest{Filter: reqFilter, Options: reqOptions}, nil +} + func _Encode_Update_Request(ctx context.Context, request interface{}) (interface{}, error) { if request == nil { return nil, errors.New("nil UpdateRequest") @@ -111,6 +128,18 @@ func _Encode_List_Response(ctx context.Context, response interface{}) (interface return &pb.ListResponse{Spaces: respSpaces}, nil } +func _Encode_Find_Response(ctx context.Context, response interface{}) (interface{}, error) { + if response == nil { + return nil, errors.New("nil FindResponse") + } + resp := response.(*transport.FindResponse) + respSpaces, err := ListPtrSpaceToProto(resp.Spaces) + if err != nil { + return nil, err + } + return &pb.FindResponse{Spaces: respSpaces, Total: int32(resp.Total)}, nil +} + func _Encode_Update_Response(ctx context.Context, response interface{}) (interface{}, error) { return &empty.Empty{}, nil } @@ -151,6 +180,24 @@ func _Decode_List_Request(ctx context.Context, request interface{}) (interface{} return &transport.ListRequest{OrgId: string(req.OrgId)}, nil } +func _Decode_Find_Request(ctx context.Context, request interface{}) (interface{}, error) { + if request == nil { + return nil, errors.New("nil FindRequest") + } + req := request.(*pb.FindRequest) + + opts, err := transportgrpc.ProtoToPtrServicesFindOptions(req.Options) + if err != nil { + return nil, err + } + filter, err := ProtoToPtrSpaceFilter(req.Filter) + if err != nil { + return nil, err + } + + return &transport.FindRequest{Filter: filter, Options: opts}, nil +} + func _Decode_Update_Request(ctx context.Context, request interface{}) (interface{}, error) { if request == nil { return nil, errors.New("nil UpdateRequest") @@ -222,6 +269,18 @@ func _Decode_List_Response(ctx context.Context, response interface{}) (interface return &transport.ListResponse{Spaces: respSpaces}, nil } +func _Decode_Find_Response(ctx context.Context, response interface{}) (interface{}, error) { + if response == nil { + return nil, errors.New("nil FindResponse") + } + resp := response.(*pb.FindResponse) + respSpaces, err := ProtoToListPtrSpace(resp.Spaces) + if err != nil { + return nil, err + } + return &transport.FindResponse{Spaces: respSpaces, Total: int(resp.Total)}, nil +} + func _Decode_Update_Response(ctx context.Context, response interface{}) (interface{}, error) { return &empty.Empty{}, nil } diff --git a/pkg/spaces/transport/grpc/protobuf_type_converters.microgen.go b/pkg/spaces/transport/grpc/protobuf_type_converters.microgen.go index 70081af310c72b62f2cc1a7ac0bc32fed007ac60..d7231bdba357885b1506b3f5d2301149feb8cd5a 100644 --- a/pkg/spaces/transport/grpc/protobuf_type_converters.microgen.go +++ b/pkg/spaces/transport/grpc/protobuf_type_converters.microgen.go @@ -108,3 +108,41 @@ func ProtoToListPtrSpace(protoSpaces []*pb.Space) ([]*service.Space, error) { } return spaces, nil } + +func ProtoToPtrSpaceFilter(protoSpaceFilter *pb.Filter) (*service.Filter, error) { + if protoSpaceFilter == nil { + return nil, nil + } + var srvState []service.State + if len(protoSpaceFilter.State) != 0 { + for _, state := range protoSpaceFilter.State { + srvState = append(srvState, service.State(state)) + } + } + return &service.Filter{ + ID: protoSpaceFilter.Id, + OrgID: protoSpaceFilter.OrgId, + Name: protoSpaceFilter.Name, + State: srvState, + TransferToOrg: protoSpaceFilter.TransferToOrg, + }, nil +} + +func SpaceFilterToProto(spaceFilter *service.Filter) (*pb.Filter, error) { + if spaceFilter == nil { + return nil, nil + } + var pbState []pb.State + if len(spaceFilter.State) != 0 { + for _, state := range spaceFilter.State { + pbState = append(pbState, pb.State(state)) + } + } + return &pb.Filter{ + Id: spaceFilter.ID, + OrgId: spaceFilter.OrgID, + Name: spaceFilter.Name, + State: pbState, + TransferToOrg: spaceFilter.TransferToOrg, + }, nil +} diff --git a/pkg/spaces/transport/grpc/server.go b/pkg/spaces/transport/grpc/server.go index 8819d2a3637ae8bc1b3820b1e8cb110580a9b37f..01574994044d527046ad6f33ac631c37bbb03e1f 100644 --- a/pkg/spaces/transport/grpc/server.go +++ b/pkg/spaces/transport/grpc/server.go @@ -14,6 +14,7 @@ func NewServer(svc spaces.Spaces, opts ...grpckit.ServerOption) pb.SpacesServer CreateEndpoint: grpcerr.ServerMiddleware(eps.CreateEndpoint), GetEndpoint: grpcerr.ServerMiddleware(eps.GetEndpoint), ListEndpoint: grpcerr.ServerMiddleware(eps.ListEndpoint), + FindEndpoint: grpcerr.ServerMiddleware(eps.FindEndpoint), UpdateEndpoint: grpcerr.ServerMiddleware(eps.UpdateEndpoint), UpdateConfigEndpoint: grpcerr.ServerMiddleware(eps.UpdateConfigEndpoint), DeleteEndpoint: grpcerr.ServerMiddleware(eps.DeleteEndpoint), diff --git a/pkg/spaces/transport/grpc/server.microgen.go b/pkg/spaces/transport/grpc/server.microgen.go index bf33dbbeea79339df43617ab97f460ca27d927b4..2a39455033e628b9ac7766b6057575793e2f8f6c 100644 --- a/pkg/spaces/transport/grpc/server.microgen.go +++ b/pkg/spaces/transport/grpc/server.microgen.go @@ -15,6 +15,7 @@ type spacesServer struct { create grpc.Handler get grpc.Handler list grpc.Handler + find grpc.Handler update grpc.Handler updateConfig grpc.Handler delete grpc.Handler @@ -58,6 +59,12 @@ func NewGRPCServer(endpoints *transport.EndpointsSet, opts ...grpc.ServerOption) _Encode_List_Response, opts..., ), + find: grpc.NewServer( + endpoints.FindEndpoint, + _Decode_Find_Request, + _Encode_Find_Response, + opts..., + ), listTransfers: grpc.NewServer( endpoints.ListTransfersEndpoint, _Decode_ListTransfers_Request, @@ -115,6 +122,14 @@ func (S *spacesServer) List(ctx context.Context, req *pb.ListRequest) (*pb.ListR return resp.(*pb.ListResponse), nil } +func (S *spacesServer) Find(ctx context.Context, req *pb.FindRequest) (*pb.FindResponse, error) { + _, resp, err := S.find.ServeGRPC(ctx, req) + if err != nil { + return nil, err + } + return resp.(*pb.FindResponse), nil +} + func (S *spacesServer) Update(ctx context.Context, req *pb.UpdateRequest) (*empty.Empty, error) { _, resp, err := S.update.ServeGRPC(ctx, req) if err != nil { diff --git a/pkg/spaces/transport/server.microgen.go b/pkg/spaces/transport/server.microgen.go index 60a07de0bf59846a2695f3c7625b3565044e823b..ece65a8fefe877cb031a9dc7854c141d3545d8fe 100644 --- a/pkg/spaces/transport/server.microgen.go +++ b/pkg/spaces/transport/server.microgen.go @@ -16,6 +16,7 @@ func Endpoints(svc spaces.Spaces) EndpointsSet { DeleteEndpoint: DeleteEndpoint(svc), GetEndpoint: GetEndpoint(svc), ListEndpoint: ListEndpoint(svc), + FindEndpoint: FindEndpoint(svc), ListTransfersEndpoint: ListTransfersEndpoint(svc), MoveEndpoint: MoveEndpoint(svc), TransferEndpoint: TransferEndpoint(svc), @@ -48,6 +49,14 @@ func ListEndpoint(svc spaces.Spaces) endpoint.Endpoint { } } +func FindEndpoint(svc spaces.Spaces) endpoint.Endpoint { + return func(arg0 context.Context, request interface{}) (interface{}, error) { + req := request.(*FindRequest) + res0, res1, res2 := svc.Find(arg0, req.Filter, req.Options) + return &FindResponse{Spaces: res0, Total: res1}, res2 + } +} + func UpdateEndpoint(svc spaces.Spaces) endpoint.Endpoint { return func(arg0 context.Context, request interface{}) (interface{}, error) { req := request.(*UpdateRequest) diff --git a/proto/spaces/spaces.pb.go b/proto/spaces/spaces.pb.go index aedef2c39158d62f2fb08844c27c9c7f0fac6cb1..e80bef129a6d77ce0a3c9306f9d5fc3af7785ee8 100644 --- a/proto/spaces/spaces.pb.go +++ b/proto/spaces/spaces.pb.go @@ -7,6 +7,7 @@ package spaces import ( + common "git.perx.ru/perxis/perxis-go/proto/common" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" emptypb "google.golang.org/protobuf/types/known/emptypb" @@ -991,6 +992,197 @@ func (x *MoveRequest) GetOrgId() string { return "" } +type Filter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id []string `protobuf:"bytes,1,rep,name=id,proto3" json:"id,omitempty"` // СпиÑок ID проÑтранÑтв + OrgId []string `protobuf:"bytes,2,rep,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` // СпиÑок организаций + Name []string `protobuf:"bytes,3,rep,name=name,proto3" json:"name,omitempty"` // СпиÑок названий + State []State `protobuf:"varint,4,rep,packed,name=state,proto3,enum=content.spaces.State" json:"state,omitempty"` // СпиÑок ÑоÑтоÑний + TransferToOrg []string `protobuf:"bytes,5,rep,name=transfer_to_org,json=transferToOrg,proto3" json:"transfer_to_org,omitempty"` // СпиÑок организаций, в которые запрошен Ð¿ÐµÑ€ÐµÐ½Ð¾Ñ Ð¿Ñ€Ð¾ÑтранÑтва +} + +func (x *Filter) Reset() { + *x = Filter{} + if protoimpl.UnsafeEnabled { + mi := &file_spaces_spaces_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Filter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Filter) ProtoMessage() {} + +func (x *Filter) ProtoReflect() protoreflect.Message { + mi := &file_spaces_spaces_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Filter.ProtoReflect.Descriptor instead. +func (*Filter) Descriptor() ([]byte, []int) { + return file_spaces_spaces_proto_rawDescGZIP(), []int{17} +} + +func (x *Filter) GetId() []string { + if x != nil { + return x.Id + } + return nil +} + +func (x *Filter) GetOrgId() []string { + if x != nil { + return x.OrgId + } + return nil +} + +func (x *Filter) GetName() []string { + if x != nil { + return x.Name + } + return nil +} + +func (x *Filter) GetState() []State { + if x != nil { + return x.State + } + return nil +} + +func (x *Filter) GetTransferToOrg() []string { + if x != nil { + return x.TransferToOrg + } + return nil +} + +type FindRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Фильтры Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка + Filter *Filter `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` + // Опции поиÑка + Options *common.FindOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` +} + +func (x *FindRequest) Reset() { + *x = FindRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_spaces_spaces_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindRequest) ProtoMessage() {} + +func (x *FindRequest) ProtoReflect() protoreflect.Message { + mi := &file_spaces_spaces_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FindRequest.ProtoReflect.Descriptor instead. +func (*FindRequest) Descriptor() ([]byte, []int) { + return file_spaces_spaces_proto_rawDescGZIP(), []int{18} +} + +func (x *FindRequest) GetFilter() *Filter { + if x != nil { + return x.Filter + } + return nil +} + +func (x *FindRequest) GetOptions() *common.FindOptions { + if x != nil { + return x.Options + } + return nil +} + +type FindResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Spaces []*Space `protobuf:"bytes,1,rep,name=spaces,proto3" json:"spaces,omitempty"` + Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` +} + +func (x *FindResponse) Reset() { + *x = FindResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_spaces_spaces_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindResponse) ProtoMessage() {} + +func (x *FindResponse) ProtoReflect() protoreflect.Message { + mi := &file_spaces_spaces_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FindResponse.ProtoReflect.Descriptor instead. +func (*FindResponse) Descriptor() ([]byte, []int) { + return file_spaces_spaces_proto_rawDescGZIP(), []int{19} +} + +func (x *FindResponse) GetSpaces() []*Space { + if x != nil { + return x.Spaces + } + return nil +} + +func (x *FindResponse) GetTotal() int32 { + if x != nil { + return x.Total + } + return 0 +} + var File_spaces_spaces_proto protoreflect.FileDescriptor var file_spaces_spaces_proto_rawDesc = []byte{ @@ -1000,148 +1192,176 @@ var file_spaces_spaces_proto_rawDesc = []byte{ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xa3, 0x02, 0x0a, 0x05, 0x53, 0x70, 0x61, 0x63, 0x65, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x15, 0x0a, - 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, - 0x72, 0x67, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x05, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x66, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6f, 0x72, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x6f, 0x4f, 0x72, 0x67, 0x12, - 0x2e, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x16, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, - 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, - 0x38, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x9b, 0x01, 0x0a, 0x09, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x62, 0x5f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x64, 0x62, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 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, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x24, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x22, 0x3c, 0x0a, - 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, + 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa3, 0x02, 0x0a, 0x05, 0x53, 0x70, 0x61, + 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x2b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, + 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x26, 0x0a, 0x0f, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6f, 0x72, 0x67, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, + 0x6f, 0x4f, 0x72, 0x67, 0x12, 0x2e, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x38, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x6e, + 0x66, 0x6f, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x9b, + 0x01, 0x0a, 0x09, 0x53, 0x74, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2b, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x6e, 0x66, + 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x0a, + 0x0a, 0x64, 0x62, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x09, 0x64, 0x62, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x04, + 0x74, 0x69, 0x6d, 0x65, 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, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x24, 0x0a, 0x06, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x73, 0x22, 0x3c, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x73, 0x2e, 0x53, 0x70, 0x61, 0x63, 0x65, 0x52, 0x05, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x22, 0x41, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x73, 0x2e, 0x53, 0x70, 0x61, 0x63, 0x65, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x22, 0x27, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x22, 0x3a, 0x0a, 0x0b, + 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x05, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x53, 0x70, 0x61, 0x63, + 0x65, 0x52, 0x05, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x24, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x22, 0x3d, + 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, + 0x0a, 0x06, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, + 0x53, 0x70, 0x61, 0x63, 0x65, 0x52, 0x06, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x22, 0x3c, 0x0a, + 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x53, - 0x70, 0x61, 0x63, 0x65, 0x52, 0x05, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x41, 0x0a, 0x0e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, - 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, - 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, - 0x53, 0x70, 0x61, 0x63, 0x65, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x22, 0x27, - 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, + 0x70, 0x61, 0x63, 0x65, 0x52, 0x05, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x60, 0x0a, 0x13, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x2e, 0x0a, + 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x2a, 0x0a, + 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, + 0x0a, 0x08, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x22, 0x54, 0x0a, 0x0f, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x22, 0x3a, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x05, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x53, 0x70, 0x61, 0x63, 0x65, 0x52, 0x05, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x22, 0x24, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x22, 0x3d, 0x0a, 0x0c, 0x4c, 0x69, 0x73, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x53, 0x70, 0x61, 0x63, 0x65, - 0x52, 0x06, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x22, 0x3c, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x53, 0x70, 0x61, 0x63, 0x65, 0x52, - 0x05, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x60, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, - 0x08, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x2a, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x49, 0x64, 0x22, 0x54, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6f, 0x72, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x6f, 0x4f, 0x72, 0x67, 0x22, + 0x31, 0x0a, 0x14, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x5f, 0x74, - 0x6f, 0x5f, 0x6f, 0x72, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x6f, 0x4f, 0x72, 0x67, 0x22, 0x31, 0x0a, 0x14, 0x41, 0x62, - 0x6f, 0x72, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x22, 0x2d, 0x0a, - 0x14, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x22, 0x46, 0x0a, 0x15, - 0x4c, 0x69, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x53, 0x70, 0x61, 0x63, 0x65, 0x52, 0x06, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x73, 0x22, 0x3f, 0x0a, 0x0b, 0x4d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x15, - 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x6f, 0x72, 0x67, 0x49, 0x64, 0x2a, 0x70, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0b, - 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x4e, - 0x45, 0x57, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, 0x41, 0x44, 0x59, 0x10, 0x02, 0x12, - 0x0d, 0x0a, 0x09, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x0f, - 0x0a, 0x0b, 0x4d, 0x41, 0x49, 0x4e, 0x54, 0x45, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x04, 0x12, - 0x0d, 0x0a, 0x09, 0x4d, 0x49, 0x47, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x05, 0x12, 0x0c, - 0x0a, 0x08, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x06, 0x12, 0x09, 0x0a, 0x05, - 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x07, 0x32, 0xe6, 0x05, 0x0a, 0x06, 0x53, 0x70, 0x61, 0x63, - 0x65, 0x73, 0x12, 0x49, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x1d, 0x2e, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x40, 0x0a, - 0x03, 0x47, 0x65, 0x74, 0x12, 0x1a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x43, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x1d, + 0x49, 0x64, 0x22, 0x2d, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, + 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, + 0x64, 0x22, 0x46, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, + 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x53, 0x70, 0x61, 0x63, + 0x65, 0x52, 0x06, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x22, 0x3f, 0x0a, 0x0b, 0x4d, 0x6f, 0x76, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x22, 0x98, 0x01, 0x0a, 0x06, 0x46, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x2b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0e, 0x32, + 0x15, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x26, 0x0a, + 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6f, 0x72, 0x67, + 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, + 0x54, 0x6f, 0x4f, 0x72, 0x67, 0x22, 0x6c, 0x0a, 0x0b, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x06, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x46, + 0x69, 0x6e, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x22, 0x53, 0x0a, 0x0c, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x73, 0x2e, 0x53, 0x70, 0x61, 0x63, 0x65, 0x52, 0x06, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x2a, 0x70, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x07, + 0x0a, 0x03, 0x4e, 0x45, 0x57, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, 0x41, 0x44, 0x59, + 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x49, 0x4e, 0x47, 0x10, + 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x4d, 0x41, 0x49, 0x4e, 0x54, 0x45, 0x4e, 0x41, 0x4e, 0x43, 0x45, + 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x4d, 0x49, 0x47, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, + 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x06, 0x12, + 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x07, 0x32, 0xab, 0x06, 0x0a, 0x06, 0x53, + 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x49, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, + 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x23, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x08, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, - 0x12, 0x4f, 0x0a, 0x0d, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, - 0x72, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x73, 0x2e, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x40, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x1a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x43, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1b, 0x2e, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x04, 0x46, 0x69, 0x6e, 0x64, 0x12, + 0x1b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, + 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x46, 0x69, + 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x06, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, + 0x4d, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x23, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x41, + 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, - 0x00, 0x12, 0x5e, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, - 0x72, 0x73, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x3d, 0x0a, 0x04, 0x4d, 0x6f, 0x76, 0x65, 0x12, 0x1b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x4d, 0x6f, 0x76, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, - 0x42, 0x32, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x2e, 0x70, 0x65, 0x72, 0x78, 0x2e, 0x72, 0x75, 0x2f, - 0x70, 0x65, 0x72, 0x78, 0x69, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x78, 0x69, 0x73, 0x2d, 0x67, 0x6f, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x3b, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x00, 0x12, 0x45, 0x0a, 0x08, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x1f, 0x2e, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x0d, 0x41, 0x62, 0x6f, 0x72, + 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x41, 0x62, 0x6f, 0x72, 0x74, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x5e, 0x0a, 0x0d, 0x4c, 0x69, 0x73, + 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x04, 0x4d, 0x6f, 0x76, + 0x65, 0x12, 0x1b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x73, 0x2e, 0x4d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x42, 0x32, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x2e, + 0x70, 0x65, 0x72, 0x78, 0x2e, 0x72, 0x75, 0x2f, 0x70, 0x65, 0x72, 0x78, 0x69, 0x73, 0x2f, 0x70, + 0x65, 0x72, 0x78, 0x69, 0x73, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x73, 0x3b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1157,7 +1377,7 @@ func file_spaces_spaces_proto_rawDescGZIP() []byte { } var file_spaces_spaces_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_spaces_spaces_proto_msgTypes = make([]protoimpl.MessageInfo, 17) +var file_spaces_spaces_proto_msgTypes = make([]protoimpl.MessageInfo, 20) var file_spaces_spaces_proto_goTypes = []interface{}{ (State)(0), // 0: content.spaces.State (*Space)(nil), // 1: content.spaces.Space @@ -1177,15 +1397,19 @@ var file_spaces_spaces_proto_goTypes = []interface{}{ (*ListTransfersRequest)(nil), // 15: content.spaces.ListTransfersRequest (*ListTransfersResponse)(nil), // 16: content.spaces.ListTransfersResponse (*MoveRequest)(nil), // 17: content.spaces.MoveRequest - (*timestamppb.Timestamp)(nil), // 18: google.protobuf.Timestamp - (*emptypb.Empty)(nil), // 19: google.protobuf.Empty + (*Filter)(nil), // 18: content.spaces.Filter + (*FindRequest)(nil), // 19: content.spaces.FindRequest + (*FindResponse)(nil), // 20: content.spaces.FindResponse + (*timestamppb.Timestamp)(nil), // 21: google.protobuf.Timestamp + (*common.FindOptions)(nil), // 22: common.FindOptions + (*emptypb.Empty)(nil), // 23: google.protobuf.Empty } var file_spaces_spaces_proto_depIdxs = []int32{ 0, // 0: content.spaces.Space.state:type_name -> content.spaces.State 3, // 1: content.spaces.Space.config:type_name -> content.spaces.Config 2, // 2: content.spaces.Space.state_info:type_name -> content.spaces.StateInfo 0, // 3: content.spaces.StateInfo.state:type_name -> content.spaces.State - 18, // 4: content.spaces.StateInfo.time:type_name -> google.protobuf.Timestamp + 21, // 4: content.spaces.StateInfo.time:type_name -> google.protobuf.Timestamp 1, // 5: content.spaces.CreateRequest.space:type_name -> content.spaces.Space 1, // 6: content.spaces.CreateResponse.created:type_name -> content.spaces.Space 1, // 7: content.spaces.GetResponse.space:type_name -> content.spaces.Space @@ -1193,31 +1417,37 @@ var file_spaces_spaces_proto_depIdxs = []int32{ 1, // 9: content.spaces.UpdateRequest.space:type_name -> content.spaces.Space 3, // 10: content.spaces.UpdateConfigRequest.config:type_name -> content.spaces.Config 1, // 11: content.spaces.ListTransfersResponse.spaces:type_name -> content.spaces.Space - 4, // 12: content.spaces.Spaces.Create:input_type -> content.spaces.CreateRequest - 6, // 13: content.spaces.Spaces.Get:input_type -> content.spaces.GetRequest - 8, // 14: content.spaces.Spaces.List:input_type -> content.spaces.ListRequest - 10, // 15: content.spaces.Spaces.Update:input_type -> content.spaces.UpdateRequest - 11, // 16: content.spaces.Spaces.UpdateConfig:input_type -> content.spaces.UpdateConfigRequest - 12, // 17: content.spaces.Spaces.Delete:input_type -> content.spaces.DeleteRequest - 13, // 18: content.spaces.Spaces.Transfer:input_type -> content.spaces.TransferRequest - 14, // 19: content.spaces.Spaces.AbortTransfer:input_type -> content.spaces.AbortTransferRequest - 15, // 20: content.spaces.Spaces.ListTransfers:input_type -> content.spaces.ListTransfersRequest - 17, // 21: content.spaces.Spaces.Move:input_type -> content.spaces.MoveRequest - 5, // 22: content.spaces.Spaces.Create:output_type -> content.spaces.CreateResponse - 7, // 23: content.spaces.Spaces.Get:output_type -> content.spaces.GetResponse - 9, // 24: content.spaces.Spaces.List:output_type -> content.spaces.ListResponse - 19, // 25: content.spaces.Spaces.Update:output_type -> google.protobuf.Empty - 19, // 26: content.spaces.Spaces.UpdateConfig:output_type -> google.protobuf.Empty - 19, // 27: content.spaces.Spaces.Delete:output_type -> google.protobuf.Empty - 19, // 28: content.spaces.Spaces.Transfer:output_type -> google.protobuf.Empty - 19, // 29: content.spaces.Spaces.AbortTransfer:output_type -> google.protobuf.Empty - 16, // 30: content.spaces.Spaces.ListTransfers:output_type -> content.spaces.ListTransfersResponse - 19, // 31: content.spaces.Spaces.Move:output_type -> google.protobuf.Empty - 22, // [22:32] is the sub-list for method output_type - 12, // [12:22] is the sub-list for method input_type - 12, // [12:12] is the sub-list for extension type_name - 12, // [12:12] is the sub-list for extension extendee - 0, // [0:12] is the sub-list for field type_name + 0, // 12: content.spaces.Filter.state:type_name -> content.spaces.State + 18, // 13: content.spaces.FindRequest.filter:type_name -> content.spaces.Filter + 22, // 14: content.spaces.FindRequest.options:type_name -> common.FindOptions + 1, // 15: content.spaces.FindResponse.spaces:type_name -> content.spaces.Space + 4, // 16: content.spaces.Spaces.Create:input_type -> content.spaces.CreateRequest + 6, // 17: content.spaces.Spaces.Get:input_type -> content.spaces.GetRequest + 8, // 18: content.spaces.Spaces.List:input_type -> content.spaces.ListRequest + 19, // 19: content.spaces.Spaces.Find:input_type -> content.spaces.FindRequest + 10, // 20: content.spaces.Spaces.Update:input_type -> content.spaces.UpdateRequest + 11, // 21: content.spaces.Spaces.UpdateConfig:input_type -> content.spaces.UpdateConfigRequest + 12, // 22: content.spaces.Spaces.Delete:input_type -> content.spaces.DeleteRequest + 13, // 23: content.spaces.Spaces.Transfer:input_type -> content.spaces.TransferRequest + 14, // 24: content.spaces.Spaces.AbortTransfer:input_type -> content.spaces.AbortTransferRequest + 15, // 25: content.spaces.Spaces.ListTransfers:input_type -> content.spaces.ListTransfersRequest + 17, // 26: content.spaces.Spaces.Move:input_type -> content.spaces.MoveRequest + 5, // 27: content.spaces.Spaces.Create:output_type -> content.spaces.CreateResponse + 7, // 28: content.spaces.Spaces.Get:output_type -> content.spaces.GetResponse + 9, // 29: content.spaces.Spaces.List:output_type -> content.spaces.ListResponse + 20, // 30: content.spaces.Spaces.Find:output_type -> content.spaces.FindResponse + 23, // 31: content.spaces.Spaces.Update:output_type -> google.protobuf.Empty + 23, // 32: content.spaces.Spaces.UpdateConfig:output_type -> google.protobuf.Empty + 23, // 33: content.spaces.Spaces.Delete:output_type -> google.protobuf.Empty + 23, // 34: content.spaces.Spaces.Transfer:output_type -> google.protobuf.Empty + 23, // 35: content.spaces.Spaces.AbortTransfer:output_type -> google.protobuf.Empty + 16, // 36: content.spaces.Spaces.ListTransfers:output_type -> content.spaces.ListTransfersResponse + 23, // 37: content.spaces.Spaces.Move:output_type -> google.protobuf.Empty + 27, // [27:38] is the sub-list for method output_type + 16, // [16:27] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name } func init() { file_spaces_spaces_proto_init() } @@ -1430,6 +1660,42 @@ func file_spaces_spaces_proto_init() { return nil } } + file_spaces_spaces_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Filter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_spaces_spaces_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_spaces_spaces_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -1437,7 +1703,7 @@ func file_spaces_spaces_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_spaces_spaces_proto_rawDesc, NumEnums: 1, - NumMessages: 17, + NumMessages: 20, NumExtensions: 0, NumServices: 1, }, diff --git a/proto/spaces/spaces_grpc.pb.go b/proto/spaces/spaces_grpc.pb.go index f080fe31ba0c4d97ff3fa5fecbf608eaf2ccdd6d..96702e6cf3c2abf3bf831dbd9cedf99a801a7932 100644 --- a/proto/spaces/spaces_grpc.pb.go +++ b/proto/spaces/spaces_grpc.pb.go @@ -23,6 +23,7 @@ const ( Spaces_Create_FullMethodName = "/content.spaces.Spaces/Create" Spaces_Get_FullMethodName = "/content.spaces.Spaces/Get" Spaces_List_FullMethodName = "/content.spaces.Spaces/List" + Spaces_Find_FullMethodName = "/content.spaces.Spaces/Find" Spaces_Update_FullMethodName = "/content.spaces.Spaces/Update" Spaces_UpdateConfig_FullMethodName = "/content.spaces.Spaces/UpdateConfig" Spaces_Delete_FullMethodName = "/content.spaces.Spaces/Delete" @@ -39,6 +40,7 @@ type SpacesClient interface { Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) + Find(ctx context.Context, in *FindRequest, opts ...grpc.CallOption) (*FindResponse, error) Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) UpdateConfig(ctx context.Context, in *UpdateConfigRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) @@ -96,6 +98,15 @@ func (c *spacesClient) List(ctx context.Context, in *ListRequest, opts ...grpc.C return out, nil } +func (c *spacesClient) Find(ctx context.Context, in *FindRequest, opts ...grpc.CallOption) (*FindResponse, error) { + out := new(FindResponse) + err := c.cc.Invoke(ctx, Spaces_Find_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *spacesClient) Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, Spaces_Update_FullMethodName, in, out, opts...) @@ -166,6 +177,7 @@ type SpacesServer interface { Create(context.Context, *CreateRequest) (*CreateResponse, error) Get(context.Context, *GetRequest) (*GetResponse, error) List(context.Context, *ListRequest) (*ListResponse, error) + Find(context.Context, *FindRequest) (*FindResponse, error) Update(context.Context, *UpdateRequest) (*emptypb.Empty, error) UpdateConfig(context.Context, *UpdateConfigRequest) (*emptypb.Empty, error) Delete(context.Context, *DeleteRequest) (*emptypb.Empty, error) @@ -202,6 +214,9 @@ func (UnimplementedSpacesServer) Get(context.Context, *GetRequest) (*GetResponse func (UnimplementedSpacesServer) List(context.Context, *ListRequest) (*ListResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method List not implemented") } +func (UnimplementedSpacesServer) Find(context.Context, *FindRequest) (*FindResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Find not implemented") +} func (UnimplementedSpacesServer) Update(context.Context, *UpdateRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") } @@ -290,6 +305,24 @@ func _Spaces_List_Handler(srv interface{}, ctx context.Context, dec func(interfa return interceptor(ctx, in, info, handler) } +func _Spaces_Find_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FindRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SpacesServer).Find(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Spaces_Find_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SpacesServer).Find(ctx, req.(*FindRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Spaces_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateRequest) if err := dec(in); err != nil { @@ -435,6 +468,10 @@ var Spaces_ServiceDesc = grpc.ServiceDesc{ MethodName: "List", Handler: _Spaces_List_Handler, }, + { + MethodName: "Find", + Handler: _Spaces_Find_Handler, + }, { MethodName: "Update", Handler: _Spaces_Update_Handler,