diff --git a/api/v1/auth.go b/api/v1/auth.go index 93123b3f..ccb607b9 100644 --- a/api/v1/auth.go +++ b/api/v1/auth.go @@ -21,10 +21,6 @@ import ( "github.com/usememos/memos/store" ) -var ( - usernameMatcher = regexp.MustCompile("^[a-z0-9]([a-z0-9-]{1,30}[a-z0-9])$") -) - type SignIn struct { Username string `json:"username"` Password string `json:"password"` @@ -293,7 +289,7 @@ func (s *APIV1Service) SignUp(c echo.Context) error { if err != nil { return echo.NewHTTPError(http.StatusBadRequest, "Failed to find users").SetInternal(err) } - if !usernameMatcher.MatchString(strings.ToLower(signup.Username)) { + if !util.ResourceNameMatcher.MatchString(strings.ToLower(signup.Username)) { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid username %s", signup.Username)).SetInternal(err) } diff --git a/api/v1/user.go b/api/v1/user.go index 77be627c..db995efe 100644 --- a/api/v1/user.go +++ b/api/v1/user.go @@ -158,7 +158,7 @@ func (s *APIV1Service) CreateUser(c echo.Context) error { if err := userCreate.Validate(); err != nil { return echo.NewHTTPError(http.StatusBadRequest, "Invalid user create format").SetInternal(err) } - if !usernameMatcher.MatchString(strings.ToLower(userCreate.Username)) { + if !util.ResourceNameMatcher.MatchString(strings.ToLower(userCreate.Username)) { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid username %s", userCreate.Username)).SetInternal(err) } // Disallow host user to be created. @@ -379,7 +379,7 @@ func (s *APIV1Service) UpdateUser(c echo.Context) error { } } if request.Username != nil { - if !usernameMatcher.MatchString(strings.ToLower(*request.Username)) { + if !util.ResourceNameMatcher.MatchString(strings.ToLower(*request.Username)) { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid username %s", *request.Username)).SetInternal(err) } userUpdate.Username = request.Username diff --git a/api/v2/memo_service.go b/api/v2/memo_service.go index b3f18e0b..3260f26f 100644 --- a/api/v2/memo_service.go +++ b/api/v2/memo_service.go @@ -7,6 +7,7 @@ import ( "time" "github.com/google/cel-go/cel" + "github.com/lithammer/shortuuid/v4" "github.com/pkg/errors" "go.uber.org/zap" expr "google.golang.org/genproto/googleapis/api/expr/v1alpha1" @@ -16,6 +17,7 @@ import ( apiv1 "github.com/usememos/memos/api/v1" "github.com/usememos/memos/internal/log" + "github.com/usememos/memos/internal/util" "github.com/usememos/memos/plugin/gomark/ast" "github.com/usememos/memos/plugin/gomark/parser" "github.com/usememos/memos/plugin/gomark/parser/tokenizer" @@ -49,9 +51,10 @@ func (s *APIV2Service) CreateMemo(ctx context.Context, request *apiv2pb.CreateMe } create := &store.Memo{ - CreatorID: user.ID, - Content: request.Content, - Visibility: store.Visibility(request.Visibility.String()), + ResourceName: shortuuid.New(), + CreatorID: user.ID, + Content: request.Content, + Visibility: store.Visibility(request.Visibility.String()), } // Find disable public memos system setting. disablePublicMemosSystem, err := s.getDisablePublicMemosSystemSettingValue(ctx) @@ -234,6 +237,27 @@ func (s *APIV2Service) GetMemo(ctx context.Context, request *apiv2pb.GetMemoRequ return response, nil } +func (s *APIV2Service) GetMemoByName(ctx context.Context, request *apiv2pb.GetMemoByNameRequest) (*apiv2pb.GetMemoByNameResponse, error) { + memo, err := s.Store.GetMemo(ctx, &store.FindMemo{ + ResourceName: &request.Name, + }) + if err != nil { + return nil, err + } + if memo == nil { + return nil, status.Errorf(codes.NotFound, "memo not found") + } + + memoMessage, err := s.convertMemoFromStore(ctx, memo) + if err != nil { + return nil, errors.Wrap(err, "failed to convert memo") + } + response := &apiv2pb.GetMemoByNameResponse{ + Memo: memoMessage, + } + return response, nil +} + func (s *APIV2Service) UpdateMemo(ctx context.Context, request *apiv2pb.UpdateMemoRequest) (*apiv2pb.UpdateMemoResponse, error) { if request.UpdateMask == nil || len(request.UpdateMask.Paths) == 0 { return nil, status.Errorf(codes.InvalidArgument, "update mask is required") @@ -282,6 +306,11 @@ func (s *APIV2Service) UpdateMemo(ctx context.Context, request *apiv2pb.UpdateMe nodes := convertToASTNodes(request.Memo.Nodes) content := restore.Restore(nodes) update.Content = &content + } else if path == "resource_name" { + update.ResourceName = &request.Memo.Name + if !util.ResourceNameMatcher.MatchString(*update.ResourceName) { + return nil, status.Errorf(codes.InvalidArgument, "invalid resource name") + } } else if path == "visibility" { visibility := convertVisibilityToStore(request.Memo.Visibility) update.Visibility = &visibility @@ -574,6 +603,7 @@ func (s *APIV2Service) convertMemoFromStore(ctx context.Context, memo *store.Mem return &apiv2pb.Memo{ Id: int32(memo.ID), + Name: memo.ResourceName, RowStatus: convertRowStatusFromStore(memo.RowStatus), Creator: fmt.Sprintf("%s%s", UserNamePrefix, creator.Username), CreatorId: int32(memo.CreatorID), diff --git a/api/v2/user_service.go b/api/v2/user_service.go index 4a9341f9..d532964f 100644 --- a/api/v2/user_service.go +++ b/api/v2/user_service.go @@ -4,7 +4,6 @@ import ( "context" "fmt" "net/http" - "regexp" "strings" "time" @@ -18,15 +17,12 @@ import ( "google.golang.org/protobuf/types/known/timestamppb" "github.com/usememos/memos/api/auth" + "github.com/usememos/memos/internal/util" apiv2pb "github.com/usememos/memos/proto/gen/api/v2" storepb "github.com/usememos/memos/proto/gen/store" "github.com/usememos/memos/store" ) -var ( - usernameMatcher = regexp.MustCompile("^[a-z0-9]([a-z0-9-]{1,30}[a-z0-9])$") -) - func (s *APIV2Service) ListUsers(ctx context.Context, _ *apiv2pb.ListUsersRequest) (*apiv2pb.ListUsersResponse, error) { currentUser, err := getCurrentUser(ctx, s.Store) if err != nil { @@ -85,7 +81,7 @@ func (s *APIV2Service) CreateUser(ctx context.Context, request *apiv2pb.CreateUs if err != nil { return nil, status.Errorf(codes.InvalidArgument, "name is required") } - if !usernameMatcher.MatchString(strings.ToLower(username)) { + if !util.ResourceNameMatcher.MatchString(strings.ToLower(username)) { return nil, status.Errorf(codes.InvalidArgument, "invalid username: %s", username) } passwordHash, err := bcrypt.GenerateFromPassword([]byte(request.User.Password), bcrypt.DefaultCost) @@ -141,7 +137,7 @@ func (s *APIV2Service) UpdateUser(ctx context.Context, request *apiv2pb.UpdateUs } for _, field := range request.UpdateMask.Paths { if field == "username" { - if !usernameMatcher.MatchString(strings.ToLower(request.User.Username)) { + if !util.ResourceNameMatcher.MatchString(strings.ToLower(request.User.Username)) { return nil, status.Errorf(codes.InvalidArgument, "invalid username: %s", request.User.Username) } update.Username = &request.User.Username diff --git a/go.mod b/go.mod index 8af20dfd..14160afd 100644 --- a/go.mod +++ b/go.mod @@ -18,6 +18,7 @@ require ( github.com/joho/godotenv v1.5.1 github.com/labstack/echo/v4 v4.11.4 github.com/lib/pq v1.10.9 + github.com/lithammer/shortuuid/v4 v4.0.0 github.com/microcosm-cc/bluemonday v1.0.26 github.com/pkg/errors v0.9.1 github.com/spf13/cobra v1.8.0 diff --git a/go.sum b/go.sum index 2927b266..3b4a1402 100644 --- a/go.sum +++ b/go.sum @@ -286,6 +286,8 @@ github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= +github.com/lithammer/shortuuid/v4 v4.0.0 h1:QRbbVkfgNippHOS8PXDkti4NaWeyYfcBTHtw7k08o4c= +github.com/lithammer/shortuuid/v4 v4.0.0/go.mod h1:Zs8puNcrvf2rV9rTH51ZLLcj7ZXqQI3lv67aw4KiB1Y= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= diff --git a/internal/util/resource_name.go b/internal/util/resource_name.go new file mode 100644 index 00000000..6fc10c66 --- /dev/null +++ b/internal/util/resource_name.go @@ -0,0 +1,7 @@ +package util + +import "regexp" + +var ( + ResourceNameMatcher = regexp.MustCompile("^[a-zA-Z0-9]([a-zA-Z0-9-]{1,30}[a-zA-Z0-9])$") +) diff --git a/proto/api/v2/memo_service.proto b/proto/api/v2/memo_service.proto index c9ef5ac4..e7e1f73f 100644 --- a/proto/api/v2/memo_service.proto +++ b/proto/api/v2/memo_service.proto @@ -31,6 +31,11 @@ service MemoService { option (google.api.http) = {get: "/api/v2/memos/{id}"}; option (google.api.method_signature) = "id"; } + // GetMemoByName gets a memo by name. + rpc GetMemoByName(GetMemoByNameRequest) returns (GetMemoByNameResponse) { + option (google.api.http) = {get: "/api/v2/memos/{name}"}; + option (google.api.method_signature) = "name"; + } // UpdateMemo updates a memo. rpc UpdateMemo(UpdateMemoRequest) returns (UpdateMemoResponse) { option (google.api.http) = { @@ -98,35 +103,39 @@ enum Visibility { } message Memo { + // id is the unique auto-incremented id. int32 id = 1; - RowStatus row_status = 2; + // name is the user-defined name. + string name = 2; + + RowStatus row_status = 3; // The name of the creator. // Format: users/{username} - string creator = 3; + string creator = 4; - int32 creator_id = 4; + int32 creator_id = 5; - google.protobuf.Timestamp create_time = 5; + google.protobuf.Timestamp create_time = 6; - google.protobuf.Timestamp update_time = 6; + google.protobuf.Timestamp update_time = 7; - google.protobuf.Timestamp display_time = 7; + google.protobuf.Timestamp display_time = 8; - string content = 8; + string content = 9; - repeated Node nodes = 9; + repeated Node nodes = 10; - Visibility visibility = 10; + Visibility visibility = 11; - bool pinned = 11; + bool pinned = 12; - optional int32 parent_id = 12; + optional int32 parent_id = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; - repeated Resource resources = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated Resource resources = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; - repeated MemoRelation relations = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated MemoRelation relations = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; } message CreateMemoRequest { @@ -163,6 +172,14 @@ message GetMemoResponse { Memo memo = 1; } +message GetMemoByNameRequest { + string name = 1; +} + +message GetMemoByNameResponse { + Memo memo = 1; +} + message UpdateMemoRequest { int32 id = 1; diff --git a/proto/gen/api/v2/README.md b/proto/gen/api/v2/README.md index ba938f58..00c55590 100644 --- a/proto/gen/api/v2/README.md +++ b/proto/gen/api/v2/README.md @@ -129,6 +129,8 @@ - [CreateMemoResponse](#memos-api-v2-CreateMemoResponse) - [DeleteMemoRequest](#memos-api-v2-DeleteMemoRequest) - [DeleteMemoResponse](#memos-api-v2-DeleteMemoResponse) + - [GetMemoByNameRequest](#memos-api-v2-GetMemoByNameRequest) + - [GetMemoByNameResponse](#memos-api-v2-GetMemoByNameResponse) - [GetMemoRequest](#memos-api-v2-GetMemoRequest) - [GetMemoResponse](#memos-api-v2-GetMemoResponse) - [GetUserMemosStatsRequest](#memos-api-v2-GetUserMemosStatsRequest) @@ -1864,6 +1866,36 @@ + + +### GetMemoByNameRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| name | [string](#string) | | | + + + + + + + + +### GetMemoByNameResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| memo | [Memo](#memos-api-v2-Memo) | | | + + + + + + ### GetMemoRequest @@ -2072,7 +2104,8 @@ | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| id | [int32](#int32) | | | +| id | [int32](#int32) | | id is the unique auto-incremented id. | +| name | [string](#string) | | name is the user-defined name. | | row_status | [RowStatus](#memos-api-v2-RowStatus) | | | | creator | [string](#string) | | The name of the creator. Format: users/{username} | | creator_id | [int32](#int32) | | | @@ -2206,6 +2239,7 @@ | CreateMemo | [CreateMemoRequest](#memos-api-v2-CreateMemoRequest) | [CreateMemoResponse](#memos-api-v2-CreateMemoResponse) | CreateMemo creates a memo. | | ListMemos | [ListMemosRequest](#memos-api-v2-ListMemosRequest) | [ListMemosResponse](#memos-api-v2-ListMemosResponse) | ListMemos lists memos with pagination and filter. | | GetMemo | [GetMemoRequest](#memos-api-v2-GetMemoRequest) | [GetMemoResponse](#memos-api-v2-GetMemoResponse) | GetMemo gets a memo by id. | +| GetMemoByName | [GetMemoByNameRequest](#memos-api-v2-GetMemoByNameRequest) | [GetMemoByNameResponse](#memos-api-v2-GetMemoByNameResponse) | GetMemoByName gets a memo by name. | | UpdateMemo | [UpdateMemoRequest](#memos-api-v2-UpdateMemoRequest) | [UpdateMemoResponse](#memos-api-v2-UpdateMemoResponse) | UpdateMemo updates a memo. | | DeleteMemo | [DeleteMemoRequest](#memos-api-v2-DeleteMemoRequest) | [DeleteMemoResponse](#memos-api-v2-DeleteMemoResponse) | DeleteMemo deletes a memo by id. | | SetMemoResources | [SetMemoResourcesRequest](#memos-api-v2-SetMemoResourcesRequest) | [SetMemoResourcesResponse](#memos-api-v2-SetMemoResourcesResponse) | SetMemoResources sets resources for a memo. | diff --git a/proto/gen/api/v2/memo_service.pb.go b/proto/gen/api/v2/memo_service.pb.go index 7643fdfc..bbdd335e 100644 --- a/proto/gen/api/v2/memo_service.pb.go +++ b/proto/gen/api/v2/memo_service.pb.go @@ -80,22 +80,25 @@ type Memo struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - RowStatus RowStatus `protobuf:"varint,2,opt,name=row_status,json=rowStatus,proto3,enum=memos.api.v2.RowStatus" json:"row_status,omitempty"` + // id is the unique auto-incremented id. + Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // name is the user-defined name. + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + RowStatus RowStatus `protobuf:"varint,3,opt,name=row_status,json=rowStatus,proto3,enum=memos.api.v2.RowStatus" json:"row_status,omitempty"` // The name of the creator. // Format: users/{username} - Creator string `protobuf:"bytes,3,opt,name=creator,proto3" json:"creator,omitempty"` - CreatorId int32 `protobuf:"varint,4,opt,name=creator_id,json=creatorId,proto3" json:"creator_id,omitempty"` - CreateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` - UpdateTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` - DisplayTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=display_time,json=displayTime,proto3" json:"display_time,omitempty"` - Content string `protobuf:"bytes,8,opt,name=content,proto3" json:"content,omitempty"` - Nodes []*Node `protobuf:"bytes,9,rep,name=nodes,proto3" json:"nodes,omitempty"` - Visibility Visibility `protobuf:"varint,10,opt,name=visibility,proto3,enum=memos.api.v2.Visibility" json:"visibility,omitempty"` - Pinned bool `protobuf:"varint,11,opt,name=pinned,proto3" json:"pinned,omitempty"` - ParentId *int32 `protobuf:"varint,12,opt,name=parent_id,json=parentId,proto3,oneof" json:"parent_id,omitempty"` - Resources []*Resource `protobuf:"bytes,13,rep,name=resources,proto3" json:"resources,omitempty"` - Relations []*MemoRelation `protobuf:"bytes,14,rep,name=relations,proto3" json:"relations,omitempty"` + Creator string `protobuf:"bytes,4,opt,name=creator,proto3" json:"creator,omitempty"` + CreatorId int32 `protobuf:"varint,5,opt,name=creator_id,json=creatorId,proto3" json:"creator_id,omitempty"` + CreateTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` + DisplayTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=display_time,json=displayTime,proto3" json:"display_time,omitempty"` + Content string `protobuf:"bytes,9,opt,name=content,proto3" json:"content,omitempty"` + Nodes []*Node `protobuf:"bytes,10,rep,name=nodes,proto3" json:"nodes,omitempty"` + Visibility Visibility `protobuf:"varint,11,opt,name=visibility,proto3,enum=memos.api.v2.Visibility" json:"visibility,omitempty"` + Pinned bool `protobuf:"varint,12,opt,name=pinned,proto3" json:"pinned,omitempty"` + ParentId *int32 `protobuf:"varint,13,opt,name=parent_id,json=parentId,proto3,oneof" json:"parent_id,omitempty"` + Resources []*Resource `protobuf:"bytes,14,rep,name=resources,proto3" json:"resources,omitempty"` + Relations []*MemoRelation `protobuf:"bytes,15,rep,name=relations,proto3" json:"relations,omitempty"` } func (x *Memo) Reset() { @@ -137,6 +140,13 @@ func (x *Memo) GetId() int32 { return 0 } +func (x *Memo) GetName() string { + if x != nil { + return x.Name + } + return "" +} + func (x *Memo) GetRowStatus() RowStatus { if x != nil { return x.RowStatus @@ -538,6 +548,100 @@ func (x *GetMemoResponse) GetMemo() *Memo { return nil } +type GetMemoByNameRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetMemoByNameRequest) Reset() { + *x = GetMemoByNameRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v2_memo_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetMemoByNameRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMemoByNameRequest) ProtoMessage() {} + +func (x *GetMemoByNameRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_v2_memo_service_proto_msgTypes[7] + 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 GetMemoByNameRequest.ProtoReflect.Descriptor instead. +func (*GetMemoByNameRequest) Descriptor() ([]byte, []int) { + return file_api_v2_memo_service_proto_rawDescGZIP(), []int{7} +} + +func (x *GetMemoByNameRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type GetMemoByNameResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Memo *Memo `protobuf:"bytes,1,opt,name=memo,proto3" json:"memo,omitempty"` +} + +func (x *GetMemoByNameResponse) Reset() { + *x = GetMemoByNameResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v2_memo_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetMemoByNameResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMemoByNameResponse) ProtoMessage() {} + +func (x *GetMemoByNameResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_v2_memo_service_proto_msgTypes[8] + 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 GetMemoByNameResponse.ProtoReflect.Descriptor instead. +func (*GetMemoByNameResponse) Descriptor() ([]byte, []int) { + return file_api_v2_memo_service_proto_rawDescGZIP(), []int{8} +} + +func (x *GetMemoByNameResponse) GetMemo() *Memo { + if x != nil { + return x.Memo + } + return nil +} + type UpdateMemoRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -551,7 +655,7 @@ type UpdateMemoRequest struct { func (x *UpdateMemoRequest) Reset() { *x = UpdateMemoRequest{} if protoimpl.UnsafeEnabled { - mi := &file_api_v2_memo_service_proto_msgTypes[7] + mi := &file_api_v2_memo_service_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -564,7 +668,7 @@ func (x *UpdateMemoRequest) String() string { func (*UpdateMemoRequest) ProtoMessage() {} func (x *UpdateMemoRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v2_memo_service_proto_msgTypes[7] + mi := &file_api_v2_memo_service_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -577,7 +681,7 @@ func (x *UpdateMemoRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateMemoRequest.ProtoReflect.Descriptor instead. func (*UpdateMemoRequest) Descriptor() ([]byte, []int) { - return file_api_v2_memo_service_proto_rawDescGZIP(), []int{7} + return file_api_v2_memo_service_proto_rawDescGZIP(), []int{9} } func (x *UpdateMemoRequest) GetId() int32 { @@ -612,7 +716,7 @@ type UpdateMemoResponse struct { func (x *UpdateMemoResponse) Reset() { *x = UpdateMemoResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_v2_memo_service_proto_msgTypes[8] + mi := &file_api_v2_memo_service_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -625,7 +729,7 @@ func (x *UpdateMemoResponse) String() string { func (*UpdateMemoResponse) ProtoMessage() {} func (x *UpdateMemoResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v2_memo_service_proto_msgTypes[8] + mi := &file_api_v2_memo_service_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -638,7 +742,7 @@ func (x *UpdateMemoResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateMemoResponse.ProtoReflect.Descriptor instead. func (*UpdateMemoResponse) Descriptor() ([]byte, []int) { - return file_api_v2_memo_service_proto_rawDescGZIP(), []int{8} + return file_api_v2_memo_service_proto_rawDescGZIP(), []int{10} } func (x *UpdateMemoResponse) GetMemo() *Memo { @@ -659,7 +763,7 @@ type DeleteMemoRequest struct { func (x *DeleteMemoRequest) Reset() { *x = DeleteMemoRequest{} if protoimpl.UnsafeEnabled { - mi := &file_api_v2_memo_service_proto_msgTypes[9] + mi := &file_api_v2_memo_service_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -672,7 +776,7 @@ func (x *DeleteMemoRequest) String() string { func (*DeleteMemoRequest) ProtoMessage() {} func (x *DeleteMemoRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v2_memo_service_proto_msgTypes[9] + mi := &file_api_v2_memo_service_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -685,7 +789,7 @@ func (x *DeleteMemoRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteMemoRequest.ProtoReflect.Descriptor instead. func (*DeleteMemoRequest) Descriptor() ([]byte, []int) { - return file_api_v2_memo_service_proto_rawDescGZIP(), []int{9} + return file_api_v2_memo_service_proto_rawDescGZIP(), []int{11} } func (x *DeleteMemoRequest) GetId() int32 { @@ -704,7 +808,7 @@ type DeleteMemoResponse struct { func (x *DeleteMemoResponse) Reset() { *x = DeleteMemoResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_v2_memo_service_proto_msgTypes[10] + mi := &file_api_v2_memo_service_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -717,7 +821,7 @@ func (x *DeleteMemoResponse) String() string { func (*DeleteMemoResponse) ProtoMessage() {} func (x *DeleteMemoResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v2_memo_service_proto_msgTypes[10] + mi := &file_api_v2_memo_service_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -730,7 +834,7 @@ func (x *DeleteMemoResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteMemoResponse.ProtoReflect.Descriptor instead. func (*DeleteMemoResponse) Descriptor() ([]byte, []int) { - return file_api_v2_memo_service_proto_rawDescGZIP(), []int{10} + return file_api_v2_memo_service_proto_rawDescGZIP(), []int{12} } type SetMemoResourcesRequest struct { @@ -745,7 +849,7 @@ type SetMemoResourcesRequest struct { func (x *SetMemoResourcesRequest) Reset() { *x = SetMemoResourcesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_api_v2_memo_service_proto_msgTypes[11] + mi := &file_api_v2_memo_service_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -758,7 +862,7 @@ func (x *SetMemoResourcesRequest) String() string { func (*SetMemoResourcesRequest) ProtoMessage() {} func (x *SetMemoResourcesRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v2_memo_service_proto_msgTypes[11] + mi := &file_api_v2_memo_service_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -771,7 +875,7 @@ func (x *SetMemoResourcesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetMemoResourcesRequest.ProtoReflect.Descriptor instead. func (*SetMemoResourcesRequest) Descriptor() ([]byte, []int) { - return file_api_v2_memo_service_proto_rawDescGZIP(), []int{11} + return file_api_v2_memo_service_proto_rawDescGZIP(), []int{13} } func (x *SetMemoResourcesRequest) GetId() int32 { @@ -797,7 +901,7 @@ type SetMemoResourcesResponse struct { func (x *SetMemoResourcesResponse) Reset() { *x = SetMemoResourcesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_v2_memo_service_proto_msgTypes[12] + mi := &file_api_v2_memo_service_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -810,7 +914,7 @@ func (x *SetMemoResourcesResponse) String() string { func (*SetMemoResourcesResponse) ProtoMessage() {} func (x *SetMemoResourcesResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v2_memo_service_proto_msgTypes[12] + mi := &file_api_v2_memo_service_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -823,7 +927,7 @@ func (x *SetMemoResourcesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SetMemoResourcesResponse.ProtoReflect.Descriptor instead. func (*SetMemoResourcesResponse) Descriptor() ([]byte, []int) { - return file_api_v2_memo_service_proto_rawDescGZIP(), []int{12} + return file_api_v2_memo_service_proto_rawDescGZIP(), []int{14} } type ListMemoResourcesRequest struct { @@ -837,7 +941,7 @@ type ListMemoResourcesRequest struct { func (x *ListMemoResourcesRequest) Reset() { *x = ListMemoResourcesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_api_v2_memo_service_proto_msgTypes[13] + mi := &file_api_v2_memo_service_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -850,7 +954,7 @@ func (x *ListMemoResourcesRequest) String() string { func (*ListMemoResourcesRequest) ProtoMessage() {} func (x *ListMemoResourcesRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v2_memo_service_proto_msgTypes[13] + mi := &file_api_v2_memo_service_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -863,7 +967,7 @@ func (x *ListMemoResourcesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListMemoResourcesRequest.ProtoReflect.Descriptor instead. func (*ListMemoResourcesRequest) Descriptor() ([]byte, []int) { - return file_api_v2_memo_service_proto_rawDescGZIP(), []int{13} + return file_api_v2_memo_service_proto_rawDescGZIP(), []int{15} } func (x *ListMemoResourcesRequest) GetId() int32 { @@ -884,7 +988,7 @@ type ListMemoResourcesResponse struct { func (x *ListMemoResourcesResponse) Reset() { *x = ListMemoResourcesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_v2_memo_service_proto_msgTypes[14] + mi := &file_api_v2_memo_service_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -897,7 +1001,7 @@ func (x *ListMemoResourcesResponse) String() string { func (*ListMemoResourcesResponse) ProtoMessage() {} func (x *ListMemoResourcesResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v2_memo_service_proto_msgTypes[14] + mi := &file_api_v2_memo_service_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -910,7 +1014,7 @@ func (x *ListMemoResourcesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListMemoResourcesResponse.ProtoReflect.Descriptor instead. func (*ListMemoResourcesResponse) Descriptor() ([]byte, []int) { - return file_api_v2_memo_service_proto_rawDescGZIP(), []int{14} + return file_api_v2_memo_service_proto_rawDescGZIP(), []int{16} } func (x *ListMemoResourcesResponse) GetResources() []*Resource { @@ -932,7 +1036,7 @@ type SetMemoRelationsRequest struct { func (x *SetMemoRelationsRequest) Reset() { *x = SetMemoRelationsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_api_v2_memo_service_proto_msgTypes[15] + mi := &file_api_v2_memo_service_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -945,7 +1049,7 @@ func (x *SetMemoRelationsRequest) String() string { func (*SetMemoRelationsRequest) ProtoMessage() {} func (x *SetMemoRelationsRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v2_memo_service_proto_msgTypes[15] + mi := &file_api_v2_memo_service_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -958,7 +1062,7 @@ func (x *SetMemoRelationsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetMemoRelationsRequest.ProtoReflect.Descriptor instead. func (*SetMemoRelationsRequest) Descriptor() ([]byte, []int) { - return file_api_v2_memo_service_proto_rawDescGZIP(), []int{15} + return file_api_v2_memo_service_proto_rawDescGZIP(), []int{17} } func (x *SetMemoRelationsRequest) GetId() int32 { @@ -984,7 +1088,7 @@ type SetMemoRelationsResponse struct { func (x *SetMemoRelationsResponse) Reset() { *x = SetMemoRelationsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_v2_memo_service_proto_msgTypes[16] + mi := &file_api_v2_memo_service_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -997,7 +1101,7 @@ func (x *SetMemoRelationsResponse) String() string { func (*SetMemoRelationsResponse) ProtoMessage() {} func (x *SetMemoRelationsResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v2_memo_service_proto_msgTypes[16] + mi := &file_api_v2_memo_service_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1010,7 +1114,7 @@ func (x *SetMemoRelationsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SetMemoRelationsResponse.ProtoReflect.Descriptor instead. func (*SetMemoRelationsResponse) Descriptor() ([]byte, []int) { - return file_api_v2_memo_service_proto_rawDescGZIP(), []int{16} + return file_api_v2_memo_service_proto_rawDescGZIP(), []int{18} } type ListMemoRelationsRequest struct { @@ -1024,7 +1128,7 @@ type ListMemoRelationsRequest struct { func (x *ListMemoRelationsRequest) Reset() { *x = ListMemoRelationsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_api_v2_memo_service_proto_msgTypes[17] + mi := &file_api_v2_memo_service_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1037,7 +1141,7 @@ func (x *ListMemoRelationsRequest) String() string { func (*ListMemoRelationsRequest) ProtoMessage() {} func (x *ListMemoRelationsRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v2_memo_service_proto_msgTypes[17] + mi := &file_api_v2_memo_service_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1050,7 +1154,7 @@ func (x *ListMemoRelationsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListMemoRelationsRequest.ProtoReflect.Descriptor instead. func (*ListMemoRelationsRequest) Descriptor() ([]byte, []int) { - return file_api_v2_memo_service_proto_rawDescGZIP(), []int{17} + return file_api_v2_memo_service_proto_rawDescGZIP(), []int{19} } func (x *ListMemoRelationsRequest) GetId() int32 { @@ -1071,7 +1175,7 @@ type ListMemoRelationsResponse struct { func (x *ListMemoRelationsResponse) Reset() { *x = ListMemoRelationsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_v2_memo_service_proto_msgTypes[18] + mi := &file_api_v2_memo_service_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1084,7 +1188,7 @@ func (x *ListMemoRelationsResponse) String() string { func (*ListMemoRelationsResponse) ProtoMessage() {} func (x *ListMemoRelationsResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v2_memo_service_proto_msgTypes[18] + mi := &file_api_v2_memo_service_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1097,7 +1201,7 @@ func (x *ListMemoRelationsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListMemoRelationsResponse.ProtoReflect.Descriptor instead. func (*ListMemoRelationsResponse) Descriptor() ([]byte, []int) { - return file_api_v2_memo_service_proto_rawDescGZIP(), []int{18} + return file_api_v2_memo_service_proto_rawDescGZIP(), []int{20} } func (x *ListMemoRelationsResponse) GetRelations() []*MemoRelation { @@ -1120,7 +1224,7 @@ type CreateMemoCommentRequest struct { func (x *CreateMemoCommentRequest) Reset() { *x = CreateMemoCommentRequest{} if protoimpl.UnsafeEnabled { - mi := &file_api_v2_memo_service_proto_msgTypes[19] + mi := &file_api_v2_memo_service_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1133,7 +1237,7 @@ func (x *CreateMemoCommentRequest) String() string { func (*CreateMemoCommentRequest) ProtoMessage() {} func (x *CreateMemoCommentRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v2_memo_service_proto_msgTypes[19] + mi := &file_api_v2_memo_service_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1146,7 +1250,7 @@ func (x *CreateMemoCommentRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateMemoCommentRequest.ProtoReflect.Descriptor instead. func (*CreateMemoCommentRequest) Descriptor() ([]byte, []int) { - return file_api_v2_memo_service_proto_rawDescGZIP(), []int{19} + return file_api_v2_memo_service_proto_rawDescGZIP(), []int{21} } func (x *CreateMemoCommentRequest) GetId() int32 { @@ -1174,7 +1278,7 @@ type CreateMemoCommentResponse struct { func (x *CreateMemoCommentResponse) Reset() { *x = CreateMemoCommentResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_v2_memo_service_proto_msgTypes[20] + mi := &file_api_v2_memo_service_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1187,7 +1291,7 @@ func (x *CreateMemoCommentResponse) String() string { func (*CreateMemoCommentResponse) ProtoMessage() {} func (x *CreateMemoCommentResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v2_memo_service_proto_msgTypes[20] + mi := &file_api_v2_memo_service_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1200,7 +1304,7 @@ func (x *CreateMemoCommentResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateMemoCommentResponse.ProtoReflect.Descriptor instead. func (*CreateMemoCommentResponse) Descriptor() ([]byte, []int) { - return file_api_v2_memo_service_proto_rawDescGZIP(), []int{20} + return file_api_v2_memo_service_proto_rawDescGZIP(), []int{22} } func (x *CreateMemoCommentResponse) GetMemo() *Memo { @@ -1221,7 +1325,7 @@ type ListMemoCommentsRequest struct { func (x *ListMemoCommentsRequest) Reset() { *x = ListMemoCommentsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_api_v2_memo_service_proto_msgTypes[21] + mi := &file_api_v2_memo_service_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1234,7 +1338,7 @@ func (x *ListMemoCommentsRequest) String() string { func (*ListMemoCommentsRequest) ProtoMessage() {} func (x *ListMemoCommentsRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v2_memo_service_proto_msgTypes[21] + mi := &file_api_v2_memo_service_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1247,7 +1351,7 @@ func (x *ListMemoCommentsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListMemoCommentsRequest.ProtoReflect.Descriptor instead. func (*ListMemoCommentsRequest) Descriptor() ([]byte, []int) { - return file_api_v2_memo_service_proto_rawDescGZIP(), []int{21} + return file_api_v2_memo_service_proto_rawDescGZIP(), []int{23} } func (x *ListMemoCommentsRequest) GetId() int32 { @@ -1268,7 +1372,7 @@ type ListMemoCommentsResponse struct { func (x *ListMemoCommentsResponse) Reset() { *x = ListMemoCommentsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_v2_memo_service_proto_msgTypes[22] + mi := &file_api_v2_memo_service_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1281,7 +1385,7 @@ func (x *ListMemoCommentsResponse) String() string { func (*ListMemoCommentsResponse) ProtoMessage() {} func (x *ListMemoCommentsResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v2_memo_service_proto_msgTypes[22] + mi := &file_api_v2_memo_service_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1294,7 +1398,7 @@ func (x *ListMemoCommentsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListMemoCommentsResponse.ProtoReflect.Descriptor instead. func (*ListMemoCommentsResponse) Descriptor() ([]byte, []int) { - return file_api_v2_memo_service_proto_rawDescGZIP(), []int{22} + return file_api_v2_memo_service_proto_rawDescGZIP(), []int{24} } func (x *ListMemoCommentsResponse) GetMemos() []*Memo { @@ -1323,7 +1427,7 @@ type GetUserMemosStatsRequest struct { func (x *GetUserMemosStatsRequest) Reset() { *x = GetUserMemosStatsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_api_v2_memo_service_proto_msgTypes[23] + mi := &file_api_v2_memo_service_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1336,7 +1440,7 @@ func (x *GetUserMemosStatsRequest) String() string { func (*GetUserMemosStatsRequest) ProtoMessage() {} func (x *GetUserMemosStatsRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v2_memo_service_proto_msgTypes[23] + mi := &file_api_v2_memo_service_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1349,7 +1453,7 @@ func (x *GetUserMemosStatsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetUserMemosStatsRequest.ProtoReflect.Descriptor instead. func (*GetUserMemosStatsRequest) Descriptor() ([]byte, []int) { - return file_api_v2_memo_service_proto_rawDescGZIP(), []int{23} + return file_api_v2_memo_service_proto_rawDescGZIP(), []int{25} } func (x *GetUserMemosStatsRequest) GetName() string { @@ -1386,7 +1490,7 @@ type GetUserMemosStatsResponse struct { func (x *GetUserMemosStatsResponse) Reset() { *x = GetUserMemosStatsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_v2_memo_service_proto_msgTypes[24] + mi := &file_api_v2_memo_service_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1399,7 +1503,7 @@ func (x *GetUserMemosStatsResponse) String() string { func (*GetUserMemosStatsResponse) ProtoMessage() {} func (x *GetUserMemosStatsResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v2_memo_service_proto_msgTypes[24] + mi := &file_api_v2_memo_service_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1412,7 +1516,7 @@ func (x *GetUserMemosStatsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetUserMemosStatsResponse.ProtoReflect.Descriptor instead. func (*GetUserMemosStatsResponse) Descriptor() ([]byte, []int) { - return file_api_v2_memo_service_proto_rawDescGZIP(), []int{24} + return file_api_v2_memo_service_proto_rawDescGZIP(), []int{26} } func (x *GetUserMemosStatsResponse) GetStats() map[string]int32 { @@ -1444,271 +1548,287 @@ var file_api_v2_memo_service_proto_rawDesc = []byte{ 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 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, 0x80, 0x05, 0x0a, 0x04, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x99, 0x05, 0x0a, 0x04, 0x4d, 0x65, 0x6d, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x36, 0x0a, 0x0a, 0x72, 0x6f, 0x77, 0x5f, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x09, 0x72, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, - 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 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, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, - 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x18, 0x06, 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, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, - 0x3d, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, - 0x07, 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, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, - 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, - 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05, 0x6e, 0x6f, 0x64, - 0x65, 0x73, 0x12, 0x38, 0x0a, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, - 0x52, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, - 0x70, 0x69, 0x6e, 0x6e, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, 0x69, - 0x6e, 0x6e, 0x65, 0x64, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, - 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x39, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, - 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x73, 0x12, 0x3d, 0x0a, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0e, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x22, 0x67, - 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x38, 0x0a, - 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x18, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0a, 0x76, 0x69, 0x73, - 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22, 0x3c, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, - 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, - 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, - 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x22, 0x58, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, - 0x6f, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, - 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, - 0x3d, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x22, 0x20, - 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, - 0x22, 0x39, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x22, 0x88, 0x01, 0x0a, 0x11, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x26, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, - 0x65, 0x6d, 0x6f, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x0a, 0x72, 0x6f, 0x77, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x6d, + 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x6f, 0x77, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x09, 0x72, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 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, 0x3c, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 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, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x08, 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, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x05, + 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, + 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, + 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6d, 0x65, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x12, 0x16, 0x0a, 0x06, 0x70, 0x69, 0x6e, 0x6e, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x06, 0x70, 0x69, 0x6e, 0x6e, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x03, + 0x48, 0x00, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, + 0x39, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x0e, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, + 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x3d, 0x0a, 0x09, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, + 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x09, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x22, 0x67, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x38, 0x0a, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6d, 0x65, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x22, 0x3c, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x22, 0x58, + 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x3d, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, + 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, + 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, + 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, + 0x52, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x22, 0x20, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4d, 0x65, + 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x22, 0x39, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x04, - 0x6d, 0x65, 0x6d, 0x6f, 0x22, 0x23, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, - 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x22, 0x14, 0x0a, 0x12, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x5f, 0x0a, 0x17, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x34, 0x0a, 0x09, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, - 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x22, 0x1a, 0x0a, 0x18, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x0a, 0x18, - 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x22, 0x51, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, - 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x63, 0x0a, 0x17, 0x53, - 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, - 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x22, 0x1a, 0x0a, 0x18, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x0a, 0x18, - 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x22, 0x55, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, - 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, - 0x63, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, - 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x37, 0x0a, 0x06, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x65, - 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x06, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x22, 0x43, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, - 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x26, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, - 0x65, 0x6d, 0x6f, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x22, 0x29, 0x0a, 0x17, 0x4c, 0x69, 0x73, - 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x02, 0x69, 0x64, 0x22, 0x44, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, - 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x28, 0x0a, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, - 0x65, 0x6d, 0x6f, 0x52, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x22, 0x62, 0x0a, 0x18, 0x47, 0x65, - 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 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, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x69, - 0x6d, 0x65, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x69, - 0x6d, 0x65, 0x7a, 0x6f, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x9f, - 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x53, - 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x05, - 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6d, 0x65, - 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, - 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x2a, 0x50, 0x0a, 0x0a, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1a, - 0x0a, 0x16, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53, - 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x52, - 0x49, 0x56, 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x50, 0x52, 0x4f, 0x54, 0x45, - 0x43, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, - 0x10, 0x03, 0x32, 0xb1, 0x0c, 0x0a, 0x0b, 0x4d, 0x65, 0x6d, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x69, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, - 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x20, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x3a, 0x01, 0x2a, 0x22, 0x0d, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x12, 0x63, 0x0a, - 0x09, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x12, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, - 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, - 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, - 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, - 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6d, 0x65, 0x6d, - 0x6f, 0x73, 0x12, 0x67, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x12, 0x1c, 0x2e, - 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, - 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6d, 0x65, - 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, - 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0xda, 0x41, 0x02, 0x69, - 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, - 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x80, 0x01, 0x0a, 0x0a, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, - 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, 0x65, - 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0xda, - 0x41, 0x0f, 0x69, 0x64, 0x2c, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, - 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x01, 0x2a, 0x32, 0x12, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x76, 0x32, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x70, - 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x12, 0x1f, 0x2e, 0x6d, - 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, - 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x1f, 0xda, 0x41, 0x02, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x2a, 0x12, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, - 0x12, 0x8f, 0x01, 0x0a, 0x10, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x25, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, - 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x65, 0x74, 0x4d, - 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0xda, 0x41, 0x02, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x21, 0x3a, 0x01, 0x2a, 0x22, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6d, 0x65, - 0x6d, 0x6f, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x73, 0x12, 0x8f, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, + 0x6d, 0x65, 0x6d, 0x6f, 0x22, 0x2a, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 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, 0x3f, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x42, 0x79, 0x4e, 0x61, 0x6d, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x6d, 0x65, 0x6d, + 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x04, 0x6d, 0x65, 0x6d, + 0x6f, 0x22, 0x88, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x26, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x12, + 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x03, + 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, 0x3c, 0x0a, 0x12, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x22, 0x23, 0x0a, 0x11, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x22, + 0x14, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5f, 0x0a, 0x17, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x27, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0xda, 0x41, 0x02, 0x69, 0x64, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, - 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x12, 0x8f, 0x01, 0x0a, 0x10, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, - 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, - 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, - 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0xda, 0x41, 0x02, 0x69, 0x64, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x01, 0x2a, 0x22, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x32, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x8f, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x4d, - 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x2e, 0x6d, - 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0xda, - 0x41, 0x02, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x76, 0x32, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x72, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x8e, 0x01, 0x0a, 0x11, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x26, - 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x34, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x1a, 0x0a, 0x18, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, + 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x2a, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x22, 0x51, + 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x09, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x73, 0x22, 0x63, 0x0a, 0x17, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x38, 0x0a, 0x09, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, + 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x1a, 0x0a, 0x18, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, + 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x2a, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x22, 0x55, + 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x72, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, + 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x63, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, + 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x37, 0x0a, 0x06, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x52, 0x06, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x22, 0x43, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, - 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x28, 0xda, 0x41, 0x02, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x22, 0x1b, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, - 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x8b, 0x01, 0x0a, 0x10, 0x4c, 0x69, - 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x25, - 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x22, + 0x29, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x22, 0x44, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0xda, - 0x41, 0x02, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x76, 0x32, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x63, - 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x8c, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x55, - 0x73, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x26, 0x2e, - 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, - 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, + 0x22, 0x62, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x6f, 0x73, + 0x53, 0x74, 0x61, 0x74, 0x73, 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, + 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x7a, 0x6f, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x22, 0x9f, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, + 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x48, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x32, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x53, 0x74, 0x61, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x1a, 0x38, 0x0a, 0x0a, + 0x53, 0x74, 0x61, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, 0x50, 0x0a, 0x0a, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x16, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, + 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, 0x0d, 0x0a, + 0x09, 0x50, 0x52, 0x4f, 0x54, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, + 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x10, 0x03, 0x32, 0xb0, 0x0d, 0x0a, 0x0b, 0x4d, 0x65, 0x6d, + 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x69, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, + 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x12, 0x3a, 0x01, 0x2a, 0x22, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6d, 0x65, + 0x6d, 0x6f, 0x73, 0x12, 0x63, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, + 0x12, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x32, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x12, 0x67, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4d, + 0x65, 0x6d, 0x6f, 0x12, 0x1c, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x1f, 0xda, 0x41, 0x02, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x7b, 0x69, 0x64, + 0x7d, 0x12, 0x7d, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x42, 0x79, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x22, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x42, 0x79, 0x4e, + 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0xda, 0x41, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x32, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, + 0x12, 0x80, 0x01, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x12, + 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x20, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x2f, 0xda, 0x41, 0x0f, 0x69, 0x64, 0x2c, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x01, 0x2a, 0x32, + 0x12, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x7b, + 0x69, 0x64, 0x7d, 0x12, 0x70, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, + 0x6f, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0xda, 0x41, 0x02, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x14, 0x2a, 0x12, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, + 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x8f, 0x01, 0x0a, 0x10, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, + 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x25, 0x2e, 0x6d, 0x65, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, + 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0xda, 0x41, 0x02, 0x69, 0x64, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x01, 0x2a, 0x22, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x32, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x8f, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, + 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x26, 0x2e, + 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x6f, - 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, - 0xda, 0x41, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x15, 0x12, 0x13, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, - 0x2f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x42, 0xa8, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, - 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x10, 0x4d, 0x65, 0x6d, - 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d, - 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 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, 0x4d, 0x41, 0x58, 0xaa, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, - 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, - 0x70, 0x69, 0x5c, 0x56, 0x32, 0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, - 0x69, 0x5c, 0x56, 0x32, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x0e, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, - 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, + 0xda, 0x41, 0x02, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x8f, 0x01, 0x0a, 0x10, 0x53, 0x65, + 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, + 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x65, + 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0xda, + 0x41, 0x02, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x01, 0x2a, 0x22, 0x1c, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x7b, 0x69, 0x64, + 0x7d, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x8f, 0x01, 0x0a, 0x11, + 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, + 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x29, 0xda, 0x41, 0x02, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, + 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x7b, + 0x69, 0x64, 0x7d, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x8e, 0x01, + 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, + 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x65, + 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0xda, 0x41, 0x02, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x1d, 0x22, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, + 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x8b, + 0x01, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x12, 0x25, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x65, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, + 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x28, 0xda, 0x41, 0x02, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, + 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x7b, + 0x69, 0x64, 0x7d, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x8c, 0x01, 0x0a, + 0x11, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x53, 0x74, 0x61, + 0x74, 0x73, 0x12, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x53, 0x74, + 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x65, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, + 0x72, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x26, 0xda, 0x41, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, + 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x42, 0xa8, 0x01, 0x0a, 0x10, + 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x42, 0x10, 0x4d, 0x65, 0x6d, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 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, 0x4d, 0x41, 0x58, 0xaa, 0x02, 0x0c, 0x4d, + 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x0c, 0x4d, 0x65, + 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, 0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, + 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, + 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1724,7 +1844,7 @@ func file_api_v2_memo_service_proto_rawDescGZIP() []byte { } var file_api_v2_memo_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_api_v2_memo_service_proto_msgTypes = make([]protoimpl.MessageInfo, 26) +var file_api_v2_memo_service_proto_msgTypes = make([]protoimpl.MessageInfo, 28) var file_api_v2_memo_service_proto_goTypes = []interface{}{ (Visibility)(0), // 0: memos.api.v2.Visibility (*Memo)(nil), // 1: memos.api.v2.Memo @@ -1734,85 +1854,90 @@ var file_api_v2_memo_service_proto_goTypes = []interface{}{ (*ListMemosResponse)(nil), // 5: memos.api.v2.ListMemosResponse (*GetMemoRequest)(nil), // 6: memos.api.v2.GetMemoRequest (*GetMemoResponse)(nil), // 7: memos.api.v2.GetMemoResponse - (*UpdateMemoRequest)(nil), // 8: memos.api.v2.UpdateMemoRequest - (*UpdateMemoResponse)(nil), // 9: memos.api.v2.UpdateMemoResponse - (*DeleteMemoRequest)(nil), // 10: memos.api.v2.DeleteMemoRequest - (*DeleteMemoResponse)(nil), // 11: memos.api.v2.DeleteMemoResponse - (*SetMemoResourcesRequest)(nil), // 12: memos.api.v2.SetMemoResourcesRequest - (*SetMemoResourcesResponse)(nil), // 13: memos.api.v2.SetMemoResourcesResponse - (*ListMemoResourcesRequest)(nil), // 14: memos.api.v2.ListMemoResourcesRequest - (*ListMemoResourcesResponse)(nil), // 15: memos.api.v2.ListMemoResourcesResponse - (*SetMemoRelationsRequest)(nil), // 16: memos.api.v2.SetMemoRelationsRequest - (*SetMemoRelationsResponse)(nil), // 17: memos.api.v2.SetMemoRelationsResponse - (*ListMemoRelationsRequest)(nil), // 18: memos.api.v2.ListMemoRelationsRequest - (*ListMemoRelationsResponse)(nil), // 19: memos.api.v2.ListMemoRelationsResponse - (*CreateMemoCommentRequest)(nil), // 20: memos.api.v2.CreateMemoCommentRequest - (*CreateMemoCommentResponse)(nil), // 21: memos.api.v2.CreateMemoCommentResponse - (*ListMemoCommentsRequest)(nil), // 22: memos.api.v2.ListMemoCommentsRequest - (*ListMemoCommentsResponse)(nil), // 23: memos.api.v2.ListMemoCommentsResponse - (*GetUserMemosStatsRequest)(nil), // 24: memos.api.v2.GetUserMemosStatsRequest - (*GetUserMemosStatsResponse)(nil), // 25: memos.api.v2.GetUserMemosStatsResponse - nil, // 26: memos.api.v2.GetUserMemosStatsResponse.StatsEntry - (RowStatus)(0), // 27: memos.api.v2.RowStatus - (*timestamppb.Timestamp)(nil), // 28: google.protobuf.Timestamp - (*Node)(nil), // 29: memos.api.v2.Node - (*Resource)(nil), // 30: memos.api.v2.Resource - (*MemoRelation)(nil), // 31: memos.api.v2.MemoRelation - (*fieldmaskpb.FieldMask)(nil), // 32: google.protobuf.FieldMask + (*GetMemoByNameRequest)(nil), // 8: memos.api.v2.GetMemoByNameRequest + (*GetMemoByNameResponse)(nil), // 9: memos.api.v2.GetMemoByNameResponse + (*UpdateMemoRequest)(nil), // 10: memos.api.v2.UpdateMemoRequest + (*UpdateMemoResponse)(nil), // 11: memos.api.v2.UpdateMemoResponse + (*DeleteMemoRequest)(nil), // 12: memos.api.v2.DeleteMemoRequest + (*DeleteMemoResponse)(nil), // 13: memos.api.v2.DeleteMemoResponse + (*SetMemoResourcesRequest)(nil), // 14: memos.api.v2.SetMemoResourcesRequest + (*SetMemoResourcesResponse)(nil), // 15: memos.api.v2.SetMemoResourcesResponse + (*ListMemoResourcesRequest)(nil), // 16: memos.api.v2.ListMemoResourcesRequest + (*ListMemoResourcesResponse)(nil), // 17: memos.api.v2.ListMemoResourcesResponse + (*SetMemoRelationsRequest)(nil), // 18: memos.api.v2.SetMemoRelationsRequest + (*SetMemoRelationsResponse)(nil), // 19: memos.api.v2.SetMemoRelationsResponse + (*ListMemoRelationsRequest)(nil), // 20: memos.api.v2.ListMemoRelationsRequest + (*ListMemoRelationsResponse)(nil), // 21: memos.api.v2.ListMemoRelationsResponse + (*CreateMemoCommentRequest)(nil), // 22: memos.api.v2.CreateMemoCommentRequest + (*CreateMemoCommentResponse)(nil), // 23: memos.api.v2.CreateMemoCommentResponse + (*ListMemoCommentsRequest)(nil), // 24: memos.api.v2.ListMemoCommentsRequest + (*ListMemoCommentsResponse)(nil), // 25: memos.api.v2.ListMemoCommentsResponse + (*GetUserMemosStatsRequest)(nil), // 26: memos.api.v2.GetUserMemosStatsRequest + (*GetUserMemosStatsResponse)(nil), // 27: memos.api.v2.GetUserMemosStatsResponse + nil, // 28: memos.api.v2.GetUserMemosStatsResponse.StatsEntry + (RowStatus)(0), // 29: memos.api.v2.RowStatus + (*timestamppb.Timestamp)(nil), // 30: google.protobuf.Timestamp + (*Node)(nil), // 31: memos.api.v2.Node + (*Resource)(nil), // 32: memos.api.v2.Resource + (*MemoRelation)(nil), // 33: memos.api.v2.MemoRelation + (*fieldmaskpb.FieldMask)(nil), // 34: google.protobuf.FieldMask } var file_api_v2_memo_service_proto_depIdxs = []int32{ - 27, // 0: memos.api.v2.Memo.row_status:type_name -> memos.api.v2.RowStatus - 28, // 1: memos.api.v2.Memo.create_time:type_name -> google.protobuf.Timestamp - 28, // 2: memos.api.v2.Memo.update_time:type_name -> google.protobuf.Timestamp - 28, // 3: memos.api.v2.Memo.display_time:type_name -> google.protobuf.Timestamp - 29, // 4: memos.api.v2.Memo.nodes:type_name -> memos.api.v2.Node + 29, // 0: memos.api.v2.Memo.row_status:type_name -> memos.api.v2.RowStatus + 30, // 1: memos.api.v2.Memo.create_time:type_name -> google.protobuf.Timestamp + 30, // 2: memos.api.v2.Memo.update_time:type_name -> google.protobuf.Timestamp + 30, // 3: memos.api.v2.Memo.display_time:type_name -> google.protobuf.Timestamp + 31, // 4: memos.api.v2.Memo.nodes:type_name -> memos.api.v2.Node 0, // 5: memos.api.v2.Memo.visibility:type_name -> memos.api.v2.Visibility - 30, // 6: memos.api.v2.Memo.resources:type_name -> memos.api.v2.Resource - 31, // 7: memos.api.v2.Memo.relations:type_name -> memos.api.v2.MemoRelation + 32, // 6: memos.api.v2.Memo.resources:type_name -> memos.api.v2.Resource + 33, // 7: memos.api.v2.Memo.relations:type_name -> memos.api.v2.MemoRelation 0, // 8: memos.api.v2.CreateMemoRequest.visibility:type_name -> memos.api.v2.Visibility 1, // 9: memos.api.v2.CreateMemoResponse.memo:type_name -> memos.api.v2.Memo 1, // 10: memos.api.v2.ListMemosResponse.memos:type_name -> memos.api.v2.Memo 1, // 11: memos.api.v2.GetMemoResponse.memo:type_name -> memos.api.v2.Memo - 1, // 12: memos.api.v2.UpdateMemoRequest.memo:type_name -> memos.api.v2.Memo - 32, // 13: memos.api.v2.UpdateMemoRequest.update_mask:type_name -> google.protobuf.FieldMask - 1, // 14: memos.api.v2.UpdateMemoResponse.memo:type_name -> memos.api.v2.Memo - 30, // 15: memos.api.v2.SetMemoResourcesRequest.resources:type_name -> memos.api.v2.Resource - 30, // 16: memos.api.v2.ListMemoResourcesResponse.resources:type_name -> memos.api.v2.Resource - 31, // 17: memos.api.v2.SetMemoRelationsRequest.relations:type_name -> memos.api.v2.MemoRelation - 31, // 18: memos.api.v2.ListMemoRelationsResponse.relations:type_name -> memos.api.v2.MemoRelation - 2, // 19: memos.api.v2.CreateMemoCommentRequest.create:type_name -> memos.api.v2.CreateMemoRequest - 1, // 20: memos.api.v2.CreateMemoCommentResponse.memo:type_name -> memos.api.v2.Memo - 1, // 21: memos.api.v2.ListMemoCommentsResponse.memos:type_name -> memos.api.v2.Memo - 26, // 22: memos.api.v2.GetUserMemosStatsResponse.stats:type_name -> memos.api.v2.GetUserMemosStatsResponse.StatsEntry - 2, // 23: memos.api.v2.MemoService.CreateMemo:input_type -> memos.api.v2.CreateMemoRequest - 4, // 24: memos.api.v2.MemoService.ListMemos:input_type -> memos.api.v2.ListMemosRequest - 6, // 25: memos.api.v2.MemoService.GetMemo:input_type -> memos.api.v2.GetMemoRequest - 8, // 26: memos.api.v2.MemoService.UpdateMemo:input_type -> memos.api.v2.UpdateMemoRequest - 10, // 27: memos.api.v2.MemoService.DeleteMemo:input_type -> memos.api.v2.DeleteMemoRequest - 12, // 28: memos.api.v2.MemoService.SetMemoResources:input_type -> memos.api.v2.SetMemoResourcesRequest - 14, // 29: memos.api.v2.MemoService.ListMemoResources:input_type -> memos.api.v2.ListMemoResourcesRequest - 16, // 30: memos.api.v2.MemoService.SetMemoRelations:input_type -> memos.api.v2.SetMemoRelationsRequest - 18, // 31: memos.api.v2.MemoService.ListMemoRelations:input_type -> memos.api.v2.ListMemoRelationsRequest - 20, // 32: memos.api.v2.MemoService.CreateMemoComment:input_type -> memos.api.v2.CreateMemoCommentRequest - 22, // 33: memos.api.v2.MemoService.ListMemoComments:input_type -> memos.api.v2.ListMemoCommentsRequest - 24, // 34: memos.api.v2.MemoService.GetUserMemosStats:input_type -> memos.api.v2.GetUserMemosStatsRequest - 3, // 35: memos.api.v2.MemoService.CreateMemo:output_type -> memos.api.v2.CreateMemoResponse - 5, // 36: memos.api.v2.MemoService.ListMemos:output_type -> memos.api.v2.ListMemosResponse - 7, // 37: memos.api.v2.MemoService.GetMemo:output_type -> memos.api.v2.GetMemoResponse - 9, // 38: memos.api.v2.MemoService.UpdateMemo:output_type -> memos.api.v2.UpdateMemoResponse - 11, // 39: memos.api.v2.MemoService.DeleteMemo:output_type -> memos.api.v2.DeleteMemoResponse - 13, // 40: memos.api.v2.MemoService.SetMemoResources:output_type -> memos.api.v2.SetMemoResourcesResponse - 15, // 41: memos.api.v2.MemoService.ListMemoResources:output_type -> memos.api.v2.ListMemoResourcesResponse - 17, // 42: memos.api.v2.MemoService.SetMemoRelations:output_type -> memos.api.v2.SetMemoRelationsResponse - 19, // 43: memos.api.v2.MemoService.ListMemoRelations:output_type -> memos.api.v2.ListMemoRelationsResponse - 21, // 44: memos.api.v2.MemoService.CreateMemoComment:output_type -> memos.api.v2.CreateMemoCommentResponse - 23, // 45: memos.api.v2.MemoService.ListMemoComments:output_type -> memos.api.v2.ListMemoCommentsResponse - 25, // 46: memos.api.v2.MemoService.GetUserMemosStats:output_type -> memos.api.v2.GetUserMemosStatsResponse - 35, // [35:47] is the sub-list for method output_type - 23, // [23:35] is the sub-list for method input_type - 23, // [23:23] is the sub-list for extension type_name - 23, // [23:23] is the sub-list for extension extendee - 0, // [0:23] is the sub-list for field type_name + 1, // 12: memos.api.v2.GetMemoByNameResponse.memo:type_name -> memos.api.v2.Memo + 1, // 13: memos.api.v2.UpdateMemoRequest.memo:type_name -> memos.api.v2.Memo + 34, // 14: memos.api.v2.UpdateMemoRequest.update_mask:type_name -> google.protobuf.FieldMask + 1, // 15: memos.api.v2.UpdateMemoResponse.memo:type_name -> memos.api.v2.Memo + 32, // 16: memos.api.v2.SetMemoResourcesRequest.resources:type_name -> memos.api.v2.Resource + 32, // 17: memos.api.v2.ListMemoResourcesResponse.resources:type_name -> memos.api.v2.Resource + 33, // 18: memos.api.v2.SetMemoRelationsRequest.relations:type_name -> memos.api.v2.MemoRelation + 33, // 19: memos.api.v2.ListMemoRelationsResponse.relations:type_name -> memos.api.v2.MemoRelation + 2, // 20: memos.api.v2.CreateMemoCommentRequest.create:type_name -> memos.api.v2.CreateMemoRequest + 1, // 21: memos.api.v2.CreateMemoCommentResponse.memo:type_name -> memos.api.v2.Memo + 1, // 22: memos.api.v2.ListMemoCommentsResponse.memos:type_name -> memos.api.v2.Memo + 28, // 23: memos.api.v2.GetUserMemosStatsResponse.stats:type_name -> memos.api.v2.GetUserMemosStatsResponse.StatsEntry + 2, // 24: memos.api.v2.MemoService.CreateMemo:input_type -> memos.api.v2.CreateMemoRequest + 4, // 25: memos.api.v2.MemoService.ListMemos:input_type -> memos.api.v2.ListMemosRequest + 6, // 26: memos.api.v2.MemoService.GetMemo:input_type -> memos.api.v2.GetMemoRequest + 8, // 27: memos.api.v2.MemoService.GetMemoByName:input_type -> memos.api.v2.GetMemoByNameRequest + 10, // 28: memos.api.v2.MemoService.UpdateMemo:input_type -> memos.api.v2.UpdateMemoRequest + 12, // 29: memos.api.v2.MemoService.DeleteMemo:input_type -> memos.api.v2.DeleteMemoRequest + 14, // 30: memos.api.v2.MemoService.SetMemoResources:input_type -> memos.api.v2.SetMemoResourcesRequest + 16, // 31: memos.api.v2.MemoService.ListMemoResources:input_type -> memos.api.v2.ListMemoResourcesRequest + 18, // 32: memos.api.v2.MemoService.SetMemoRelations:input_type -> memos.api.v2.SetMemoRelationsRequest + 20, // 33: memos.api.v2.MemoService.ListMemoRelations:input_type -> memos.api.v2.ListMemoRelationsRequest + 22, // 34: memos.api.v2.MemoService.CreateMemoComment:input_type -> memos.api.v2.CreateMemoCommentRequest + 24, // 35: memos.api.v2.MemoService.ListMemoComments:input_type -> memos.api.v2.ListMemoCommentsRequest + 26, // 36: memos.api.v2.MemoService.GetUserMemosStats:input_type -> memos.api.v2.GetUserMemosStatsRequest + 3, // 37: memos.api.v2.MemoService.CreateMemo:output_type -> memos.api.v2.CreateMemoResponse + 5, // 38: memos.api.v2.MemoService.ListMemos:output_type -> memos.api.v2.ListMemosResponse + 7, // 39: memos.api.v2.MemoService.GetMemo:output_type -> memos.api.v2.GetMemoResponse + 9, // 40: memos.api.v2.MemoService.GetMemoByName:output_type -> memos.api.v2.GetMemoByNameResponse + 11, // 41: memos.api.v2.MemoService.UpdateMemo:output_type -> memos.api.v2.UpdateMemoResponse + 13, // 42: memos.api.v2.MemoService.DeleteMemo:output_type -> memos.api.v2.DeleteMemoResponse + 15, // 43: memos.api.v2.MemoService.SetMemoResources:output_type -> memos.api.v2.SetMemoResourcesResponse + 17, // 44: memos.api.v2.MemoService.ListMemoResources:output_type -> memos.api.v2.ListMemoResourcesResponse + 19, // 45: memos.api.v2.MemoService.SetMemoRelations:output_type -> memos.api.v2.SetMemoRelationsResponse + 21, // 46: memos.api.v2.MemoService.ListMemoRelations:output_type -> memos.api.v2.ListMemoRelationsResponse + 23, // 47: memos.api.v2.MemoService.CreateMemoComment:output_type -> memos.api.v2.CreateMemoCommentResponse + 25, // 48: memos.api.v2.MemoService.ListMemoComments:output_type -> memos.api.v2.ListMemoCommentsResponse + 27, // 49: memos.api.v2.MemoService.GetUserMemosStats:output_type -> memos.api.v2.GetUserMemosStatsResponse + 37, // [37:50] is the sub-list for method output_type + 24, // [24:37] is the sub-list for method input_type + 24, // [24:24] is the sub-list for extension type_name + 24, // [24:24] is the sub-list for extension extendee + 0, // [0:24] is the sub-list for field type_name } func init() { file_api_v2_memo_service_proto_init() } @@ -1910,7 +2035,7 @@ func file_api_v2_memo_service_proto_init() { } } file_api_v2_memo_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateMemoRequest); i { + switch v := v.(*GetMemoByNameRequest); i { case 0: return &v.state case 1: @@ -1922,7 +2047,7 @@ func file_api_v2_memo_service_proto_init() { } } file_api_v2_memo_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateMemoResponse); i { + switch v := v.(*GetMemoByNameResponse); i { case 0: return &v.state case 1: @@ -1934,7 +2059,7 @@ func file_api_v2_memo_service_proto_init() { } } file_api_v2_memo_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteMemoRequest); i { + switch v := v.(*UpdateMemoRequest); i { case 0: return &v.state case 1: @@ -1946,7 +2071,7 @@ func file_api_v2_memo_service_proto_init() { } } file_api_v2_memo_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteMemoResponse); i { + switch v := v.(*UpdateMemoResponse); i { case 0: return &v.state case 1: @@ -1958,7 +2083,7 @@ func file_api_v2_memo_service_proto_init() { } } file_api_v2_memo_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetMemoResourcesRequest); i { + switch v := v.(*DeleteMemoRequest); i { case 0: return &v.state case 1: @@ -1970,7 +2095,7 @@ func file_api_v2_memo_service_proto_init() { } } file_api_v2_memo_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetMemoResourcesResponse); i { + switch v := v.(*DeleteMemoResponse); i { case 0: return &v.state case 1: @@ -1982,7 +2107,7 @@ func file_api_v2_memo_service_proto_init() { } } file_api_v2_memo_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListMemoResourcesRequest); i { + switch v := v.(*SetMemoResourcesRequest); i { case 0: return &v.state case 1: @@ -1994,7 +2119,7 @@ func file_api_v2_memo_service_proto_init() { } } file_api_v2_memo_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListMemoResourcesResponse); i { + switch v := v.(*SetMemoResourcesResponse); i { case 0: return &v.state case 1: @@ -2006,7 +2131,7 @@ func file_api_v2_memo_service_proto_init() { } } file_api_v2_memo_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetMemoRelationsRequest); i { + switch v := v.(*ListMemoResourcesRequest); i { case 0: return &v.state case 1: @@ -2018,7 +2143,7 @@ func file_api_v2_memo_service_proto_init() { } } file_api_v2_memo_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetMemoRelationsResponse); i { + switch v := v.(*ListMemoResourcesResponse); i { case 0: return &v.state case 1: @@ -2030,7 +2155,7 @@ func file_api_v2_memo_service_proto_init() { } } file_api_v2_memo_service_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListMemoRelationsRequest); i { + switch v := v.(*SetMemoRelationsRequest); i { case 0: return &v.state case 1: @@ -2042,7 +2167,7 @@ func file_api_v2_memo_service_proto_init() { } } file_api_v2_memo_service_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListMemoRelationsResponse); i { + switch v := v.(*SetMemoRelationsResponse); i { case 0: return &v.state case 1: @@ -2054,7 +2179,7 @@ func file_api_v2_memo_service_proto_init() { } } file_api_v2_memo_service_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateMemoCommentRequest); i { + switch v := v.(*ListMemoRelationsRequest); i { case 0: return &v.state case 1: @@ -2066,7 +2191,7 @@ func file_api_v2_memo_service_proto_init() { } } file_api_v2_memo_service_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateMemoCommentResponse); i { + switch v := v.(*ListMemoRelationsResponse); i { case 0: return &v.state case 1: @@ -2078,7 +2203,7 @@ func file_api_v2_memo_service_proto_init() { } } file_api_v2_memo_service_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListMemoCommentsRequest); i { + switch v := v.(*CreateMemoCommentRequest); i { case 0: return &v.state case 1: @@ -2090,7 +2215,7 @@ func file_api_v2_memo_service_proto_init() { } } file_api_v2_memo_service_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListMemoCommentsResponse); i { + switch v := v.(*CreateMemoCommentResponse); i { case 0: return &v.state case 1: @@ -2102,7 +2227,7 @@ func file_api_v2_memo_service_proto_init() { } } file_api_v2_memo_service_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetUserMemosStatsRequest); i { + switch v := v.(*ListMemoCommentsRequest); i { case 0: return &v.state case 1: @@ -2114,6 +2239,30 @@ func file_api_v2_memo_service_proto_init() { } } file_api_v2_memo_service_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListMemoCommentsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v2_memo_service_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetUserMemosStatsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v2_memo_service_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetUserMemosStatsResponse); i { case 0: return &v.state @@ -2133,7 +2282,7 @@ func file_api_v2_memo_service_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_api_v2_memo_service_proto_rawDesc, NumEnums: 1, - NumMessages: 26, + NumMessages: 28, NumExtensions: 0, NumServices: 1, }, diff --git a/proto/gen/api/v2/memo_service.pb.gw.go b/proto/gen/api/v2/memo_service.pb.gw.go index 0bf722b4..0940a8f5 100644 --- a/proto/gen/api/v2/memo_service.pb.gw.go +++ b/proto/gen/api/v2/memo_service.pb.gw.go @@ -153,6 +153,58 @@ func local_request_MemoService_GetMemo_0(ctx context.Context, marshaler runtime. } +func request_MemoService_GetMemoByName_0(ctx context.Context, marshaler runtime.Marshaler, client MemoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetMemoByNameRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetMemoByName(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_MemoService_GetMemoByName_0(ctx context.Context, marshaler runtime.Marshaler, server MemoServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetMemoByNameRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetMemoByName(ctx, &protoReq) + return msg, metadata, err + +} + func request_MemoService_UpdateMemo_0(ctx context.Context, marshaler runtime.Marshaler, client MemoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq UpdateMemoRequest var metadata runtime.ServerMetadata @@ -752,6 +804,31 @@ func RegisterMemoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux }) + mux.Handle("GET", pattern_MemoService_GetMemoByName_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.MemoService/GetMemoByName", runtime.WithHTTPPathPattern("/api/v2/memos/{name}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MemoService_GetMemoByName_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MemoService_GetMemoByName_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("PATCH", pattern_MemoService_UpdateMemo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1084,6 +1161,28 @@ func RegisterMemoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux }) + mux.Handle("GET", pattern_MemoService_GetMemoByName_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.MemoService/GetMemoByName", runtime.WithHTTPPathPattern("/api/v2/memos/{name}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MemoService_GetMemoByName_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MemoService_GetMemoByName_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("PATCH", pattern_MemoService_UpdateMemo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1292,6 +1391,8 @@ var ( pattern_MemoService_GetMemo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v2", "memos", "id"}, "")) + pattern_MemoService_GetMemoByName_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v2", "memos", "name"}, "")) + pattern_MemoService_UpdateMemo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v2", "memos", "id"}, "")) pattern_MemoService_DeleteMemo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v2", "memos", "id"}, "")) @@ -1318,6 +1419,8 @@ var ( forward_MemoService_GetMemo_0 = runtime.ForwardResponseMessage + forward_MemoService_GetMemoByName_0 = runtime.ForwardResponseMessage + forward_MemoService_UpdateMemo_0 = runtime.ForwardResponseMessage forward_MemoService_DeleteMemo_0 = runtime.ForwardResponseMessage diff --git a/proto/gen/api/v2/memo_service_grpc.pb.go b/proto/gen/api/v2/memo_service_grpc.pb.go index 976a3925..a9639bfd 100644 --- a/proto/gen/api/v2/memo_service_grpc.pb.go +++ b/proto/gen/api/v2/memo_service_grpc.pb.go @@ -22,6 +22,7 @@ const ( MemoService_CreateMemo_FullMethodName = "/memos.api.v2.MemoService/CreateMemo" MemoService_ListMemos_FullMethodName = "/memos.api.v2.MemoService/ListMemos" MemoService_GetMemo_FullMethodName = "/memos.api.v2.MemoService/GetMemo" + MemoService_GetMemoByName_FullMethodName = "/memos.api.v2.MemoService/GetMemoByName" MemoService_UpdateMemo_FullMethodName = "/memos.api.v2.MemoService/UpdateMemo" MemoService_DeleteMemo_FullMethodName = "/memos.api.v2.MemoService/DeleteMemo" MemoService_SetMemoResources_FullMethodName = "/memos.api.v2.MemoService/SetMemoResources" @@ -43,6 +44,8 @@ type MemoServiceClient interface { ListMemos(ctx context.Context, in *ListMemosRequest, opts ...grpc.CallOption) (*ListMemosResponse, error) // GetMemo gets a memo by id. GetMemo(ctx context.Context, in *GetMemoRequest, opts ...grpc.CallOption) (*GetMemoResponse, error) + // GetMemoByName gets a memo by name. + GetMemoByName(ctx context.Context, in *GetMemoByNameRequest, opts ...grpc.CallOption) (*GetMemoByNameResponse, error) // UpdateMemo updates a memo. UpdateMemo(ctx context.Context, in *UpdateMemoRequest, opts ...grpc.CallOption) (*UpdateMemoResponse, error) // DeleteMemo deletes a memo by id. @@ -98,6 +101,15 @@ func (c *memoServiceClient) GetMemo(ctx context.Context, in *GetMemoRequest, opt return out, nil } +func (c *memoServiceClient) GetMemoByName(ctx context.Context, in *GetMemoByNameRequest, opts ...grpc.CallOption) (*GetMemoByNameResponse, error) { + out := new(GetMemoByNameResponse) + err := c.cc.Invoke(ctx, MemoService_GetMemoByName_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *memoServiceClient) UpdateMemo(ctx context.Context, in *UpdateMemoRequest, opts ...grpc.CallOption) (*UpdateMemoResponse, error) { out := new(UpdateMemoResponse) err := c.cc.Invoke(ctx, MemoService_UpdateMemo_FullMethodName, in, out, opts...) @@ -189,6 +201,8 @@ type MemoServiceServer interface { ListMemos(context.Context, *ListMemosRequest) (*ListMemosResponse, error) // GetMemo gets a memo by id. GetMemo(context.Context, *GetMemoRequest) (*GetMemoResponse, error) + // GetMemoByName gets a memo by name. + GetMemoByName(context.Context, *GetMemoByNameRequest) (*GetMemoByNameResponse, error) // UpdateMemo updates a memo. UpdateMemo(context.Context, *UpdateMemoRequest) (*UpdateMemoResponse, error) // DeleteMemo deletes a memo by id. @@ -223,6 +237,9 @@ func (UnimplementedMemoServiceServer) ListMemos(context.Context, *ListMemosReque func (UnimplementedMemoServiceServer) GetMemo(context.Context, *GetMemoRequest) (*GetMemoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetMemo not implemented") } +func (UnimplementedMemoServiceServer) GetMemoByName(context.Context, *GetMemoByNameRequest) (*GetMemoByNameResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetMemoByName not implemented") +} func (UnimplementedMemoServiceServer) UpdateMemo(context.Context, *UpdateMemoRequest) (*UpdateMemoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateMemo not implemented") } @@ -317,6 +334,24 @@ func _MemoService_GetMemo_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _MemoService_GetMemoByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetMemoByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MemoServiceServer).GetMemoByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MemoService_GetMemoByName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MemoServiceServer).GetMemoByName(ctx, req.(*GetMemoByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _MemoService_UpdateMemo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateMemoRequest) if err := dec(in); err != nil { @@ -498,6 +533,10 @@ var MemoService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetMemo", Handler: _MemoService_GetMemo_Handler, }, + { + MethodName: "GetMemoByName", + Handler: _MemoService_GetMemoByName_Handler, + }, { MethodName: "UpdateMemo", Handler: _MemoService_UpdateMemo_Handler, diff --git a/store/db/sqlite/memo.go b/store/db/sqlite/memo.go index fb1d8bf6..ab5cede6 100644 --- a/store/db/sqlite/memo.go +++ b/store/db/sqlite/memo.go @@ -10,11 +10,11 @@ import ( ) func (d *DB) CreateMemo(ctx context.Context, create *store.Memo) (*store.Memo, error) { - fields := []string{"`creator_id`", "`content`", "`visibility`"} - placeholder := []string{"?", "?", "?"} - args := []any{create.CreatorID, create.Content, create.Visibility} + fields := []string{"`resource_name`", "`creator_id`", "`content`", "`visibility`"} + placeholder := []string{"?", "?", "?", "?"} + args := []any{create.ResourceName, create.CreatorID, create.Content, create.Visibility} - stmt := "INSERT INTO memo (" + strings.Join(fields, ", ") + ") VALUES (" + strings.Join(placeholder, ", ") + ") RETURNING `id`, `created_ts`, `updated_ts`, `row_status`" + stmt := "INSERT INTO `memo` (" + strings.Join(fields, ", ") + ") VALUES (" + strings.Join(placeholder, ", ") + ") RETURNING `id`, `created_ts`, `updated_ts`, `row_status`" if err := d.db.QueryRowContext(ctx, stmt, args...).Scan( &create.ID, &create.CreatedTs, @@ -31,29 +31,32 @@ func (d *DB) ListMemos(ctx context.Context, find *store.FindMemo) ([]*store.Memo where, args := []string{"1 = 1"}, []any{} if v := find.ID; v != nil { - where, args = append(where, "memo.id = ?"), append(args, *v) + where, args = append(where, "`memo`.`id` = ?"), append(args, *v) + } + if v := find.ResourceName; v != nil { + where, args = append(where, "`memo`.`resource_name` = ?"), append(args, *v) } if v := find.CreatorID; v != nil { - where, args = append(where, "memo.creator_id = ?"), append(args, *v) + where, args = append(where, "`memo`.`creator_id` = ?"), append(args, *v) } if v := find.RowStatus; v != nil { - where, args = append(where, "memo.row_status = ?"), append(args, *v) + where, args = append(where, "`memo`.`row_status` = ?"), append(args, *v) } if v := find.CreatedTsBefore; v != nil { - where, args = append(where, "memo.created_ts < ?"), append(args, *v) + where, args = append(where, "`memo`.`created_ts` < ?"), append(args, *v) } if v := find.CreatedTsAfter; v != nil { - where, args = append(where, "memo.created_ts > ?"), append(args, *v) + where, args = append(where, "`memo`.`created_ts` > ?"), append(args, *v) } if v := find.UpdatedTsBefore; v != nil { - where, args = append(where, "memo.updated_ts < ?"), append(args, *v) + where, args = append(where, "`memo`.`updated_ts` < ?"), append(args, *v) } if v := find.UpdatedTsAfter; v != nil { - where, args = append(where, "memo.updated_ts > ?"), append(args, *v) + where, args = append(where, "`memo`.`updated_ts` > ?"), append(args, *v) } if v := find.ContentSearch; len(v) != 0 { for _, s := range v { - where, args = append(where, "memo.content LIKE ?"), append(args, fmt.Sprintf("%%%s%%", s)) + where, args = append(where, "`memo`.`content` LIKE ?"), append(args, fmt.Sprintf("%%%s%%", s)) } } if v := find.VisibilityList; len(v) != 0 { @@ -62,43 +65,43 @@ func (d *DB) ListMemos(ctx context.Context, find *store.FindMemo) ([]*store.Memo placeholder = append(placeholder, "?") args = append(args, visibility.String()) } - where = append(where, fmt.Sprintf("memo.visibility in (%s)", strings.Join(placeholder, ","))) + where = append(where, fmt.Sprintf("`memo`.`visibility` IN (%s)", strings.Join(placeholder, ","))) } if find.ExcludeComments { - where = append(where, "parent_id IS NULL") + where = append(where, "`parent_id` IS NULL") } orders := []string{} if find.OrderByPinned { - orders = append(orders, "pinned DESC") + orders = append(orders, "`pinned` DESC") } if find.OrderByUpdatedTs { - orders = append(orders, "updated_ts DESC") + orders = append(orders, "`updated_ts` DESC") } else { - orders = append(orders, "created_ts DESC") + orders = append(orders, "`created_ts` DESC") } - orders = append(orders, "id DESC") + orders = append(orders, "`id` DESC") fields := []string{ - `memo.id AS id`, - `memo.creator_id AS creator_id`, - `memo.created_ts AS created_ts`, - `memo.updated_ts AS updated_ts`, - `memo.row_status AS row_status`, - `memo.visibility AS visibility`, - `IFNULL(memo_organizer.pinned, 0) AS pinned`, - `memo_relation.related_memo_id AS parent_id`, + "`memo`.`id` AS `id`", + "`memo`.`resource_name` AS `resource_name`", + "`memo`.`creator_id` AS `creator_id`", + "`memo`.`created_ts` AS `created_ts`", + "`memo`.`updated_ts` AS `updated_ts`", + "`memo`.`row_status` AS `row_status`", + "`memo`.`visibility` AS `visibility`", + "IFNULL(`memo_organizer`.`pinned`, 0) AS `pinned`", + "`memo_relation`.`related_memo_id` AS `parent_id`", } if !find.ExcludeContent { - fields = append(fields, `memo.content AS content`) + fields = append(fields, "`memo`.`content` AS `content`") } - query := `SELECT ` + strings.Join(fields, ", ") + ` - FROM memo - LEFT JOIN memo_organizer ON memo.id = memo_organizer.memo_id AND memo.creator_id = memo_organizer.user_id - FULL JOIN memo_relation ON memo.id = memo_relation.memo_id AND memo_relation.type = "COMMENT" - WHERE ` + strings.Join(where, " AND ") + ` - ORDER BY ` + strings.Join(orders, ", ") + query := "SELECT " + strings.Join(fields, ", ") + "FROM `memo` " + + "LEFT JOIN `memo_organizer` ON `memo`.`id` = `memo_organizer`.`memo_id` AND `memo`.`creator_id` = `memo_organizer`.`user_id` " + + "FULL JOIN `memo_relation` ON `memo`.`id` = `memo_relation`.`memo_id` AND `memo_relation`.`type` = \"COMMENT\"" + " " + + "WHERE " + strings.Join(where, " AND ") + " " + + "ORDER BY " + strings.Join(orders, ", ") if find.Limit != nil { query = fmt.Sprintf("%s LIMIT %d", query, *find.Limit) if find.Offset != nil { @@ -117,6 +120,7 @@ func (d *DB) ListMemos(ctx context.Context, find *store.FindMemo) ([]*store.Memo var memo store.Memo dests := []any{ &memo.ID, + &memo.ResourceName, &memo.CreatorID, &memo.CreatedTs, &memo.UpdatedTs, @@ -143,24 +147,27 @@ func (d *DB) ListMemos(ctx context.Context, find *store.FindMemo) ([]*store.Memo func (d *DB) UpdateMemo(ctx context.Context, update *store.UpdateMemo) error { set, args := []string{}, []any{} + if v := update.ResourceName; v != nil { + set, args = append(set, "`resource_name` = ?"), append(args, *v) + } if v := update.CreatedTs; v != nil { - set, args = append(set, "created_ts = ?"), append(args, *v) + set, args = append(set, "`created_ts` = ?"), append(args, *v) } if v := update.UpdatedTs; v != nil { - set, args = append(set, "updated_ts = ?"), append(args, *v) + set, args = append(set, "`updated_ts` = ?"), append(args, *v) } if v := update.RowStatus; v != nil { - set, args = append(set, "row_status = ?"), append(args, *v) + set, args = append(set, "`row_status` = ?"), append(args, *v) } if v := update.Content; v != nil { - set, args = append(set, "content = ?"), append(args, *v) + set, args = append(set, "`content` = ?"), append(args, *v) } if v := update.Visibility; v != nil { - set, args = append(set, "visibility = ?"), append(args, *v) + set, args = append(set, "`visibility` = ?"), append(args, *v) } args = append(args, update.ID) - stmt := `UPDATE memo SET ` + strings.Join(set, ", ") + ` WHERE id = ?` + stmt := "UPDATE `memo` SET " + strings.Join(set, ", ") + " WHERE `id` = ?" if _, err := d.db.ExecContext(ctx, stmt, args...); err != nil { return err } @@ -168,8 +175,8 @@ func (d *DB) UpdateMemo(ctx context.Context, update *store.UpdateMemo) error { } func (d *DB) DeleteMemo(ctx context.Context, delete *store.DeleteMemo) error { - where, args := []string{"id = ?"}, []any{delete.ID} - stmt := `DELETE FROM memo WHERE ` + strings.Join(where, " AND ") + where, args := []string{"`id` = ?"}, []any{delete.ID} + stmt := "DELETE FROM `memo` WHERE " + strings.Join(where, " AND ") result, err := d.db.ExecContext(ctx, stmt, args...) if err != nil { return err @@ -186,16 +193,7 @@ func (d *DB) DeleteMemo(ctx context.Context, delete *store.DeleteMemo) error { } func vacuumMemo(ctx context.Context, tx *sql.Tx) error { - stmt := ` - DELETE FROM - memo - WHERE - creator_id NOT IN ( - SELECT - id - FROM - user - )` + stmt := "DELETE FROM `memo` WHERE `creator_id` NOT IN (SELECT `id` FROM `user`)" _, err := tx.ExecContext(ctx, stmt) if err != nil { return err diff --git a/store/db/sqlite/migration/dev/LATEST__SCHEMA.sql b/store/db/sqlite/migration/dev/LATEST__SCHEMA.sql index b5fb32f5..aa09178a 100644 --- a/store/db/sqlite/migration/dev/LATEST__SCHEMA.sql +++ b/store/db/sqlite/migration/dev/LATEST__SCHEMA.sql @@ -55,6 +55,7 @@ CREATE TABLE user_setting ( -- memo CREATE TABLE memo ( id INTEGER PRIMARY KEY AUTOINCREMENT, + resource_name TEXT NOT NULL UNIQUE, creator_id INTEGER NOT NULL, created_ts BIGINT NOT NULL DEFAULT (strftime('%s', 'now')), updated_ts BIGINT NOT NULL DEFAULT (strftime('%s', 'now')), diff --git a/store/db/sqlite/seed/10002__memo.sql b/store/db/sqlite/seed/10002__memo.sql index 2fb84812..1c97ccca 100644 --- a/store/db/sqlite/seed/10002__memo.sql +++ b/store/db/sqlite/seed/10002__memo.sql @@ -1,8 +1,14 @@ INSERT INTO - memo (`id`, `content`, `creator_id`) + memo ( + `id`, + `resource_name`, + `content`, + `creator_id` + ) VALUES ( 1, + "hello", "#Hello πŸ‘‹ Welcome to memos.", 101 ); @@ -10,6 +16,7 @@ VALUES INSERT INTO memo ( `id`, + `resource_name`, `content`, `creator_id`, `visibility` @@ -17,6 +24,7 @@ INSERT INTO VALUES ( 2, + "todo", '#TODO - [x] Take more photos about **πŸŒ„ sunset**; - [x] Clean the room; @@ -28,6 +36,7 @@ VALUES INSERT INTO memo ( `id`, + `resource_name`, `content`, `creator_id`, `visibility` @@ -35,6 +44,7 @@ INSERT INTO VALUES ( 3, + "links", '**[Memos](https://github.com/usememos/memos)**: A lightweight, self-hosted memo hub. Open Source and Free forever. **[Slash](https://github.com/yourselfhosted/slash)**: An open source, self-hosted bookmarks and link sharing platform. Save and share your links very easily.', 101, @@ -44,6 +54,7 @@ VALUES INSERT INTO memo ( `id`, + `resource_name`, `content`, `creator_id`, `visibility` @@ -51,6 +62,7 @@ INSERT INTO VALUES ( 4, + "todo2", '#TODO - [x] Take more photos about **πŸŒ„ sunset**; - [ ] Clean the classroom; @@ -62,6 +74,7 @@ VALUES INSERT INTO memo ( `id`, + `resource_name`, `content`, `creator_id`, `visibility` @@ -69,6 +82,7 @@ INSERT INTO VALUES ( 5, + "words", 'δΈ‰δΊΊθ‘ŒοΌŒεΏ…ζœ‰ζˆ‘εΈˆη„‰οΌπŸ‘¨β€πŸ«', 102, 'PUBLIC' diff --git a/store/memo.go b/store/memo.go index b59ce843..4d0953ab 100644 --- a/store/memo.go +++ b/store/memo.go @@ -2,6 +2,9 @@ package store import ( "context" + "errors" + + "github.com/usememos/memos/internal/util" ) // Visibility is the type of a visibility. @@ -29,7 +32,8 @@ func (v Visibility) String() string { } type Memo struct { - ID int32 + ID int32 + ResourceName string // Standard fields RowStatus RowStatus @@ -47,7 +51,8 @@ type Memo struct { } type FindMemo struct { - ID *int32 + ID *int32 + ResourceName *string // Standard fields RowStatus *RowStatus @@ -71,12 +76,13 @@ type FindMemo struct { } type UpdateMemo struct { - ID int32 - CreatedTs *int64 - UpdatedTs *int64 - RowStatus *RowStatus - Content *string - Visibility *Visibility + ID int32 + ResourceName *string + CreatedTs *int64 + UpdatedTs *int64 + RowStatus *RowStatus + Content *string + Visibility *Visibility } type DeleteMemo struct { @@ -84,6 +90,9 @@ type DeleteMemo struct { } func (s *Store) CreateMemo(ctx context.Context, create *Memo) (*Memo, error) { + if !util.ResourceNameMatcher.MatchString(create.ResourceName) { + return nil, errors.New("resource name is invalid") + } return s.driver.CreateMemo(ctx, create) } @@ -105,6 +114,9 @@ func (s *Store) GetMemo(ctx context.Context, find *FindMemo) (*Memo, error) { } func (s *Store) UpdateMemo(ctx context.Context, update *UpdateMemo) error { + if update.ResourceName != nil && !util.ResourceNameMatcher.MatchString(*update.ResourceName) { + return errors.New("resource name is invalid") + } return s.driver.UpdateMemo(ctx, update) } diff --git a/test/store/memo_organizer_test.go b/test/store/memo_organizer_test.go index 592fe319..4243a01a 100644 --- a/test/store/memo_organizer_test.go +++ b/test/store/memo_organizer_test.go @@ -15,9 +15,10 @@ func TestMemoOrganizerStore(t *testing.T) { user, err := createTestingHostUser(ctx, ts) require.NoError(t, err) memoCreate := &store.Memo{ - CreatorID: user.ID, - Content: "main memo content", - Visibility: store.Public, + ResourceName: "main-memo", + CreatorID: user.ID, + Content: "main memo content", + Visibility: store.Public, } memo, err := ts.CreateMemo(ctx, memoCreate) require.NoError(t, err) diff --git a/test/store/memo_relation_test.go b/test/store/memo_relation_test.go index dac40008..bf825608 100644 --- a/test/store/memo_relation_test.go +++ b/test/store/memo_relation_test.go @@ -15,25 +15,28 @@ func TestMemoRelationStore(t *testing.T) { user, err := createTestingHostUser(ctx, ts) require.NoError(t, err) memoCreate := &store.Memo{ - CreatorID: user.ID, - Content: "main memo content", - Visibility: store.Public, + ResourceName: "main-memo", + CreatorID: user.ID, + Content: "main memo content", + Visibility: store.Public, } memo, err := ts.CreateMemo(ctx, memoCreate) require.NoError(t, err) require.Equal(t, memoCreate.Content, memo.Content) relatedMemoCreate := &store.Memo{ - CreatorID: user.ID, - Content: "related memo content", - Visibility: store.Public, + ResourceName: "related-memo", + CreatorID: user.ID, + Content: "related memo content", + Visibility: store.Public, } relatedMemo, err := ts.CreateMemo(ctx, relatedMemoCreate) require.NoError(t, err) require.Equal(t, relatedMemoCreate.Content, relatedMemo.Content) commentMemoCreate := &store.Memo{ - CreatorID: user.ID, - Content: "comment memo content", - Visibility: store.Public, + ResourceName: "comment-memo", + CreatorID: user.ID, + Content: "comment memo content", + Visibility: store.Public, } commentMemo, err := ts.CreateMemo(ctx, commentMemoCreate) require.NoError(t, err) diff --git a/test/store/memo_test.go b/test/store/memo_test.go index 9337468d..c9a929ba 100644 --- a/test/store/memo_test.go +++ b/test/store/memo_test.go @@ -15,9 +15,10 @@ func TestMemoStore(t *testing.T) { user, err := createTestingHostUser(ctx, ts) require.NoError(t, err) memoCreate := &store.Memo{ - CreatorID: user.ID, - Content: "test_content", - Visibility: store.Public, + ResourceName: "test-resource-name", + CreatorID: user.ID, + Content: "test_content", + Visibility: store.Public, } memo, err := ts.CreateMemo(ctx, memoCreate) require.NoError(t, err) @@ -67,9 +68,10 @@ func TestDeleteMemoStore(t *testing.T) { user, err := createTestingHostUser(ctx, ts) require.NoError(t, err) memoCreate := &store.Memo{ - CreatorID: user.ID, - Content: "test_content", - Visibility: store.Public, + ResourceName: "test-resource-name", + CreatorID: user.ID, + Content: "test_content", + Visibility: store.Public, } memo, err := ts.CreateMemo(ctx, memoCreate) require.NoError(t, err)