chore: update acl config

This commit is contained in:
Steven 2023-11-12 01:43:56 +08:00
parent 8f608dc522
commit 626b0df21c
7 changed files with 412 additions and 156 deletions

View File

@ -3,8 +3,10 @@ package v2
import "strings"
var allowedMethodsWhenUnauthorized = map[string]bool{
"/slash.api.v2.WorkspaceService/GetWorkspaceProfile": true,
"/slash.api.v2.WorkspaceService/GetWorkspaceSetting": true,
"/slash.api.v2.WorkspaceService/GetWorkspaceProfile": true,
"/slash.api.v2.WorkspaceService/GetWorkspaceSetting": true,
"/slash.api.v2.ShortcutService/GetShortcut": true,
"/slash.api.v2.CollectionService/GetCollectionByName": true,
}
// isUnauthorizeAllowedMethod returns true if the method is allowed to be called when the user is not authorized.

View File

@ -54,6 +54,33 @@ func (s *APIV2Service) GetCollection(ctx context.Context, request *apiv2pb.GetCo
return response, nil
}
func (s *APIV2Service) GetCollectionByName(ctx context.Context, request *apiv2pb.GetCollectionByNameRequest) (*apiv2pb.GetCollectionByNameResponse, error) {
collection, err := s.Store.GetCollection(ctx, &store.FindCollection{
Name: &request.Name,
})
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to get collection by name: %v", err)
}
if collection == nil {
return nil, status.Errorf(codes.NotFound, "collection not found")
}
userID, ok := ctx.Value(userIDContextKey).(int32)
if ok {
if collection.Visibility == storepb.Visibility_PRIVATE && collection.CreatorId != userID {
return nil, status.Errorf(codes.PermissionDenied, "Permission denied")
}
} else {
if collection.Visibility != storepb.Visibility_PUBLIC {
return nil, status.Errorf(codes.PermissionDenied, "Permission denied")
}
}
response := &apiv2pb.GetCollectionByNameResponse{
Collection: convertCollectionFromStore(collection),
}
return response, nil
}
func (s *APIV2Service) CreateCollection(ctx context.Context, request *apiv2pb.CreateCollectionRequest) (*apiv2pb.CreateCollectionResponse, error) {
userID := ctx.Value(userIDContextKey).(int32)
collection := &storepb.Collection{

View File

@ -60,10 +60,17 @@ func (s *APIV2Service) GetShortcut(ctx context.Context, request *apiv2pb.GetShor
return nil, status.Errorf(codes.NotFound, "shortcut not found")
}
userID := ctx.Value(userIDContextKey).(int32)
if shortcut.Visibility == storepb.Visibility_PRIVATE && shortcut.CreatorId != userID {
return nil, status.Errorf(codes.PermissionDenied, "Permission denied")
userID, ok := ctx.Value(userIDContextKey).(int32)
if ok {
if shortcut.Visibility == storepb.Visibility_PRIVATE && shortcut.CreatorId != userID {
return nil, status.Errorf(codes.PermissionDenied, "Permission denied")
}
} else {
if shortcut.Visibility != storepb.Visibility_PUBLIC {
return nil, status.Errorf(codes.PermissionDenied, "Permission denied")
}
}
composedShortcut, err := s.convertShortcutFromStorepb(ctx, shortcut)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to convert shortcut, err: %v", err)

View File

@ -20,6 +20,8 @@ service CollectionService {
option (google.api.http) = {get: "/api/v2/collections/{id}"};
option (google.api.method_signature) = "id";
}
// GetCollectionByName returns a collection by name.
rpc GetCollectionByName(GetCollectionByNameRequest) returns (GetCollectionByNameResponse) {}
// CreateCollection creates a collection.
rpc CreateCollection(CreateCollectionRequest) returns (CreateCollectionResponse) {
option (google.api.http) = {
@ -76,6 +78,14 @@ message GetCollectionResponse {
Collection collection = 1;
}
message GetCollectionByNameRequest {
string name = 1;
}
message GetCollectionByNameResponse {
Collection collection = 1;
}
message CreateCollectionRequest {
Collection collection = 1;
}

View File

@ -13,6 +13,8 @@
- [CreateCollectionResponse](#slash-api-v2-CreateCollectionResponse)
- [DeleteCollectionRequest](#slash-api-v2-DeleteCollectionRequest)
- [DeleteCollectionResponse](#slash-api-v2-DeleteCollectionResponse)
- [GetCollectionByNameRequest](#slash-api-v2-GetCollectionByNameRequest)
- [GetCollectionByNameResponse](#slash-api-v2-GetCollectionByNameResponse)
- [GetCollectionRequest](#slash-api-v2-GetCollectionRequest)
- [GetCollectionResponse](#slash-api-v2-GetCollectionResponse)
- [ListCollectionsRequest](#slash-api-v2-ListCollectionsRequest)
@ -230,6 +232,36 @@
<a name="slash-api-v2-GetCollectionByNameRequest"></a>
### GetCollectionByNameRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| name | [string](#string) | | |
<a name="slash-api-v2-GetCollectionByNameResponse"></a>
### GetCollectionByNameResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| collection | [Collection](#slash-api-v2-Collection) | | |
<a name="slash-api-v2-GetCollectionRequest"></a>
### GetCollectionRequest
@ -331,6 +363,7 @@
| ----------- | ------------ | ------------- | ------------|
| ListCollections | [ListCollectionsRequest](#slash-api-v2-ListCollectionsRequest) | [ListCollectionsResponse](#slash-api-v2-ListCollectionsResponse) | ListCollections returns a list of collections. |
| GetCollection | [GetCollectionRequest](#slash-api-v2-GetCollectionRequest) | [GetCollectionResponse](#slash-api-v2-GetCollectionResponse) | GetCollection returns a collection by id. |
| GetCollectionByName | [GetCollectionByNameRequest](#slash-api-v2-GetCollectionByNameRequest) | [GetCollectionByNameResponse](#slash-api-v2-GetCollectionByNameResponse) | GetCollectionByName returns a collection by name. |
| CreateCollection | [CreateCollectionRequest](#slash-api-v2-CreateCollectionRequest) | [CreateCollectionResponse](#slash-api-v2-CreateCollectionResponse) | CreateCollection creates a collection. |
| UpdateCollection | [UpdateCollectionRequest](#slash-api-v2-UpdateCollectionRequest) | [UpdateCollectionResponse](#slash-api-v2-UpdateCollectionResponse) | UpdateCollection updates a collection. |
| DeleteCollection | [DeleteCollectionRequest](#slash-api-v2-DeleteCollectionRequest) | [DeleteCollectionResponse](#slash-api-v2-DeleteCollectionResponse) | DeleteCollection deletes a collection by id. |

View File

@ -313,6 +313,100 @@ func (x *GetCollectionResponse) GetCollection() *Collection {
return nil
}
type GetCollectionByNameRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *GetCollectionByNameRequest) Reset() {
*x = GetCollectionByNameRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_collection_service_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetCollectionByNameRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetCollectionByNameRequest) ProtoMessage() {}
func (x *GetCollectionByNameRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_collection_service_proto_msgTypes[5]
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 GetCollectionByNameRequest.ProtoReflect.Descriptor instead.
func (*GetCollectionByNameRequest) Descriptor() ([]byte, []int) {
return file_api_v2_collection_service_proto_rawDescGZIP(), []int{5}
}
func (x *GetCollectionByNameRequest) GetName() string {
if x != nil {
return x.Name
}
return ""
}
type GetCollectionByNameResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Collection *Collection `protobuf:"bytes,1,opt,name=collection,proto3" json:"collection,omitempty"`
}
func (x *GetCollectionByNameResponse) Reset() {
*x = GetCollectionByNameResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_collection_service_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetCollectionByNameResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetCollectionByNameResponse) ProtoMessage() {}
func (x *GetCollectionByNameResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_collection_service_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetCollectionByNameResponse.ProtoReflect.Descriptor instead.
func (*GetCollectionByNameResponse) Descriptor() ([]byte, []int) {
return file_api_v2_collection_service_proto_rawDescGZIP(), []int{6}
}
func (x *GetCollectionByNameResponse) GetCollection() *Collection {
if x != nil {
return x.Collection
}
return nil
}
type CreateCollectionRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -324,7 +418,7 @@ type CreateCollectionRequest struct {
func (x *CreateCollectionRequest) Reset() {
*x = CreateCollectionRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_collection_service_proto_msgTypes[5]
mi := &file_api_v2_collection_service_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -337,7 +431,7 @@ func (x *CreateCollectionRequest) String() string {
func (*CreateCollectionRequest) ProtoMessage() {}
func (x *CreateCollectionRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_collection_service_proto_msgTypes[5]
mi := &file_api_v2_collection_service_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -350,7 +444,7 @@ func (x *CreateCollectionRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use CreateCollectionRequest.ProtoReflect.Descriptor instead.
func (*CreateCollectionRequest) Descriptor() ([]byte, []int) {
return file_api_v2_collection_service_proto_rawDescGZIP(), []int{5}
return file_api_v2_collection_service_proto_rawDescGZIP(), []int{7}
}
func (x *CreateCollectionRequest) GetCollection() *Collection {
@ -371,7 +465,7 @@ type CreateCollectionResponse struct {
func (x *CreateCollectionResponse) Reset() {
*x = CreateCollectionResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_collection_service_proto_msgTypes[6]
mi := &file_api_v2_collection_service_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -384,7 +478,7 @@ func (x *CreateCollectionResponse) String() string {
func (*CreateCollectionResponse) ProtoMessage() {}
func (x *CreateCollectionResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_collection_service_proto_msgTypes[6]
mi := &file_api_v2_collection_service_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -397,7 +491,7 @@ func (x *CreateCollectionResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use CreateCollectionResponse.ProtoReflect.Descriptor instead.
func (*CreateCollectionResponse) Descriptor() ([]byte, []int) {
return file_api_v2_collection_service_proto_rawDescGZIP(), []int{6}
return file_api_v2_collection_service_proto_rawDescGZIP(), []int{8}
}
func (x *CreateCollectionResponse) GetCollection() *Collection {
@ -419,7 +513,7 @@ type UpdateCollectionRequest struct {
func (x *UpdateCollectionRequest) Reset() {
*x = UpdateCollectionRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_collection_service_proto_msgTypes[7]
mi := &file_api_v2_collection_service_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -432,7 +526,7 @@ func (x *UpdateCollectionRequest) String() string {
func (*UpdateCollectionRequest) ProtoMessage() {}
func (x *UpdateCollectionRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_collection_service_proto_msgTypes[7]
mi := &file_api_v2_collection_service_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -445,7 +539,7 @@ func (x *UpdateCollectionRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use UpdateCollectionRequest.ProtoReflect.Descriptor instead.
func (*UpdateCollectionRequest) Descriptor() ([]byte, []int) {
return file_api_v2_collection_service_proto_rawDescGZIP(), []int{7}
return file_api_v2_collection_service_proto_rawDescGZIP(), []int{9}
}
func (x *UpdateCollectionRequest) GetCollection() *Collection {
@ -473,7 +567,7 @@ type UpdateCollectionResponse struct {
func (x *UpdateCollectionResponse) Reset() {
*x = UpdateCollectionResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_collection_service_proto_msgTypes[8]
mi := &file_api_v2_collection_service_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -486,7 +580,7 @@ func (x *UpdateCollectionResponse) String() string {
func (*UpdateCollectionResponse) ProtoMessage() {}
func (x *UpdateCollectionResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_collection_service_proto_msgTypes[8]
mi := &file_api_v2_collection_service_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -499,7 +593,7 @@ func (x *UpdateCollectionResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use UpdateCollectionResponse.ProtoReflect.Descriptor instead.
func (*UpdateCollectionResponse) Descriptor() ([]byte, []int) {
return file_api_v2_collection_service_proto_rawDescGZIP(), []int{8}
return file_api_v2_collection_service_proto_rawDescGZIP(), []int{10}
}
func (x *UpdateCollectionResponse) GetCollection() *Collection {
@ -520,7 +614,7 @@ type DeleteCollectionRequest struct {
func (x *DeleteCollectionRequest) Reset() {
*x = DeleteCollectionRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_collection_service_proto_msgTypes[9]
mi := &file_api_v2_collection_service_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -533,7 +627,7 @@ func (x *DeleteCollectionRequest) String() string {
func (*DeleteCollectionRequest) ProtoMessage() {}
func (x *DeleteCollectionRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_collection_service_proto_msgTypes[9]
mi := &file_api_v2_collection_service_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -546,7 +640,7 @@ func (x *DeleteCollectionRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use DeleteCollectionRequest.ProtoReflect.Descriptor instead.
func (*DeleteCollectionRequest) Descriptor() ([]byte, []int) {
return file_api_v2_collection_service_proto_rawDescGZIP(), []int{9}
return file_api_v2_collection_service_proto_rawDescGZIP(), []int{11}
}
func (x *DeleteCollectionRequest) GetId() int32 {
@ -565,7 +659,7 @@ type DeleteCollectionResponse struct {
func (x *DeleteCollectionResponse) Reset() {
*x = DeleteCollectionResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_collection_service_proto_msgTypes[10]
mi := &file_api_v2_collection_service_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -578,7 +672,7 @@ func (x *DeleteCollectionResponse) String() string {
func (*DeleteCollectionResponse) ProtoMessage() {}
func (x *DeleteCollectionResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_collection_service_proto_msgTypes[10]
mi := &file_api_v2_collection_service_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -591,7 +685,7 @@ func (x *DeleteCollectionResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use DeleteCollectionResponse.ProtoReflect.Descriptor instead.
func (*DeleteCollectionResponse) Descriptor() ([]byte, []int) {
return file_api_v2_collection_service_proto_rawDescGZIP(), []int{10}
return file_api_v2_collection_service_proto_rawDescGZIP(), []int{12}
}
var File_api_v2_collection_service_proto protoreflect.FileDescriptor
@ -646,94 +740,109 @@ var file_api_v2_collection_service_proto_rawDesc = []byte{
0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x6c, 0x61, 0x73,
0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22,
0x53, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f,
0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18,
0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f,
0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63,
0x74, 0x69, 0x6f, 0x6e, 0x22, 0x54, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f,
0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x30, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x22, 0x57, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a,
0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x90, 0x01, 0x0a, 0x17, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63,
0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x6c, 0x61,
0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63,
0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73,
0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x54, 0x0a,
0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f,
0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6c,
0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e,
0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6c,
0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x22, 0x29, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6c,
0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x22, 0x1a,
0x0a, 0x18, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xdf, 0x05, 0x0a, 0x11, 0x43,
0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x12, 0x7b, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x73, 0x12, 0x24, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x73, 0x6c, 0x61, 0x73,
0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6c,
0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76,
0x32, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x7f, 0x0a,
0x0d, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22,
0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65,
0x74, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x23, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76,
0x32, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0xda, 0x41, 0x02, 0x69, 0x64, 0x82, 0xd3,
0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f,
0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x8a,
0x01, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x12, 0x25, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x73, 0x6c, 0x61,
0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x0a, 0x63, 0x6f, 0x6c, 0x6c,
0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x13, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f,
0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xb3, 0x01, 0x0a, 0x10,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x12, 0x25, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e,
0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6c,
0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
0x50, 0xda, 0x41, 0x16, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x75,
0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31,
0x3a, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x23, 0x2f, 0x61,
0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x2f, 0x7b, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x69, 0x64,
0x7d, 0x12, 0x88, 0x01, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c,
0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c,
0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e,
0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c,
0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x53, 0x0a, 0x17, 0x43, 0x72,
0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x6c, 0x61, 0x73,
0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22,
0x54, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x63,
0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x18, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43,
0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65,
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x90, 0x01, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52,
0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x0b, 0x75,
0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70,
0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x54, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61,
0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x29,
0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x22, 0x1a, 0x0a, 0x18, 0x44, 0x65, 0x6c,
0x65, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0xda, 0x41, 0x02, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93,
0x02, 0x1a, 0x2a, 0x18, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x6c, 0x6c,
0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x42, 0xad, 0x01, 0x0a,
0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76,
0x32, 0x42, 0x16, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74,
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x6f, 0x6f, 0x6a, 0x61, 0x63, 0x6b, 0x2f,
0x73, 0x6c, 0x61, 0x73, 0x68, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f,
0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x32, 0xa2, 0x02, 0x03, 0x53,
0x41, 0x58, 0xaa, 0x02, 0x0c, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56,
0x32, 0xca, 0x02, 0x0c, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32,
0xe2, 0x02, 0x18, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, 0x5c,
0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x53, 0x6c,
0x61, 0x73, 0x68, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xcd, 0x06, 0x0a, 0x11, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63,
0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7b, 0x0a, 0x0f, 0x4c,
0x69, 0x73, 0x74, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x24,
0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69,
0x73, 0x74, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4,
0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x6c,
0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x7f, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x43,
0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x73, 0x6c, 0x61, 0x73,
0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6c, 0x6c,
0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e,
0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74,
0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x22, 0x25, 0xda, 0x41, 0x02, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12,
0x18, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x6c, 0x0a, 0x13, 0x47, 0x65, 0x74,
0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65,
0x12, 0x28, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e,
0x47, 0x65, 0x74, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x4e,
0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x73, 0x6c, 0x61,
0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6c,
0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x8a, 0x01, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61,
0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x2e, 0x73,
0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61,
0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4,
0x93, 0x02, 0x21, 0x3a, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22,
0x13, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x73, 0x12, 0xb3, 0x01, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43,
0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x2e, 0x73, 0x6c, 0x61, 0x73,
0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43,
0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x26, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x50, 0xda, 0x41, 0x16, 0x63, 0x6f, 0x6c,
0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d,
0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x3a, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65,
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x23, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63,
0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x63, 0x6f, 0x6c, 0x6c,
0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x69, 0x64, 0x7d, 0x12, 0x88, 0x01, 0x0a, 0x10, 0x44,
0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12,
0x25, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44,
0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c,
0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25,
0xda, 0x41, 0x02, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x2a, 0x18, 0x2f, 0x61, 0x70,
0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x42, 0xad, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6c,
0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x16, 0x43, 0x6f, 0x6c, 0x6c,
0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f,
0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
0x2f, 0x62, 0x6f, 0x6f, 0x6a, 0x61, 0x63, 0x6b, 0x2f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2f, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x3b,
0x61, 0x70, 0x69, 0x76, 0x32, 0xa2, 0x02, 0x03, 0x53, 0x41, 0x58, 0xaa, 0x02, 0x0c, 0x53, 0x6c,
0x61, 0x73, 0x68, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x0c, 0x53, 0x6c, 0x61,
0x73, 0x68, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, 0xe2, 0x02, 0x18, 0x53, 0x6c, 0x61, 0x73,
0x68, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61,
0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x3a, 0x3a, 0x41, 0x70,
0x69, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -748,49 +857,54 @@ func file_api_v2_collection_service_proto_rawDescGZIP() []byte {
return file_api_v2_collection_service_proto_rawDescData
}
var file_api_v2_collection_service_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
var file_api_v2_collection_service_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
var file_api_v2_collection_service_proto_goTypes = []interface{}{
(*Collection)(nil), // 0: slash.api.v2.Collection
(*ListCollectionsRequest)(nil), // 1: slash.api.v2.ListCollectionsRequest
(*ListCollectionsResponse)(nil), // 2: slash.api.v2.ListCollectionsResponse
(*GetCollectionRequest)(nil), // 3: slash.api.v2.GetCollectionRequest
(*GetCollectionResponse)(nil), // 4: slash.api.v2.GetCollectionResponse
(*CreateCollectionRequest)(nil), // 5: slash.api.v2.CreateCollectionRequest
(*CreateCollectionResponse)(nil), // 6: slash.api.v2.CreateCollectionResponse
(*UpdateCollectionRequest)(nil), // 7: slash.api.v2.UpdateCollectionRequest
(*UpdateCollectionResponse)(nil), // 8: slash.api.v2.UpdateCollectionResponse
(*DeleteCollectionRequest)(nil), // 9: slash.api.v2.DeleteCollectionRequest
(*DeleteCollectionResponse)(nil), // 10: slash.api.v2.DeleteCollectionResponse
(*timestamppb.Timestamp)(nil), // 11: google.protobuf.Timestamp
(Visibility)(0), // 12: slash.api.v2.Visibility
(*fieldmaskpb.FieldMask)(nil), // 13: google.protobuf.FieldMask
(*Collection)(nil), // 0: slash.api.v2.Collection
(*ListCollectionsRequest)(nil), // 1: slash.api.v2.ListCollectionsRequest
(*ListCollectionsResponse)(nil), // 2: slash.api.v2.ListCollectionsResponse
(*GetCollectionRequest)(nil), // 3: slash.api.v2.GetCollectionRequest
(*GetCollectionResponse)(nil), // 4: slash.api.v2.GetCollectionResponse
(*GetCollectionByNameRequest)(nil), // 5: slash.api.v2.GetCollectionByNameRequest
(*GetCollectionByNameResponse)(nil), // 6: slash.api.v2.GetCollectionByNameResponse
(*CreateCollectionRequest)(nil), // 7: slash.api.v2.CreateCollectionRequest
(*CreateCollectionResponse)(nil), // 8: slash.api.v2.CreateCollectionResponse
(*UpdateCollectionRequest)(nil), // 9: slash.api.v2.UpdateCollectionRequest
(*UpdateCollectionResponse)(nil), // 10: slash.api.v2.UpdateCollectionResponse
(*DeleteCollectionRequest)(nil), // 11: slash.api.v2.DeleteCollectionRequest
(*DeleteCollectionResponse)(nil), // 12: slash.api.v2.DeleteCollectionResponse
(*timestamppb.Timestamp)(nil), // 13: google.protobuf.Timestamp
(Visibility)(0), // 14: slash.api.v2.Visibility
(*fieldmaskpb.FieldMask)(nil), // 15: google.protobuf.FieldMask
}
var file_api_v2_collection_service_proto_depIdxs = []int32{
11, // 0: slash.api.v2.Collection.created_time:type_name -> google.protobuf.Timestamp
11, // 1: slash.api.v2.Collection.updated_time:type_name -> google.protobuf.Timestamp
12, // 2: slash.api.v2.Collection.visibility:type_name -> slash.api.v2.Visibility
13, // 0: slash.api.v2.Collection.created_time:type_name -> google.protobuf.Timestamp
13, // 1: slash.api.v2.Collection.updated_time:type_name -> google.protobuf.Timestamp
14, // 2: slash.api.v2.Collection.visibility:type_name -> slash.api.v2.Visibility
0, // 3: slash.api.v2.ListCollectionsResponse.collections:type_name -> slash.api.v2.Collection
0, // 4: slash.api.v2.GetCollectionResponse.collection:type_name -> slash.api.v2.Collection
0, // 5: slash.api.v2.CreateCollectionRequest.collection:type_name -> slash.api.v2.Collection
0, // 6: slash.api.v2.CreateCollectionResponse.collection:type_name -> slash.api.v2.Collection
0, // 7: slash.api.v2.UpdateCollectionRequest.collection:type_name -> slash.api.v2.Collection
13, // 8: slash.api.v2.UpdateCollectionRequest.update_mask:type_name -> google.protobuf.FieldMask
0, // 9: slash.api.v2.UpdateCollectionResponse.collection:type_name -> slash.api.v2.Collection
1, // 10: slash.api.v2.CollectionService.ListCollections:input_type -> slash.api.v2.ListCollectionsRequest
3, // 11: slash.api.v2.CollectionService.GetCollection:input_type -> slash.api.v2.GetCollectionRequest
5, // 12: slash.api.v2.CollectionService.CreateCollection:input_type -> slash.api.v2.CreateCollectionRequest
7, // 13: slash.api.v2.CollectionService.UpdateCollection:input_type -> slash.api.v2.UpdateCollectionRequest
9, // 14: slash.api.v2.CollectionService.DeleteCollection:input_type -> slash.api.v2.DeleteCollectionRequest
2, // 15: slash.api.v2.CollectionService.ListCollections:output_type -> slash.api.v2.ListCollectionsResponse
4, // 16: slash.api.v2.CollectionService.GetCollection:output_type -> slash.api.v2.GetCollectionResponse
6, // 17: slash.api.v2.CollectionService.CreateCollection:output_type -> slash.api.v2.CreateCollectionResponse
8, // 18: slash.api.v2.CollectionService.UpdateCollection:output_type -> slash.api.v2.UpdateCollectionResponse
10, // 19: slash.api.v2.CollectionService.DeleteCollection:output_type -> slash.api.v2.DeleteCollectionResponse
15, // [15:20] is the sub-list for method output_type
10, // [10:15] is the sub-list for method input_type
10, // [10:10] is the sub-list for extension type_name
10, // [10:10] is the sub-list for extension extendee
0, // [0:10] is the sub-list for field type_name
0, // 5: slash.api.v2.GetCollectionByNameResponse.collection:type_name -> slash.api.v2.Collection
0, // 6: slash.api.v2.CreateCollectionRequest.collection:type_name -> slash.api.v2.Collection
0, // 7: slash.api.v2.CreateCollectionResponse.collection:type_name -> slash.api.v2.Collection
0, // 8: slash.api.v2.UpdateCollectionRequest.collection:type_name -> slash.api.v2.Collection
15, // 9: slash.api.v2.UpdateCollectionRequest.update_mask:type_name -> google.protobuf.FieldMask
0, // 10: slash.api.v2.UpdateCollectionResponse.collection:type_name -> slash.api.v2.Collection
1, // 11: slash.api.v2.CollectionService.ListCollections:input_type -> slash.api.v2.ListCollectionsRequest
3, // 12: slash.api.v2.CollectionService.GetCollection:input_type -> slash.api.v2.GetCollectionRequest
5, // 13: slash.api.v2.CollectionService.GetCollectionByName:input_type -> slash.api.v2.GetCollectionByNameRequest
7, // 14: slash.api.v2.CollectionService.CreateCollection:input_type -> slash.api.v2.CreateCollectionRequest
9, // 15: slash.api.v2.CollectionService.UpdateCollection:input_type -> slash.api.v2.UpdateCollectionRequest
11, // 16: slash.api.v2.CollectionService.DeleteCollection:input_type -> slash.api.v2.DeleteCollectionRequest
2, // 17: slash.api.v2.CollectionService.ListCollections:output_type -> slash.api.v2.ListCollectionsResponse
4, // 18: slash.api.v2.CollectionService.GetCollection:output_type -> slash.api.v2.GetCollectionResponse
6, // 19: slash.api.v2.CollectionService.GetCollectionByName:output_type -> slash.api.v2.GetCollectionByNameResponse
8, // 20: slash.api.v2.CollectionService.CreateCollection:output_type -> slash.api.v2.CreateCollectionResponse
10, // 21: slash.api.v2.CollectionService.UpdateCollection:output_type -> slash.api.v2.UpdateCollectionResponse
12, // 22: slash.api.v2.CollectionService.DeleteCollection:output_type -> slash.api.v2.DeleteCollectionResponse
17, // [17:23] is the sub-list for method output_type
11, // [11:17] is the sub-list for method input_type
11, // [11:11] is the sub-list for extension type_name
11, // [11:11] is the sub-list for extension extendee
0, // [0:11] is the sub-list for field type_name
}
func init() { file_api_v2_collection_service_proto_init() }
@ -861,7 +975,7 @@ func file_api_v2_collection_service_proto_init() {
}
}
file_api_v2_collection_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CreateCollectionRequest); i {
switch v := v.(*GetCollectionByNameRequest); i {
case 0:
return &v.state
case 1:
@ -873,7 +987,7 @@ func file_api_v2_collection_service_proto_init() {
}
}
file_api_v2_collection_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CreateCollectionResponse); i {
switch v := v.(*GetCollectionByNameResponse); i {
case 0:
return &v.state
case 1:
@ -885,7 +999,7 @@ func file_api_v2_collection_service_proto_init() {
}
}
file_api_v2_collection_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdateCollectionRequest); i {
switch v := v.(*CreateCollectionRequest); i {
case 0:
return &v.state
case 1:
@ -897,7 +1011,7 @@ func file_api_v2_collection_service_proto_init() {
}
}
file_api_v2_collection_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdateCollectionResponse); i {
switch v := v.(*CreateCollectionResponse); i {
case 0:
return &v.state
case 1:
@ -909,7 +1023,7 @@ func file_api_v2_collection_service_proto_init() {
}
}
file_api_v2_collection_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteCollectionRequest); i {
switch v := v.(*UpdateCollectionRequest); i {
case 0:
return &v.state
case 1:
@ -921,6 +1035,30 @@ func file_api_v2_collection_service_proto_init() {
}
}
file_api_v2_collection_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdateCollectionResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_v2_collection_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteCollectionRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_v2_collection_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteCollectionResponse); i {
case 0:
return &v.state
@ -939,7 +1077,7 @@ func file_api_v2_collection_service_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_api_v2_collection_service_proto_rawDesc,
NumEnums: 0,
NumMessages: 11,
NumMessages: 13,
NumExtensions: 0,
NumServices: 1,
},

View File

@ -19,11 +19,12 @@ import (
const _ = grpc.SupportPackageIsVersion7
const (
CollectionService_ListCollections_FullMethodName = "/slash.api.v2.CollectionService/ListCollections"
CollectionService_GetCollection_FullMethodName = "/slash.api.v2.CollectionService/GetCollection"
CollectionService_CreateCollection_FullMethodName = "/slash.api.v2.CollectionService/CreateCollection"
CollectionService_UpdateCollection_FullMethodName = "/slash.api.v2.CollectionService/UpdateCollection"
CollectionService_DeleteCollection_FullMethodName = "/slash.api.v2.CollectionService/DeleteCollection"
CollectionService_ListCollections_FullMethodName = "/slash.api.v2.CollectionService/ListCollections"
CollectionService_GetCollection_FullMethodName = "/slash.api.v2.CollectionService/GetCollection"
CollectionService_GetCollectionByName_FullMethodName = "/slash.api.v2.CollectionService/GetCollectionByName"
CollectionService_CreateCollection_FullMethodName = "/slash.api.v2.CollectionService/CreateCollection"
CollectionService_UpdateCollection_FullMethodName = "/slash.api.v2.CollectionService/UpdateCollection"
CollectionService_DeleteCollection_FullMethodName = "/slash.api.v2.CollectionService/DeleteCollection"
)
// CollectionServiceClient is the client API for CollectionService service.
@ -34,6 +35,8 @@ type CollectionServiceClient interface {
ListCollections(ctx context.Context, in *ListCollectionsRequest, opts ...grpc.CallOption) (*ListCollectionsResponse, error)
// GetCollection returns a collection by id.
GetCollection(ctx context.Context, in *GetCollectionRequest, opts ...grpc.CallOption) (*GetCollectionResponse, error)
// GetCollectionByName returns a collection by name.
GetCollectionByName(ctx context.Context, in *GetCollectionByNameRequest, opts ...grpc.CallOption) (*GetCollectionByNameResponse, error)
// CreateCollection creates a collection.
CreateCollection(ctx context.Context, in *CreateCollectionRequest, opts ...grpc.CallOption) (*CreateCollectionResponse, error)
// UpdateCollection updates a collection.
@ -68,6 +71,15 @@ func (c *collectionServiceClient) GetCollection(ctx context.Context, in *GetColl
return out, nil
}
func (c *collectionServiceClient) GetCollectionByName(ctx context.Context, in *GetCollectionByNameRequest, opts ...grpc.CallOption) (*GetCollectionByNameResponse, error) {
out := new(GetCollectionByNameResponse)
err := c.cc.Invoke(ctx, CollectionService_GetCollectionByName_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *collectionServiceClient) CreateCollection(ctx context.Context, in *CreateCollectionRequest, opts ...grpc.CallOption) (*CreateCollectionResponse, error) {
out := new(CreateCollectionResponse)
err := c.cc.Invoke(ctx, CollectionService_CreateCollection_FullMethodName, in, out, opts...)
@ -103,6 +115,8 @@ type CollectionServiceServer interface {
ListCollections(context.Context, *ListCollectionsRequest) (*ListCollectionsResponse, error)
// GetCollection returns a collection by id.
GetCollection(context.Context, *GetCollectionRequest) (*GetCollectionResponse, error)
// GetCollectionByName returns a collection by name.
GetCollectionByName(context.Context, *GetCollectionByNameRequest) (*GetCollectionByNameResponse, error)
// CreateCollection creates a collection.
CreateCollection(context.Context, *CreateCollectionRequest) (*CreateCollectionResponse, error)
// UpdateCollection updates a collection.
@ -122,6 +136,9 @@ func (UnimplementedCollectionServiceServer) ListCollections(context.Context, *Li
func (UnimplementedCollectionServiceServer) GetCollection(context.Context, *GetCollectionRequest) (*GetCollectionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetCollection not implemented")
}
func (UnimplementedCollectionServiceServer) GetCollectionByName(context.Context, *GetCollectionByNameRequest) (*GetCollectionByNameResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetCollectionByName not implemented")
}
func (UnimplementedCollectionServiceServer) CreateCollection(context.Context, *CreateCollectionRequest) (*CreateCollectionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateCollection not implemented")
}
@ -180,6 +197,24 @@ func _CollectionService_GetCollection_Handler(srv interface{}, ctx context.Conte
return interceptor(ctx, in, info, handler)
}
func _CollectionService_GetCollectionByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetCollectionByNameRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CollectionServiceServer).GetCollectionByName(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: CollectionService_GetCollectionByName_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CollectionServiceServer).GetCollectionByName(ctx, req.(*GetCollectionByNameRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CollectionService_CreateCollection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateCollectionRequest)
if err := dec(in); err != nil {
@ -249,6 +284,10 @@ var CollectionService_ServiceDesc = grpc.ServiceDesc{
MethodName: "GetCollection",
Handler: _CollectionService_GetCollection_Handler,
},
{
MethodName: "GetCollectionByName",
Handler: _CollectionService_GetCollectionByName_Handler,
},
{
MethodName: "CreateCollection",
Handler: _CollectionService_CreateCollection_Handler,