Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.
Go dockerfossgomarkdownmemomicroblognote-takingnotesopen-sourceown-your-datareactself-hostedsqlitetimeline
feat: implement shortcuts
johnnyjoy14c72fa7df40
diff --git a/proto/api/v1/user_service.proto b/proto/api/v1/user_service.protoindex c9f3bc3bc..23f4b0c54 100644--- a/proto/api/v1/user_service.proto+++ b/proto/api/v1/user_service.proto@@ -94,6 +94,32 @@ service UserService {option (google.api.http) = {delete: "/api/v1/{name=users/*}/access_tokens/{access_token}"};option (google.api.method_signature) = "name,access_token";}+ // ListShortcuts returns a list of shortcuts for a user.+ rpc ListShortcuts(ListShortcutsRequest) returns (ListShortcutsResponse) {+ option (google.api.http) = {get: "/api/v1/{parent=users/*}/shortcuts"};+ option (google.api.method_signature) = "parent";+ }+ // CreateShortcut creates a new shortcut for a user.+ rpc CreateShortcut(CreateShortcutRequest) returns (Shortcut) {+ option (google.api.http) = {+ post: "/api/v1/{parent=users/*}/shortcuts"+ body: "shortcut"+ };+ option (google.api.method_signature) = "parent,shortcut";+ }+ // UpdateShortcut updates a shortcut for a user.+ rpc UpdateShortcut(UpdateShortcutRequest) returns (Shortcut) {+ option (google.api.http) = {+ patch: "/api/v1/{parent=users/*}/shortcuts/{shortcut.id}"+ body: "shortcut"+ };+ option (google.api.method_signature) = "parent,shortcut,update_mask";+ }+ // DeleteShortcut deletes a shortcut for a user.+ rpc DeleteShortcut(DeleteShortcutRequest) returns (google.protobuf.Empty) {+ option (google.api.http) = {delete: "/api/v1/{parent=users/*}/shortcuts/{id}"};+ option (google.api.method_signature) = "parent,id";+ }}message User {@@ -254,3 +280,42 @@ message DeleteUserAccessTokenRequest {// access_token is the access token to delete.string access_token = 2;}++message Shortcut {+ string id = 1;+ string title = 2;+ string filter = 3;+}++message ListShortcutsRequest {+ // The name of the user.+ string parent = 1;+}++message ListShortcutsResponse {+ repeated Shortcut shortcuts = 1;+}++message CreateShortcutRequest {+ // The name of the user.+ string parent = 1;++ Shortcut shortcut = 2;+}++message UpdateShortcutRequest {+ // The name of the user.+ string parent = 1;++ Shortcut shortcut = 2;++ google.protobuf.FieldMask update_mask = 3;+}++message DeleteShortcutRequest {+ // The name of the user.+ string parent = 1;++ // The id of the shortcut.+ string id = 2;+}diff --git a/proto/gen/api/v1/user_service.pb.go b/proto/gen/api/v1/user_service.pb.goindex 51ec9f983..0d87b1aa2 100644--- a/proto/gen/api/v1/user_service.pb.go+++ b/proto/gen/api/v1/user_service.pb.go@@ -1209,6 +1209,323 @@ func (x *DeleteUserAccessTokenRequest) GetAccessToken() string {return ""}+type Shortcut struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`+ Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`+ Filter string `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *Shortcut) Reset() {+ *x = Shortcut{}+ mi := &file_api_v1_user_service_proto_msgTypes[21]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *Shortcut) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*Shortcut) ProtoMessage() {}++func (x *Shortcut) ProtoReflect() protoreflect.Message {+ mi := &file_api_v1_user_service_proto_msgTypes[21]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use Shortcut.ProtoReflect.Descriptor instead.+func (*Shortcut) Descriptor() ([]byte, []int) {+ return file_api_v1_user_service_proto_rawDescGZIP(), []int{21}+}++func (x *Shortcut) GetId() string {+ if x != nil {+ return x.Id+ }+ return ""+}++func (x *Shortcut) GetTitle() string {+ if x != nil {+ return x.Title+ }+ return ""+}++func (x *Shortcut) GetFilter() string {+ if x != nil {+ return x.Filter+ }+ return ""+}++type ListShortcutsRequest struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ // The name of the user.+ Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *ListShortcutsRequest) Reset() {+ *x = ListShortcutsRequest{}+ mi := &file_api_v1_user_service_proto_msgTypes[22]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *ListShortcutsRequest) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*ListShortcutsRequest) ProtoMessage() {}++func (x *ListShortcutsRequest) ProtoReflect() protoreflect.Message {+ mi := &file_api_v1_user_service_proto_msgTypes[22]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use ListShortcutsRequest.ProtoReflect.Descriptor instead.+func (*ListShortcutsRequest) Descriptor() ([]byte, []int) {+ return file_api_v1_user_service_proto_rawDescGZIP(), []int{22}+}++func (x *ListShortcutsRequest) GetParent() string {+ if x != nil {+ return x.Parent+ }+ return ""+}++type ListShortcutsResponse struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ Shortcuts []*Shortcut `protobuf:"bytes,1,rep,name=shortcuts,proto3" json:"shortcuts,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *ListShortcutsResponse) Reset() {+ *x = ListShortcutsResponse{}+ mi := &file_api_v1_user_service_proto_msgTypes[23]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *ListShortcutsResponse) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*ListShortcutsResponse) ProtoMessage() {}++func (x *ListShortcutsResponse) ProtoReflect() protoreflect.Message {+ mi := &file_api_v1_user_service_proto_msgTypes[23]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use ListShortcutsResponse.ProtoReflect.Descriptor instead.+func (*ListShortcutsResponse) Descriptor() ([]byte, []int) {+ return file_api_v1_user_service_proto_rawDescGZIP(), []int{23}+}++func (x *ListShortcutsResponse) GetShortcuts() []*Shortcut {+ if x != nil {+ return x.Shortcuts+ }+ return nil+}++type CreateShortcutRequest struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ // The name of the user.+ Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`+ Shortcut *Shortcut `protobuf:"bytes,2,opt,name=shortcut,proto3" json:"shortcut,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *CreateShortcutRequest) Reset() {+ *x = CreateShortcutRequest{}+ mi := &file_api_v1_user_service_proto_msgTypes[24]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *CreateShortcutRequest) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*CreateShortcutRequest) ProtoMessage() {}++func (x *CreateShortcutRequest) ProtoReflect() protoreflect.Message {+ mi := &file_api_v1_user_service_proto_msgTypes[24]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use CreateShortcutRequest.ProtoReflect.Descriptor instead.+func (*CreateShortcutRequest) Descriptor() ([]byte, []int) {+ return file_api_v1_user_service_proto_rawDescGZIP(), []int{24}+}++func (x *CreateShortcutRequest) GetParent() string {+ if x != nil {+ return x.Parent+ }+ return ""+}++func (x *CreateShortcutRequest) GetShortcut() *Shortcut {+ if x != nil {+ return x.Shortcut+ }+ return nil+}++type UpdateShortcutRequest struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ // The name of the user.+ Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`+ Shortcut *Shortcut `protobuf:"bytes,2,opt,name=shortcut,proto3" json:"shortcut,omitempty"`+ UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,3,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *UpdateShortcutRequest) Reset() {+ *x = UpdateShortcutRequest{}+ mi := &file_api_v1_user_service_proto_msgTypes[25]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *UpdateShortcutRequest) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*UpdateShortcutRequest) ProtoMessage() {}++func (x *UpdateShortcutRequest) ProtoReflect() protoreflect.Message {+ mi := &file_api_v1_user_service_proto_msgTypes[25]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use UpdateShortcutRequest.ProtoReflect.Descriptor instead.+func (*UpdateShortcutRequest) Descriptor() ([]byte, []int) {+ return file_api_v1_user_service_proto_rawDescGZIP(), []int{25}+}++func (x *UpdateShortcutRequest) GetParent() string {+ if x != nil {+ return x.Parent+ }+ return ""+}++func (x *UpdateShortcutRequest) GetShortcut() *Shortcut {+ if x != nil {+ return x.Shortcut+ }+ return nil+}++func (x *UpdateShortcutRequest) GetUpdateMask() *fieldmaskpb.FieldMask {+ if x != nil {+ return x.UpdateMask+ }+ return nil+}++type DeleteShortcutRequest struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ // The name of the user.+ Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`+ // The id of the shortcut.+ Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *DeleteShortcutRequest) Reset() {+ *x = DeleteShortcutRequest{}+ mi := &file_api_v1_user_service_proto_msgTypes[26]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *DeleteShortcutRequest) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*DeleteShortcutRequest) ProtoMessage() {}++func (x *DeleteShortcutRequest) ProtoReflect() protoreflect.Message {+ mi := &file_api_v1_user_service_proto_msgTypes[26]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use DeleteShortcutRequest.ProtoReflect.Descriptor instead.+func (*DeleteShortcutRequest) Descriptor() ([]byte, []int) {+ return file_api_v1_user_service_proto_rawDescGZIP(), []int{26}+}++func (x *DeleteShortcutRequest) GetParent() string {+ if x != nil {+ return x.Parent+ }+ return ""+}++func (x *DeleteShortcutRequest) GetId() string {+ if x != nil {+ return x.Id+ }+ return ""+}+type UserStats_MemoTypeStats struct {state protoimpl.MessageState `protogen:"open.v1"`LinkCount int32 `protobuf:"varint,1,opt,name=link_count,json=linkCount,proto3" json:"link_count,omitempty"`@@ -1221,7 +1538,7 @@ type UserStats_MemoTypeStats struct {func (x *UserStats_MemoTypeStats) Reset() {*x = UserStats_MemoTypeStats{}- mi := &file_api_v1_user_service_proto_msgTypes[22]+ mi := &file_api_v1_user_service_proto_msgTypes[28]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1233,7 +1550,7 @@ func (x *UserStats_MemoTypeStats) String() string {func (*UserStats_MemoTypeStats) ProtoMessage() {}func (x *UserStats_MemoTypeStats) ProtoReflect() protoreflect.Message {- mi := &file_api_v1_user_service_proto_msgTypes[22]+ mi := &file_api_v1_user_service_proto_msgTypes[28]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1456,135 +1773,206 @@ var file_api_v1_user_service_proto_rawDesc = string([]byte{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, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63,0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,- 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xc2, 0x0e, 0x0a,- 0x0b, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x63, 0x0a, 0x09,- 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f,- 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65,- 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f,- 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65,- 0x72, 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, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72,- 0x73, 0x12, 0x62, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x6d,+ 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x48, 0x0a, 0x08,+ 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c,+ 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 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, 0x2e, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x68,+ 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16,+ 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,+ 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x22, 0x4d, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x68,+ 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,+ 0x34, 0x0a, 0x09, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03,+ 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76,+ 0x31, 0x2e, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x52, 0x09, 0x73, 0x68, 0x6f, 0x72,+ 0x74, 0x63, 0x75, 0x74, 0x73, 0x22, 0x63, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53,+ 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16,+ 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,+ 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x08, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63,+ 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73,+ 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74,+ 0x52, 0x08, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x22, 0xa0, 0x01, 0x0a, 0x15, 0x55,+ 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x52, 0x65, 0x71,+ 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01,+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x08,+ 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16,+ 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68,+ 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x52, 0x08, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74,+ 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, 0x3f, 0x0a,+ 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x52,+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74,+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x0e,+ 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x32, 0xa9,+ 0x13, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x63,+ 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x1e, 0x2e, 0x6d, 0x65,+ 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55,+ 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6d, 0x65,+ 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55,+ 0x73, 0x65, 0x72, 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, 0x31, 0x2f, 0x75, 0x73,+ 0x65, 0x72, 0x73, 0x12, 0x62, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1c,+ 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65,+ 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6d,+ 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72,+ 0x22, 0x25, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12,+ 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75,+ 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x7a, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x55, 0x73,+ 0x65, 0x72, 0x42, 0x79, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x2e, 0x6d,0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55,- 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6d, 0x65, 0x6d,- 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x25,- 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f,- 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65,- 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x7a, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72,- 0x42, 0x79, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x2e, 0x6d, 0x65, 0x6d,- 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65,- 0x72, 0x42, 0x79, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,- 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76,- 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x29, 0xda, 0x41, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e,- 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f,- 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x3a, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d,- 0x65, 0x12, 0x81, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x76, 0x61,- 0x74, 0x61, 0x72, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x12, 0x28, 0x2e, 0x6d, 0x65, 0x6d, 0x6f,- 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72,- 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75,- 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69,- 0x2e, 0x48, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x22, 0x2a, 0xda, 0x41, 0x04, 0x6e, 0x61,- 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x2f,- 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x61,- 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x65, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55,- 0x73, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e,- 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71,+ 0x73, 0x65, 0x72, 0x42, 0x79, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71,0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69,- 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x22, 0xda, 0x41, 0x04, 0x75, 0x73, 0x65,- 0x72, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x3a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x0d, 0x2f,- 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x7f, 0x0a, 0x0a,- 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x6d,- 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,- 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6d, 0x65,- 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22,- 0x3c, 0xda, 0x41, 0x10, 0x75, 0x73, 0x65, 0x72, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f,- 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x3a, 0x04, 0x75, 0x73, 0x65, 0x72,- 0x32, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x2e,- 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x6c, 0x0a,- 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x6d, 0x65,- 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74,- 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67,- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45,- 0x6d, 0x70, 0x74, 0x79, 0x22, 0x25, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4,- 0x93, 0x02, 0x18, 0x2a, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61,- 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x80, 0x01, 0x0a, 0x10,- 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73,- 0x12, 0x25, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e,- 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73,- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e,- 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x55, 0x73,- 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,- 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x22, 0x15, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31,- 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2d, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x12, 0x77,- 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x21,- 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65,- 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,- 0x74, 0x1a, 0x17, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31,- 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x22, 0x2b, 0xda, 0x41, 0x04, 0x6e,- 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f,- 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a,- 0x7d, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x12, 0x7f, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x55, 0x73,- 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x2e, 0x6d, 0x65, 0x6d, 0x6f,- 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72,- 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19,- 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73,- 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x2d, 0xda, 0x41, 0x04, 0x6e, 0x61,- 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76,- 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d,- 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0xa5, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x64,- 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x26,- 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70,- 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52,- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61,- 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,- 0x67, 0x22, 0x4d, 0xda, 0x41, 0x13, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x2c, 0x75, 0x70,- 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x3a,- 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x32, 0x26, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76,- 0x31, 0x2f, 0x7b, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d,- 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x7d,- 0x12, 0xa2, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63,- 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x29, 0x2e, 0x6d, 0x65, 0x6d, 0x6f,- 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65,- 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71,- 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69,- 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65,- 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,- 0x22, 0x33, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12,- 0x24, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75,- 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74,- 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x9a, 0x01, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,- 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12,- 0x2a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43,- 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54,- 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6d, 0x65,- 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41,- 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x36, 0xda, 0x41, 0x04, 0x6e,- 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x3a, 0x01, 0x2a, 0x22, 0x24, 0x2f, 0x61,- 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72,- 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65,- 0x6e, 0x73, 0x12, 0xac, 0x01, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65,- 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x2a, 0x2e, 0x6d,- 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65,+ 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x29, 0xda, 0x41, 0x08, 0x75, 0x73, 0x65,+ 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x61, 0x70,+ 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x3a, 0x75, 0x73, 0x65, 0x72, 0x6e,+ 0x61, 0x6d, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41,+ 0x76, 0x61, 0x74, 0x61, 0x72, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x12, 0x28, 0x2e, 0x6d, 0x65,+ 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73,+ 0x65, 0x72, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x52, 0x65,+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61,+ 0x70, 0x69, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x22, 0x2a, 0xda, 0x41, 0x04,+ 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x66, 0x69, 0x6c,+ 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d,+ 0x2f, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x65, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74,+ 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70,+ 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52,+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61,+ 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x22, 0xda, 0x41, 0x04, 0x75,+ 0x73, 0x65, 0x72, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x3a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22,+ 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x7f,+ 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x6d,+ 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61,+ 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e,+ 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65,+ 0x72, 0x22, 0x3c, 0xda, 0x41, 0x10, 0x75, 0x73, 0x65, 0x72, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74,+ 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x3a, 0x04, 0x75, 0x73,+ 0x65, 0x72, 0x32, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x75, 0x73, 0x65,+ 0x72, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12,+ 0x6c, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1f, 0x2e,+ 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c,+ 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16,+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,+ 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x25, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82,+ 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x2a, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b,+ 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x80, 0x01,+ 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61,+ 0x74, 0x73, 0x12, 0x25, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76,+ 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61,+ 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f,+ 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c,+ 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,+ 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x22, 0x15, 0x2f, 0x61, 0x70, 0x69, 0x2f,+ 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2d, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x73,+ 0x12, 0x77, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73,+ 0x12, 0x21, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e,+ 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75,+ 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e,+ 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x22, 0x2b, 0xda, 0x41,+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x61, 0x70,+ 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73,+ 0x2f, 0x2a, 0x7d, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x12, 0x7f, 0x0a, 0x0e, 0x47, 0x65, 0x74,+ 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x2e, 0x6d, 0x65,+ 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73,+ 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,+ 0x1a, 0x19, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e,+ 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x2d, 0xda, 0x41, 0x04,+ 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x61, 0x70, 0x69,+ 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f,+ 0x2a, 0x7d, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0xa5, 0x01, 0x0a, 0x11, 0x55,+ 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,+ 0x12, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e,+ 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,+ 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73,+ 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74,+ 0x69, 0x6e, 0x67, 0x22, 0x4d, 0xda, 0x41, 0x13, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x2c,+ 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02,+ 0x31, 0x3a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x32, 0x26, 0x2f, 0x61, 0x70, 0x69,+ 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x6e, 0x61, 0x6d,+ 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e,+ 0x67, 0x7d, 0x12, 0xa2, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41,+ 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x29, 0x2e, 0x6d, 0x65,+ 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55,+ 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52,+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61,+ 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63,+ 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,+ 0x73, 0x65, 0x22, 0x33, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02,+ 0x26, 0x12, 0x24, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65,+ 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73,+ 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x9a, 0x01, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61,0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65,- 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,- 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79,- 0x22, 0x4f, 0xda, 0x41, 0x11, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73,- 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x2a, 0x33, 0x2f, 0x61,- 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72,- 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65,- 0x6e, 0x73, 0x2f, 0x7b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e,- 0x7d, 0x42, 0xa8, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e,- 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x42, 0x10, 0x55, 0x73, 0x65, 0x72, 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, 0x31, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d,- 0x41, 0x58, 0xaa, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56,- 0x31, 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31,- 0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 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, 0x31, 0x62, 0x06, 0x70, 0x72,- 0x6f, 0x74, 0x6f, 0x33,+ 0x6e, 0x12, 0x2a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31,+ 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73,+ 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e,+ 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65,+ 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x36, 0xda, 0x41,+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x3a, 0x01, 0x2a, 0x22, 0x24,+ 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73,+ 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f,+ 0x6b, 0x65, 0x6e, 0x73, 0x12, 0xac, 0x01, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55,+ 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x2a,+ 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65,+ 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f,+ 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f,+ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70,+ 0x74, 0x79, 0x22, 0x4f, 0xda, 0x41, 0x11, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x61, 0x63, 0x63, 0x65,+ 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x2a, 0x33,+ 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73,+ 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f,+ 0x6b, 0x65, 0x6e, 0x73, 0x2f, 0x7b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b,+ 0x65, 0x6e, 0x7d, 0x12, 0x8d, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x68, 0x6f, 0x72,+ 0x74, 0x63, 0x75, 0x74, 0x73, 0x12, 0x22, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70,+ 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75,+ 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x65, 0x6d, 0x6f,+ 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x68, 0x6f,+ 0x72, 0x74, 0x63, 0x75, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33,+ 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12,+ 0x22, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74,+ 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63,+ 0x75, 0x74, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x68,+ 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x12, 0x23, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61,+ 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x68, 0x6f, 0x72,+ 0x74, 0x63, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6d, 0x65,+ 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x6f, 0x72, 0x74,+ 0x63, 0x75, 0x74, 0x22, 0x46, 0xda, 0x41, 0x0f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x73,+ 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x3a, 0x08, 0x73,+ 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x22, 0x22, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31,+ 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a,+ 0x7d, 0x2f, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x73, 0x12, 0xaf, 0x01, 0x0a, 0x0e,+ 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x12, 0x23,+ 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70,+ 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75,+ 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e,+ 0x76, 0x31, 0x2e, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x22, 0x60, 0xda, 0x41, 0x1b,+ 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x2c,+ 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02,+ 0x3c, 0x3a, 0x08, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x32, 0x30, 0x2f, 0x61, 0x70,+ 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x75, 0x73, 0x65,+ 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x73, 0x2f,+ 0x7b, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x2e, 0x69, 0x64, 0x7d, 0x12, 0x8a, 0x01,+ 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74,+ 0x12, 0x23, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e,+ 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x52, 0x65,+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,+ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x3b, 0xda,+ 0x41, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02,+ 0x29, 0x2a, 0x27, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65,+ 0x6e, 0x74, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x73, 0x68, 0x6f, 0x72,+ 0x74, 0x63, 0x75, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x42, 0xa8, 0x01, 0x0a, 0x10, 0x63,+ 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x42,+ 0x10, 0x55, 0x73, 0x65, 0x72, 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, 0x31, 0x3b,+ 0x61, 0x70, 0x69, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x41, 0x58, 0xaa, 0x02, 0x0c, 0x4d, 0x65,+ 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d,+ 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f,+ 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 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, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,})var (@@ -1600,7 +1988,7 @@ func file_api_v1_user_service_proto_rawDescGZIP() []byte {}var file_api_v1_user_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)-var file_api_v1_user_service_proto_msgTypes = make([]protoimpl.MessageInfo, 23)+var file_api_v1_user_service_proto_msgTypes = make([]protoimpl.MessageInfo, 29)var file_api_v1_user_service_proto_goTypes = []any{(User_Role)(0), // 0: memos.api.v1.User.Role(*User)(nil), // 1: memos.api.v1.User@@ -1624,67 +2012,85 @@ var file_api_v1_user_service_proto_goTypes = []any{(*ListUserAccessTokensResponse)(nil), // 19: memos.api.v1.ListUserAccessTokensResponse(*CreateUserAccessTokenRequest)(nil), // 20: memos.api.v1.CreateUserAccessTokenRequest(*DeleteUserAccessTokenRequest)(nil), // 21: memos.api.v1.DeleteUserAccessTokenRequest- nil, // 22: memos.api.v1.UserStats.TagCountEntry- (*UserStats_MemoTypeStats)(nil), // 23: memos.api.v1.UserStats.MemoTypeStats- (State)(0), // 24: memos.api.v1.State- (*timestamppb.Timestamp)(nil), // 25: google.protobuf.Timestamp- (*httpbody.HttpBody)(nil), // 26: google.api.HttpBody- (*fieldmaskpb.FieldMask)(nil), // 27: google.protobuf.FieldMask- (*emptypb.Empty)(nil), // 28: google.protobuf.Empty+ (*Shortcut)(nil), // 22: memos.api.v1.Shortcut+ (*ListShortcutsRequest)(nil), // 23: memos.api.v1.ListShortcutsRequest+ (*ListShortcutsResponse)(nil), // 24: memos.api.v1.ListShortcutsResponse+ (*CreateShortcutRequest)(nil), // 25: memos.api.v1.CreateShortcutRequest+ (*UpdateShortcutRequest)(nil), // 26: memos.api.v1.UpdateShortcutRequest+ (*DeleteShortcutRequest)(nil), // 27: memos.api.v1.DeleteShortcutRequest+ nil, // 28: memos.api.v1.UserStats.TagCountEntry+ (*UserStats_MemoTypeStats)(nil), // 29: memos.api.v1.UserStats.MemoTypeStats+ (State)(0), // 30: memos.api.v1.State+ (*timestamppb.Timestamp)(nil), // 31: google.protobuf.Timestamp+ (*httpbody.HttpBody)(nil), // 32: google.api.HttpBody+ (*fieldmaskpb.FieldMask)(nil), // 33: google.protobuf.FieldMask+ (*emptypb.Empty)(nil), // 34: google.protobuf.Empty}var file_api_v1_user_service_proto_depIdxs = []int32{0, // 0: memos.api.v1.User.role:type_name -> memos.api.v1.User.Role- 24, // 1: memos.api.v1.User.state:type_name -> memos.api.v1.State- 25, // 2: memos.api.v1.User.create_time:type_name -> google.protobuf.Timestamp- 25, // 3: memos.api.v1.User.update_time:type_name -> google.protobuf.Timestamp+ 30, // 1: memos.api.v1.User.state:type_name -> memos.api.v1.State+ 31, // 2: memos.api.v1.User.create_time:type_name -> google.protobuf.Timestamp+ 31, // 3: memos.api.v1.User.update_time:type_name -> google.protobuf.Timestamp1, // 4: memos.api.v1.ListUsersResponse.users:type_name -> memos.api.v1.User- 26, // 5: memos.api.v1.GetUserAvatarBinaryRequest.http_body:type_name -> google.api.HttpBody+ 32, // 5: memos.api.v1.GetUserAvatarBinaryRequest.http_body:type_name -> google.api.HttpBody1, // 6: memos.api.v1.CreateUserRequest.user:type_name -> memos.api.v1.User1, // 7: memos.api.v1.UpdateUserRequest.user:type_name -> memos.api.v1.User- 27, // 8: memos.api.v1.UpdateUserRequest.update_mask:type_name -> google.protobuf.FieldMask- 25, // 9: memos.api.v1.UserStats.memo_display_timestamps:type_name -> google.protobuf.Timestamp- 23, // 10: memos.api.v1.UserStats.memo_type_stats:type_name -> memos.api.v1.UserStats.MemoTypeStats- 22, // 11: memos.api.v1.UserStats.tag_count:type_name -> memos.api.v1.UserStats.TagCountEntry+ 33, // 8: memos.api.v1.UpdateUserRequest.update_mask:type_name -> google.protobuf.FieldMask+ 31, // 9: memos.api.v1.UserStats.memo_display_timestamps:type_name -> google.protobuf.Timestamp+ 29, // 10: memos.api.v1.UserStats.memo_type_stats:type_name -> memos.api.v1.UserStats.MemoTypeStats+ 28, // 11: memos.api.v1.UserStats.tag_count:type_name -> memos.api.v1.UserStats.TagCountEntry10, // 12: memos.api.v1.ListAllUserStatsResponse.user_stats:type_name -> memos.api.v1.UserStats14, // 13: memos.api.v1.UpdateUserSettingRequest.setting:type_name -> memos.api.v1.UserSetting- 27, // 14: memos.api.v1.UpdateUserSettingRequest.update_mask:type_name -> google.protobuf.FieldMask- 25, // 15: memos.api.v1.UserAccessToken.issued_at:type_name -> google.protobuf.Timestamp- 25, // 16: memos.api.v1.UserAccessToken.expires_at:type_name -> google.protobuf.Timestamp+ 33, // 14: memos.api.v1.UpdateUserSettingRequest.update_mask:type_name -> google.protobuf.FieldMask+ 31, // 15: memos.api.v1.UserAccessToken.issued_at:type_name -> google.protobuf.Timestamp+ 31, // 16: memos.api.v1.UserAccessToken.expires_at:type_name -> google.protobuf.Timestamp17, // 17: memos.api.v1.ListUserAccessTokensResponse.access_tokens:type_name -> memos.api.v1.UserAccessToken- 25, // 18: memos.api.v1.CreateUserAccessTokenRequest.expires_at:type_name -> google.protobuf.Timestamp- 2, // 19: memos.api.v1.UserService.ListUsers:input_type -> memos.api.v1.ListUsersRequest- 4, // 20: memos.api.v1.UserService.GetUser:input_type -> memos.api.v1.GetUserRequest- 5, // 21: memos.api.v1.UserService.GetUserByUsername:input_type -> memos.api.v1.GetUserByUsernameRequest- 6, // 22: memos.api.v1.UserService.GetUserAvatarBinary:input_type -> memos.api.v1.GetUserAvatarBinaryRequest- 7, // 23: memos.api.v1.UserService.CreateUser:input_type -> memos.api.v1.CreateUserRequest- 8, // 24: memos.api.v1.UserService.UpdateUser:input_type -> memos.api.v1.UpdateUserRequest- 9, // 25: memos.api.v1.UserService.DeleteUser:input_type -> memos.api.v1.DeleteUserRequest- 11, // 26: memos.api.v1.UserService.ListAllUserStats:input_type -> memos.api.v1.ListAllUserStatsRequest- 13, // 27: memos.api.v1.UserService.GetUserStats:input_type -> memos.api.v1.GetUserStatsRequest- 15, // 28: memos.api.v1.UserService.GetUserSetting:input_type -> memos.api.v1.GetUserSettingRequest- 16, // 29: memos.api.v1.UserService.UpdateUserSetting:input_type -> memos.api.v1.UpdateUserSettingRequest- 18, // 30: memos.api.v1.UserService.ListUserAccessTokens:input_type -> memos.api.v1.ListUserAccessTokensRequest- 20, // 31: memos.api.v1.UserService.CreateUserAccessToken:input_type -> memos.api.v1.CreateUserAccessTokenRequest- 21, // 32: memos.api.v1.UserService.DeleteUserAccessToken:input_type -> memos.api.v1.DeleteUserAccessTokenRequest- 3, // 33: memos.api.v1.UserService.ListUsers:output_type -> memos.api.v1.ListUsersResponse- 1, // 34: memos.api.v1.UserService.GetUser:output_type -> memos.api.v1.User- 1, // 35: memos.api.v1.UserService.GetUserByUsername:output_type -> memos.api.v1.User- 26, // 36: memos.api.v1.UserService.GetUserAvatarBinary:output_type -> google.api.HttpBody- 1, // 37: memos.api.v1.UserService.CreateUser:output_type -> memos.api.v1.User- 1, // 38: memos.api.v1.UserService.UpdateUser:output_type -> memos.api.v1.User- 28, // 39: memos.api.v1.UserService.DeleteUser:output_type -> google.protobuf.Empty- 12, // 40: memos.api.v1.UserService.ListAllUserStats:output_type -> memos.api.v1.ListAllUserStatsResponse- 10, // 41: memos.api.v1.UserService.GetUserStats:output_type -> memos.api.v1.UserStats- 14, // 42: memos.api.v1.UserService.GetUserSetting:output_type -> memos.api.v1.UserSetting- 14, // 43: memos.api.v1.UserService.UpdateUserSetting:output_type -> memos.api.v1.UserSetting- 19, // 44: memos.api.v1.UserService.ListUserAccessTokens:output_type -> memos.api.v1.ListUserAccessTokensResponse- 17, // 45: memos.api.v1.UserService.CreateUserAccessToken:output_type -> memos.api.v1.UserAccessToken- 28, // 46: memos.api.v1.UserService.DeleteUserAccessToken:output_type -> google.protobuf.Empty- 33, // [33:47] is the sub-list for method output_type- 19, // [19:33] is the sub-list for method input_type- 19, // [19:19] is the sub-list for extension type_name- 19, // [19:19] is the sub-list for extension extendee- 0, // [0:19] is the sub-list for field type_name+ 31, // 18: memos.api.v1.CreateUserAccessTokenRequest.expires_at:type_name -> google.protobuf.Timestamp+ 22, // 19: memos.api.v1.ListShortcutsResponse.shortcuts:type_name -> memos.api.v1.Shortcut+ 22, // 20: memos.api.v1.CreateShortcutRequest.shortcut:type_name -> memos.api.v1.Shortcut+ 22, // 21: memos.api.v1.UpdateShortcutRequest.shortcut:type_name -> memos.api.v1.Shortcut+ 33, // 22: memos.api.v1.UpdateShortcutRequest.update_mask:type_name -> google.protobuf.FieldMask+ 2, // 23: memos.api.v1.UserService.ListUsers:input_type -> memos.api.v1.ListUsersRequest+ 4, // 24: memos.api.v1.UserService.GetUser:input_type -> memos.api.v1.GetUserRequest+ 5, // 25: memos.api.v1.UserService.GetUserByUsername:input_type -> memos.api.v1.GetUserByUsernameRequest+ 6, // 26: memos.api.v1.UserService.GetUserAvatarBinary:input_type -> memos.api.v1.GetUserAvatarBinaryRequest+ 7, // 27: memos.api.v1.UserService.CreateUser:input_type -> memos.api.v1.CreateUserRequest+ 8, // 28: memos.api.v1.UserService.UpdateUser:input_type -> memos.api.v1.UpdateUserRequest+ 9, // 29: memos.api.v1.UserService.DeleteUser:input_type -> memos.api.v1.DeleteUserRequest+ 11, // 30: memos.api.v1.UserService.ListAllUserStats:input_type -> memos.api.v1.ListAllUserStatsRequest+ 13, // 31: memos.api.v1.UserService.GetUserStats:input_type -> memos.api.v1.GetUserStatsRequest+ 15, // 32: memos.api.v1.UserService.GetUserSetting:input_type -> memos.api.v1.GetUserSettingRequest+ 16, // 33: memos.api.v1.UserService.UpdateUserSetting:input_type -> memos.api.v1.UpdateUserSettingRequest+ 18, // 34: memos.api.v1.UserService.ListUserAccessTokens:input_type -> memos.api.v1.ListUserAccessTokensRequest+ 20, // 35: memos.api.v1.UserService.CreateUserAccessToken:input_type -> memos.api.v1.CreateUserAccessTokenRequest+ 21, // 36: memos.api.v1.UserService.DeleteUserAccessToken:input_type -> memos.api.v1.DeleteUserAccessTokenRequest+ 23, // 37: memos.api.v1.UserService.ListShortcuts:input_type -> memos.api.v1.ListShortcutsRequest+ 25, // 38: memos.api.v1.UserService.CreateShortcut:input_type -> memos.api.v1.CreateShortcutRequest+ 26, // 39: memos.api.v1.UserService.UpdateShortcut:input_type -> memos.api.v1.UpdateShortcutRequest+ 27, // 40: memos.api.v1.UserService.DeleteShortcut:input_type -> memos.api.v1.DeleteShortcutRequest+ 3, // 41: memos.api.v1.UserService.ListUsers:output_type -> memos.api.v1.ListUsersResponse+ 1, // 42: memos.api.v1.UserService.GetUser:output_type -> memos.api.v1.User+ 1, // 43: memos.api.v1.UserService.GetUserByUsername:output_type -> memos.api.v1.User+ 32, // 44: memos.api.v1.UserService.GetUserAvatarBinary:output_type -> google.api.HttpBody+ 1, // 45: memos.api.v1.UserService.CreateUser:output_type -> memos.api.v1.User+ 1, // 46: memos.api.v1.UserService.UpdateUser:output_type -> memos.api.v1.User+ 34, // 47: memos.api.v1.UserService.DeleteUser:output_type -> google.protobuf.Empty+ 12, // 48: memos.api.v1.UserService.ListAllUserStats:output_type -> memos.api.v1.ListAllUserStatsResponse+ 10, // 49: memos.api.v1.UserService.GetUserStats:output_type -> memos.api.v1.UserStats+ 14, // 50: memos.api.v1.UserService.GetUserSetting:output_type -> memos.api.v1.UserSetting+ 14, // 51: memos.api.v1.UserService.UpdateUserSetting:output_type -> memos.api.v1.UserSetting+ 19, // 52: memos.api.v1.UserService.ListUserAccessTokens:output_type -> memos.api.v1.ListUserAccessTokensResponse+ 17, // 53: memos.api.v1.UserService.CreateUserAccessToken:output_type -> memos.api.v1.UserAccessToken+ 34, // 54: memos.api.v1.UserService.DeleteUserAccessToken:output_type -> google.protobuf.Empty+ 24, // 55: memos.api.v1.UserService.ListShortcuts:output_type -> memos.api.v1.ListShortcutsResponse+ 22, // 56: memos.api.v1.UserService.CreateShortcut:output_type -> memos.api.v1.Shortcut+ 22, // 57: memos.api.v1.UserService.UpdateShortcut:output_type -> memos.api.v1.Shortcut+ 34, // 58: memos.api.v1.UserService.DeleteShortcut:output_type -> google.protobuf.Empty+ 41, // [41:59] is the sub-list for method output_type+ 23, // [23:41] 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}func init() { file_api_v1_user_service_proto_init() }@@ -1700,7 +2106,7 @@ func file_api_v1_user_service_proto_init() {GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: unsafe.Slice(unsafe.StringData(file_api_v1_user_service_proto_rawDesc), len(file_api_v1_user_service_proto_rawDesc)),NumEnums: 1,- NumMessages: 23,+ NumMessages: 29,NumExtensions: 0,NumServices: 1,},diff --git a/proto/gen/api/v1/user_service.pb.gw.go b/proto/gen/api/v1/user_service.pb.gw.goindex 4615060b3..02e2edf3e 100644--- a/proto/gen/api/v1/user_service.pb.gw.go+++ b/proto/gen/api/v1/user_service.pb.gw.go@@ -607,6 +607,230 @@ func local_request_UserService_DeleteUserAccessToken_0(ctx context.Context, marsreturn msg, metadata, err}+func request_UserService_ListShortcuts_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq ListShortcutsRequest+ metadata runtime.ServerMetadata+ err error+ )+ val, ok := pathParams["parent"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")+ }+ protoReq.Parent, err = runtime.String(val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)+ }+ msg, err := client.ListShortcuts(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))+ return msg, metadata, err+}++func local_request_UserService_ListShortcuts_0(ctx context.Context, marshaler runtime.Marshaler, server UserServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq ListShortcutsRequest+ metadata runtime.ServerMetadata+ err error+ )+ val, ok := pathParams["parent"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")+ }+ protoReq.Parent, err = runtime.String(val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)+ }+ msg, err := server.ListShortcuts(ctx, &protoReq)+ return msg, metadata, err+}++func request_UserService_CreateShortcut_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq CreateShortcutRequest+ metadata runtime.ServerMetadata+ err error+ )+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Shortcut); err != nil && !errors.Is(err, io.EOF) {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ val, ok := pathParams["parent"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")+ }+ protoReq.Parent, err = runtime.String(val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)+ }+ msg, err := client.CreateShortcut(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))+ return msg, metadata, err+}++func local_request_UserService_CreateShortcut_0(ctx context.Context, marshaler runtime.Marshaler, server UserServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq CreateShortcutRequest+ metadata runtime.ServerMetadata+ err error+ )+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Shortcut); err != nil && !errors.Is(err, io.EOF) {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ val, ok := pathParams["parent"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")+ }+ protoReq.Parent, err = runtime.String(val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)+ }+ msg, err := server.CreateShortcut(ctx, &protoReq)+ return msg, metadata, err+}++var filter_UserService_UpdateShortcut_0 = &utilities.DoubleArray{Encoding: map[string]int{"shortcut": 0, "parent": 1, "id": 2}, Base: []int{1, 2, 3, 1, 0, 0, 0}, Check: []int{0, 1, 1, 2, 4, 2, 3}}++func request_UserService_UpdateShortcut_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq UpdateShortcutRequest+ metadata runtime.ServerMetadata+ err error+ )+ newReader, berr := utilities.IOReaderFactory(req.Body)+ if berr != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)+ }+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Shortcut); err != nil && !errors.Is(err, io.EOF) {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 {+ if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.Shortcut); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ } else {+ protoReq.UpdateMask = fieldMask+ }+ }+ val, ok := pathParams["parent"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")+ }+ protoReq.Parent, err = runtime.String(val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)+ }+ val, ok = pathParams["shortcut.id"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "shortcut.id")+ }+ err = runtime.PopulateFieldFromPath(&protoReq, "shortcut.id", val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "shortcut.id", err)+ }+ if err := req.ParseForm(); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_UpdateShortcut_0); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ msg, err := client.UpdateShortcut(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))+ return msg, metadata, err+}++func local_request_UserService_UpdateShortcut_0(ctx context.Context, marshaler runtime.Marshaler, server UserServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq UpdateShortcutRequest+ metadata runtime.ServerMetadata+ err error+ )+ newReader, berr := utilities.IOReaderFactory(req.Body)+ if berr != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)+ }+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Shortcut); err != nil && !errors.Is(err, io.EOF) {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 {+ if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.Shortcut); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ } else {+ protoReq.UpdateMask = fieldMask+ }+ }+ val, ok := pathParams["parent"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")+ }+ protoReq.Parent, err = runtime.String(val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)+ }+ val, ok = pathParams["shortcut.id"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "shortcut.id")+ }+ err = runtime.PopulateFieldFromPath(&protoReq, "shortcut.id", val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "shortcut.id", err)+ }+ if err := req.ParseForm(); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_UpdateShortcut_0); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ msg, err := server.UpdateShortcut(ctx, &protoReq)+ return msg, metadata, err+}++func request_UserService_DeleteShortcut_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq DeleteShortcutRequest+ metadata runtime.ServerMetadata+ err error+ )+ val, ok := pathParams["parent"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")+ }+ protoReq.Parent, err = runtime.String(val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)+ }+ val, ok = pathParams["id"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")+ }+ protoReq.Id, err = runtime.String(val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)+ }+ msg, err := client.DeleteShortcut(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))+ return msg, metadata, err+}++func local_request_UserService_DeleteShortcut_0(ctx context.Context, marshaler runtime.Marshaler, server UserServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq DeleteShortcutRequest+ metadata runtime.ServerMetadata+ err error+ )+ val, ok := pathParams["parent"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")+ }+ protoReq.Parent, err = runtime.String(val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)+ }+ val, ok = pathParams["id"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")+ }+ protoReq.Id, err = runtime.String(val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)+ }+ msg, err := server.DeleteShortcut(ctx, &protoReq)+ return msg, metadata, err+}+// RegisterUserServiceHandlerServer registers the http handlers for service UserService to "mux".// UnaryRPC :call UserServiceServer directly.// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.@@ -893,6 +1117,86 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux}forward_UserService_DeleteUserAccessToken_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)})+ mux.Handle(http.MethodGet, pattern_UserService_ListShortcuts_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)+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.UserService/ListShortcuts", runtime.WithHTTPPathPattern("/api/v1/{parent=users/*}/shortcuts"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := local_request_UserService_ListShortcuts_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_UserService_ListShortcuts_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })+ mux.Handle(http.MethodPost, pattern_UserService_CreateShortcut_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)+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.UserService/CreateShortcut", runtime.WithHTTPPathPattern("/api/v1/{parent=users/*}/shortcuts"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := local_request_UserService_CreateShortcut_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_UserService_CreateShortcut_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })+ mux.Handle(http.MethodPatch, pattern_UserService_UpdateShortcut_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)+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.UserService/UpdateShortcut", runtime.WithHTTPPathPattern("/api/v1/{parent=users/*}/shortcuts/{shortcut.id}"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := local_request_UserService_UpdateShortcut_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_UserService_UpdateShortcut_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })+ mux.Handle(http.MethodDelete, pattern_UserService_DeleteShortcut_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)+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.UserService/DeleteShortcut", runtime.WithHTTPPathPattern("/api/v1/{parent=users/*}/shortcuts/{id}"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := local_request_UserService_DeleteShortcut_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_UserService_DeleteShortcut_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })return nil}@@ -1171,6 +1475,74 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux}forward_UserService_DeleteUserAccessToken_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)})+ mux.Handle(http.MethodGet, pattern_UserService_ListShortcuts_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)+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.UserService/ListShortcuts", runtime.WithHTTPPathPattern("/api/v1/{parent=users/*}/shortcuts"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := request_UserService_ListShortcuts_0(annotatedContext, inboundMarshaler, client, req, pathParams)+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_UserService_ListShortcuts_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })+ mux.Handle(http.MethodPost, pattern_UserService_CreateShortcut_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)+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.UserService/CreateShortcut", runtime.WithHTTPPathPattern("/api/v1/{parent=users/*}/shortcuts"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := request_UserService_CreateShortcut_0(annotatedContext, inboundMarshaler, client, req, pathParams)+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_UserService_CreateShortcut_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })+ mux.Handle(http.MethodPatch, pattern_UserService_UpdateShortcut_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)+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.UserService/UpdateShortcut", runtime.WithHTTPPathPattern("/api/v1/{parent=users/*}/shortcuts/{shortcut.id}"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := request_UserService_UpdateShortcut_0(annotatedContext, inboundMarshaler, client, req, pathParams)+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_UserService_UpdateShortcut_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })+ mux.Handle(http.MethodDelete, pattern_UserService_DeleteShortcut_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)+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.UserService/DeleteShortcut", runtime.WithHTTPPathPattern("/api/v1/{parent=users/*}/shortcuts/{id}"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := request_UserService_DeleteShortcut_0(annotatedContext, inboundMarshaler, client, req, pathParams)+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_UserService_DeleteShortcut_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })return nil}@@ -1189,6 +1561,10 @@ var (pattern_UserService_ListUserAccessTokens_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v1", "users", "name", "access_tokens"}, ""))pattern_UserService_CreateUserAccessToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v1", "users", "name", "access_tokens"}, ""))pattern_UserService_DeleteUserAccessToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"api", "v1", "users", "name", "access_tokens", "access_token"}, ""))+ pattern_UserService_ListShortcuts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v1", "users", "parent", "shortcuts"}, ""))+ pattern_UserService_CreateShortcut_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v1", "users", "parent", "shortcuts"}, ""))+ pattern_UserService_UpdateShortcut_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"api", "v1", "users", "parent", "shortcuts", "shortcut.id"}, ""))+ pattern_UserService_DeleteShortcut_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"api", "v1", "users", "parent", "shortcuts", "id"}, "")))var (@@ -1206,4 +1582,8 @@ var (forward_UserService_ListUserAccessTokens_0 = runtime.ForwardResponseMessageforward_UserService_CreateUserAccessToken_0 = runtime.ForwardResponseMessageforward_UserService_DeleteUserAccessToken_0 = runtime.ForwardResponseMessage+ forward_UserService_ListShortcuts_0 = runtime.ForwardResponseMessage+ forward_UserService_CreateShortcut_0 = runtime.ForwardResponseMessage+ forward_UserService_UpdateShortcut_0 = runtime.ForwardResponseMessage+ forward_UserService_DeleteShortcut_0 = runtime.ForwardResponseMessage)diff --git a/proto/gen/api/v1/user_service_grpc.pb.go b/proto/gen/api/v1/user_service_grpc.pb.goindex 72fe8d553..622c7bda7 100644--- a/proto/gen/api/v1/user_service_grpc.pb.go+++ b/proto/gen/api/v1/user_service_grpc.pb.go@@ -35,6 +35,10 @@ const (UserService_ListUserAccessTokens_FullMethodName = "/memos.api.v1.UserService/ListUserAccessTokens"UserService_CreateUserAccessToken_FullMethodName = "/memos.api.v1.UserService/CreateUserAccessToken"UserService_DeleteUserAccessToken_FullMethodName = "/memos.api.v1.UserService/DeleteUserAccessToken"+ UserService_ListShortcuts_FullMethodName = "/memos.api.v1.UserService/ListShortcuts"+ UserService_CreateShortcut_FullMethodName = "/memos.api.v1.UserService/CreateShortcut"+ UserService_UpdateShortcut_FullMethodName = "/memos.api.v1.UserService/UpdateShortcut"+ UserService_DeleteShortcut_FullMethodName = "/memos.api.v1.UserService/DeleteShortcut")// UserServiceClient is the client API for UserService service.@@ -69,6 +73,14 @@ type UserServiceClient interface {CreateUserAccessToken(ctx context.Context, in *CreateUserAccessTokenRequest, opts ...grpc.CallOption) (*UserAccessToken, error)// DeleteUserAccessToken deletes an access token for a user.DeleteUserAccessToken(ctx context.Context, in *DeleteUserAccessTokenRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)+ // ListShortcuts returns a list of shortcuts for a user.+ ListShortcuts(ctx context.Context, in *ListShortcutsRequest, opts ...grpc.CallOption) (*ListShortcutsResponse, error)+ // CreateShortcut creates a new shortcut for a user.+ CreateShortcut(ctx context.Context, in *CreateShortcutRequest, opts ...grpc.CallOption) (*Shortcut, error)+ // UpdateShortcut updates a shortcut for a user.+ UpdateShortcut(ctx context.Context, in *UpdateShortcutRequest, opts ...grpc.CallOption) (*Shortcut, error)+ // DeleteShortcut deletes a shortcut for a user.+ DeleteShortcut(ctx context.Context, in *DeleteShortcutRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)}type userServiceClient struct {@@ -219,6 +231,46 @@ func (c *userServiceClient) DeleteUserAccessToken(ctx context.Context, in *Deletreturn out, nil}+func (c *userServiceClient) ListShortcuts(ctx context.Context, in *ListShortcutsRequest, opts ...grpc.CallOption) (*ListShortcutsResponse, error) {+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)+ out := new(ListShortcutsResponse)+ err := c.cc.Invoke(ctx, UserService_ListShortcuts_FullMethodName, in, out, cOpts...)+ if err != nil {+ return nil, err+ }+ return out, nil+}++func (c *userServiceClient) CreateShortcut(ctx context.Context, in *CreateShortcutRequest, opts ...grpc.CallOption) (*Shortcut, error) {+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)+ out := new(Shortcut)+ err := c.cc.Invoke(ctx, UserService_CreateShortcut_FullMethodName, in, out, cOpts...)+ if err != nil {+ return nil, err+ }+ return out, nil+}++func (c *userServiceClient) UpdateShortcut(ctx context.Context, in *UpdateShortcutRequest, opts ...grpc.CallOption) (*Shortcut, error) {+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)+ out := new(Shortcut)+ err := c.cc.Invoke(ctx, UserService_UpdateShortcut_FullMethodName, in, out, cOpts...)+ if err != nil {+ return nil, err+ }+ return out, nil+}++func (c *userServiceClient) DeleteShortcut(ctx context.Context, in *DeleteShortcutRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)+ out := new(emptypb.Empty)+ err := c.cc.Invoke(ctx, UserService_DeleteShortcut_FullMethodName, in, out, cOpts...)+ if err != nil {+ return nil, err+ }+ return out, nil+}+// UserServiceServer is the server API for UserService service.// All implementations must embed UnimplementedUserServiceServer// for forward compatibility.@@ -251,6 +303,14 @@ type UserServiceServer interface {CreateUserAccessToken(context.Context, *CreateUserAccessTokenRequest) (*UserAccessToken, error)// DeleteUserAccessToken deletes an access token for a user.DeleteUserAccessToken(context.Context, *DeleteUserAccessTokenRequest) (*emptypb.Empty, error)+ // ListShortcuts returns a list of shortcuts for a user.+ ListShortcuts(context.Context, *ListShortcutsRequest) (*ListShortcutsResponse, error)+ // CreateShortcut creates a new shortcut for a user.+ CreateShortcut(context.Context, *CreateShortcutRequest) (*Shortcut, error)+ // UpdateShortcut updates a shortcut for a user.+ UpdateShortcut(context.Context, *UpdateShortcutRequest) (*Shortcut, error)+ // DeleteShortcut deletes a shortcut for a user.+ DeleteShortcut(context.Context, *DeleteShortcutRequest) (*emptypb.Empty, error)mustEmbedUnimplementedUserServiceServer()}@@ -303,6 +363,18 @@ func (UnimplementedUserServiceServer) CreateUserAccessToken(context.Context, *Crfunc (UnimplementedUserServiceServer) DeleteUserAccessToken(context.Context, *DeleteUserAccessTokenRequest) (*emptypb.Empty, error) {return nil, status.Errorf(codes.Unimplemented, "method DeleteUserAccessToken not implemented")}+func (UnimplementedUserServiceServer) ListShortcuts(context.Context, *ListShortcutsRequest) (*ListShortcutsResponse, error) {+ return nil, status.Errorf(codes.Unimplemented, "method ListShortcuts not implemented")+}+func (UnimplementedUserServiceServer) CreateShortcut(context.Context, *CreateShortcutRequest) (*Shortcut, error) {+ return nil, status.Errorf(codes.Unimplemented, "method CreateShortcut not implemented")+}+func (UnimplementedUserServiceServer) UpdateShortcut(context.Context, *UpdateShortcutRequest) (*Shortcut, error) {+ return nil, status.Errorf(codes.Unimplemented, "method UpdateShortcut not implemented")+}+func (UnimplementedUserServiceServer) DeleteShortcut(context.Context, *DeleteShortcutRequest) (*emptypb.Empty, error) {+ return nil, status.Errorf(codes.Unimplemented, "method DeleteShortcut not implemented")+}func (UnimplementedUserServiceServer) mustEmbedUnimplementedUserServiceServer() {}func (UnimplementedUserServiceServer) testEmbeddedByValue() {}@@ -576,6 +648,78 @@ func _UserService_DeleteUserAccessToken_Handler(srv interface{}, ctx context.Conreturn interceptor(ctx, in, info, handler)}+func _UserService_ListShortcuts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(ListShortcutsRequest)+ if err := dec(in); err != nil {+ return nil, err+ }+ if interceptor == nil {+ return srv.(UserServiceServer).ListShortcuts(ctx, in)+ }+ info := &grpc.UnaryServerInfo{+ Server: srv,+ FullMethod: UserService_ListShortcuts_FullMethodName,+ }+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {+ return srv.(UserServiceServer).ListShortcuts(ctx, req.(*ListShortcutsRequest))+ }+ return interceptor(ctx, in, info, handler)+}++func _UserService_CreateShortcut_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(CreateShortcutRequest)+ if err := dec(in); err != nil {+ return nil, err+ }+ if interceptor == nil {+ return srv.(UserServiceServer).CreateShortcut(ctx, in)+ }+ info := &grpc.UnaryServerInfo{+ Server: srv,+ FullMethod: UserService_CreateShortcut_FullMethodName,+ }+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {+ return srv.(UserServiceServer).CreateShortcut(ctx, req.(*CreateShortcutRequest))+ }+ return interceptor(ctx, in, info, handler)+}++func _UserService_UpdateShortcut_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(UpdateShortcutRequest)+ if err := dec(in); err != nil {+ return nil, err+ }+ if interceptor == nil {+ return srv.(UserServiceServer).UpdateShortcut(ctx, in)+ }+ info := &grpc.UnaryServerInfo{+ Server: srv,+ FullMethod: UserService_UpdateShortcut_FullMethodName,+ }+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {+ return srv.(UserServiceServer).UpdateShortcut(ctx, req.(*UpdateShortcutRequest))+ }+ return interceptor(ctx, in, info, handler)+}++func _UserService_DeleteShortcut_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(DeleteShortcutRequest)+ if err := dec(in); err != nil {+ return nil, err+ }+ if interceptor == nil {+ return srv.(UserServiceServer).DeleteShortcut(ctx, in)+ }+ info := &grpc.UnaryServerInfo{+ Server: srv,+ FullMethod: UserService_DeleteShortcut_FullMethodName,+ }+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {+ return srv.(UserServiceServer).DeleteShortcut(ctx, req.(*DeleteShortcutRequest))+ }+ return interceptor(ctx, in, info, handler)+}+// UserService_ServiceDesc is the grpc.ServiceDesc for UserService service.// It's only intended for direct use with grpc.RegisterService,// and not to be introspected or modified (even as a copy)@@ -639,6 +783,22 @@ var UserService_ServiceDesc = grpc.ServiceDesc{MethodName: "DeleteUserAccessToken",Handler: _UserService_DeleteUserAccessToken_Handler,},+ {+ MethodName: "ListShortcuts",+ Handler: _UserService_ListShortcuts_Handler,+ },+ {+ MethodName: "CreateShortcut",+ Handler: _UserService_CreateShortcut_Handler,+ },+ {+ MethodName: "UpdateShortcut",+ Handler: _UserService_UpdateShortcut_Handler,+ },+ {+ MethodName: "DeleteShortcut",+ Handler: _UserService_DeleteShortcut_Handler,+ },},Streams: []grpc.StreamDesc{},Metadata: "api/v1/user_service.proto",diff --git a/proto/gen/apidocs.swagger.yaml b/proto/gen/apidocs.swagger.yamlindex d2132fcb3..d43785dec 100644--- a/proto/gen/apidocs.swagger.yaml+++ b/proto/gen/apidocs.swagger.yaml@@ -1406,6 +1406,118 @@ paths:pattern: users/[^/]+tags:- UserService+ /api/v1/{parent}/shortcuts:+ get:+ summary: ListShortcuts returns a list of shortcuts for a user.+ operationId: UserService_ListShortcuts+ responses:+ "200":+ description: A successful response.+ schema:+ $ref: '#/definitions/v1ListShortcutsResponse'+ default:+ description: An unexpected error response.+ schema:+ $ref: '#/definitions/googlerpcStatus'+ parameters:+ - name: parent+ description: The name of the user.+ in: path+ required: true+ type: string+ pattern: users/[^/]++ tags:+ - UserService+ post:+ summary: CreateShortcut creates a new shortcut for a user.+ operationId: UserService_CreateShortcut+ responses:+ "200":+ description: A successful response.+ schema:+ $ref: '#/definitions/apiv1Shortcut'+ default:+ description: An unexpected error response.+ schema:+ $ref: '#/definitions/googlerpcStatus'+ parameters:+ - name: parent+ description: The name of the user.+ in: path+ required: true+ type: string+ pattern: users/[^/]++ - name: shortcut+ in: body+ required: true+ schema:+ $ref: '#/definitions/apiv1Shortcut'+ tags:+ - UserService+ /api/v1/{parent}/shortcuts/{id}:+ delete:+ summary: DeleteShortcut deletes a shortcut for a user.+ operationId: UserService_DeleteShortcut+ responses:+ "200":+ description: A successful response.+ schema:+ type: object+ properties: {}+ default:+ description: An unexpected error response.+ schema:+ $ref: '#/definitions/googlerpcStatus'+ parameters:+ - name: parent+ description: The name of the user.+ in: path+ required: true+ type: string+ pattern: users/[^/]++ - name: id+ description: The id of the shortcut.+ in: path+ required: true+ type: string+ tags:+ - UserService+ /api/v1/{parent}/shortcuts/{shortcut.id}:+ patch:+ summary: UpdateShortcut updates a shortcut for a user.+ operationId: UserService_UpdateShortcut+ responses:+ "200":+ description: A successful response.+ schema:+ $ref: '#/definitions/apiv1Shortcut'+ default:+ description: An unexpected error response.+ schema:+ $ref: '#/definitions/googlerpcStatus'+ parameters:+ - name: parent+ description: The name of the user.+ in: path+ required: true+ type: string+ pattern: users/[^/]++ - name: shortcut.id+ in: path+ required: true+ type: string+ - name: shortcut+ in: body+ required: true+ schema:+ type: object+ properties:+ title:+ type: string+ filter:+ type: string+ tags:+ - UserService/api/v1/{parent}/tags/{tag}:delete:summary: DeleteMemoTag deletes a tag for a memo.@@ -1997,6 +2109,15 @@ definitions:type: stringfieldMapping:$ref: '#/definitions/apiv1FieldMapping'+ apiv1Shortcut:+ type: object+ properties:+ id:+ type: string+ title:+ type: string+ filter:+ type: stringapiv1UserSetting:type: objectproperties:@@ -2558,6 +2679,14 @@ definitions:items:type: object$ref: '#/definitions/v1Resource'+ v1ListShortcutsResponse:+ type: object+ properties:+ shortcuts:+ type: array+ items:+ type: object+ $ref: '#/definitions/apiv1Shortcut'v1ListUserAccessTokensResponse:type: objectproperties:diff --git a/proto/gen/store/user_setting.pb.go b/proto/gen/store/user_setting.pb.goindex 176bd9178..79959d5c4 100644--- a/proto/gen/store/user_setting.pb.go+++ b/proto/gen/store/user_setting.pb.go@@ -33,6 +33,8 @@ const (UserSettingKey_APPEARANCE UserSettingKey = 3// The visibility of the memo.UserSettingKey_MEMO_VISIBILITY UserSettingKey = 4+ // The shortcuts of the user.+ UserSettingKey_SHORTCUTS UserSettingKey = 5)// Enum value maps for UserSettingKey.@@ -43,6 +45,7 @@ var (2: "LOCALE",3: "APPEARANCE",4: "MEMO_VISIBILITY",+ 5: "SHORTCUTS",}UserSettingKey_value = map[string]int32{"USER_SETTING_KEY_UNSPECIFIED": 0,@@ -50,6 +53,7 @@ var ("LOCALE": 2,"APPEARANCE": 3,"MEMO_VISIBILITY": 4,+ "SHORTCUTS": 5,})@@ -90,6 +94,7 @@ type UserSetting struct {// *UserSetting_Locale// *UserSetting_Appearance// *UserSetting_MemoVisibility+ // *UserSetting_ShortcutsValue isUserSetting_Value `protobuf_oneof:"value"`unknownFields protoimpl.UnknownFieldssizeCache protoimpl.SizeCache@@ -182,6 +187,15 @@ func (x *UserSetting) GetMemoVisibility() string {return ""}+func (x *UserSetting) GetShortcuts() *ShortcutsUserSetting {+ if x != nil {+ if x, ok := x.Value.(*UserSetting_Shortcuts); ok {+ return x.Shortcuts+ }+ }+ return nil+}+type isUserSetting_Value interface {isUserSetting_Value()}@@ -202,6 +216,10 @@ type UserSetting_MemoVisibility struct {MemoVisibility string `protobuf:"bytes,6,opt,name=memo_visibility,json=memoVisibility,proto3,oneof"`}+type UserSetting_Shortcuts struct {+ Shortcuts *ShortcutsUserSetting `protobuf:"bytes,7,opt,name=shortcuts,proto3,oneof"`+}+func (*UserSetting_AccessTokens) isUserSetting_Value() {}func (*UserSetting_Locale) isUserSetting_Value() {}@@ -210,6 +228,8 @@ func (*UserSetting_Appearance) isUserSetting_Value() {}func (*UserSetting_MemoVisibility) isUserSetting_Value() {}+func (*UserSetting_Shortcuts) isUserSetting_Value() {}+type AccessTokensUserSetting struct {state protoimpl.MessageState `protogen:"open.v1"`AccessTokens []*AccessTokensUserSetting_AccessToken `protobuf:"bytes,1,rep,name=access_tokens,json=accessTokens,proto3" json:"access_tokens,omitempty"`@@ -254,6 +274,50 @@ func (x *AccessTokensUserSetting) GetAccessTokens() []*AccessTokensUserSetting_Areturn nil}+type ShortcutsUserSetting struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ Shortcuts []*ShortcutsUserSetting_Shortcut `protobuf:"bytes,1,rep,name=shortcuts,proto3" json:"shortcuts,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *ShortcutsUserSetting) Reset() {+ *x = ShortcutsUserSetting{}+ mi := &file_store_user_setting_proto_msgTypes[2]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *ShortcutsUserSetting) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*ShortcutsUserSetting) ProtoMessage() {}++func (x *ShortcutsUserSetting) ProtoReflect() protoreflect.Message {+ mi := &file_store_user_setting_proto_msgTypes[2]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use ShortcutsUserSetting.ProtoReflect.Descriptor instead.+func (*ShortcutsUserSetting) Descriptor() ([]byte, []int) {+ return file_store_user_setting_proto_rawDescGZIP(), []int{2}+}++func (x *ShortcutsUserSetting) GetShortcuts() []*ShortcutsUserSetting_Shortcut {+ if x != nil {+ return x.Shortcuts+ }+ return nil+}+type AccessTokensUserSetting_AccessToken struct {state protoimpl.MessageState `protogen:"open.v1"`// The access token is a JWT token.@@ -267,7 +331,7 @@ type AccessTokensUserSetting_AccessToken struct {func (x *AccessTokensUserSetting_AccessToken) Reset() {*x = AccessTokensUserSetting_AccessToken{}- mi := &file_store_user_setting_proto_msgTypes[2]+ mi := &file_store_user_setting_proto_msgTypes[3]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -279,7 +343,7 @@ func (x *AccessTokensUserSetting_AccessToken) String() string {func (*AccessTokensUserSetting_AccessToken) ProtoMessage() {}func (x *AccessTokensUserSetting_AccessToken) ProtoReflect() protoreflect.Message {- mi := &file_store_user_setting_proto_msgTypes[2]+ mi := &file_store_user_setting_proto_msgTypes[3]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -309,12 +373,72 @@ func (x *AccessTokensUserSetting_AccessToken) GetDescription() string {return ""}+type ShortcutsUserSetting_Shortcut struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`+ Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`+ Filter string `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *ShortcutsUserSetting_Shortcut) Reset() {+ *x = ShortcutsUserSetting_Shortcut{}+ mi := &file_store_user_setting_proto_msgTypes[4]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *ShortcutsUserSetting_Shortcut) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*ShortcutsUserSetting_Shortcut) ProtoMessage() {}++func (x *ShortcutsUserSetting_Shortcut) ProtoReflect() protoreflect.Message {+ mi := &file_store_user_setting_proto_msgTypes[4]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use ShortcutsUserSetting_Shortcut.ProtoReflect.Descriptor instead.+func (*ShortcutsUserSetting_Shortcut) Descriptor() ([]byte, []int) {+ return file_store_user_setting_proto_rawDescGZIP(), []int{2, 0}+}++func (x *ShortcutsUserSetting_Shortcut) GetId() string {+ if x != nil {+ return x.Id+ }+ return ""+}++func (x *ShortcutsUserSetting_Shortcut) GetTitle() string {+ if x != nil {+ return x.Title+ }+ return ""+}++func (x *ShortcutsUserSetting_Shortcut) GetFilter() string {+ if x != nil {+ return x.Filter+ }+ return ""+}+var File_store_user_setting_proto protoreflect.FileDescriptorvar file_store_user_setting_proto_rawDesc = string([]byte{0x0a, 0x18, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x74,0x74, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x6d, 0x65, 0x6d, 0x6f,- 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x22, 0x92, 0x02, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72,+ 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x22, 0xd5, 0x02, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72,0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f,0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64,0x12, 0x2d, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e,@@ -331,27 +455,43 @@ var file_store_user_setting_proto_rawDesc = string([]byte{0x70, 0x65, 0x61, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x29, 0x0a, 0x0f, 0x6d, 0x65, 0x6d, 0x6f,0x5f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28,0x09, 0x48, 0x00, 0x52, 0x0e, 0x6d, 0x65, 0x6d, 0x6f, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c,- 0x69, 0x74, 0x79, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xc4, 0x01, 0x0a,- 0x17, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x55, 0x73, 0x65,- 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x55, 0x0a, 0x0d, 0x61, 0x63, 0x63, 0x65,- 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,- 0x30, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x63,- 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65,- 0x74, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65,- 0x6e, 0x52, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x1a,- 0x52, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x21,- 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01,- 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65,- 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e,- 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,- 0x69, 0x6f, 0x6e, 0x2a, 0x76, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69,- 0x6e, 0x67, 0x4b, 0x65, 0x79, 0x12, 0x20, 0x0a, 0x1c, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x53, 0x45,- 0x54, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43,- 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x43, 0x43, 0x45, 0x53,- 0x53, 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x53, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x4f,- 0x43, 0x41, 0x4c, 0x45, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x41, 0x50, 0x50, 0x45, 0x41, 0x52,- 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x4d, 0x45, 0x4d, 0x4f, 0x5f, 0x56,- 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x10, 0x04, 0x42, 0x9b, 0x01, 0x0a, 0x0f,+ 0x69, 0x74, 0x79, 0x12, 0x41, 0x0a, 0x09, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x73,+ 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x73,+ 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x73, 0x55, 0x73,+ 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x48, 0x00, 0x52, 0x09, 0x73, 0x68, 0x6f,+ 0x72, 0x74, 0x63, 0x75, 0x74, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22,+ 0xc4, 0x01, 0x0a, 0x17, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73,+ 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x55, 0x0a, 0x0d, 0x61,+ 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03,+ 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65,+ 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x55, 0x73, 0x65,+ 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54,+ 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65,+ 0x6e, 0x73, 0x1a, 0x52, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65,+ 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65,+ 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54,+ 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,+ 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72,+ 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xaa, 0x01, 0x0a, 0x14, 0x53, 0x68, 0x6f, 0x72, 0x74,+ 0x63, 0x75, 0x74, 0x73, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12,+ 0x48, 0x0a, 0x09, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03,+ 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65,+ 0x2e, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x73, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65,+ 0x74, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x52, 0x09,+ 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x73, 0x1a, 0x48, 0x0a, 0x08, 0x53, 0x68, 0x6f,+ 0x72, 0x74, 0x63, 0x75, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,+ 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02,+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 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, 0x2a, 0x85, 0x01, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74,+ 0x69, 0x6e, 0x67, 0x4b, 0x65, 0x79, 0x12, 0x20, 0x0a, 0x1c, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x53,+ 0x45, 0x54, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45,+ 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x43, 0x43, 0x45,+ 0x53, 0x53, 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x53, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4c,+ 0x4f, 0x43, 0x41, 0x4c, 0x45, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x41, 0x50, 0x50, 0x45, 0x41,+ 0x52, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x4d, 0x45, 0x4d, 0x4f, 0x5f,+ 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09,+ 0x53, 0x48, 0x4f, 0x52, 0x54, 0x43, 0x55, 0x54, 0x53, 0x10, 0x05, 0x42, 0x9b, 0x01, 0x0a, 0x0f,0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x42,0x10, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74,0x6f, 0x50, 0x01, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,@@ -378,22 +518,26 @@ func file_store_user_setting_proto_rawDescGZIP() []byte {}var file_store_user_setting_proto_enumTypes = make([]protoimpl.EnumInfo, 1)-var file_store_user_setting_proto_msgTypes = make([]protoimpl.MessageInfo, 3)+var file_store_user_setting_proto_msgTypes = make([]protoimpl.MessageInfo, 5)var file_store_user_setting_proto_goTypes = []any{(UserSettingKey)(0), // 0: memos.store.UserSettingKey(*UserSetting)(nil), // 1: memos.store.UserSetting(*AccessTokensUserSetting)(nil), // 2: memos.store.AccessTokensUserSetting- (*AccessTokensUserSetting_AccessToken)(nil), // 3: memos.store.AccessTokensUserSetting.AccessToken+ (*ShortcutsUserSetting)(nil), // 3: memos.store.ShortcutsUserSetting+ (*AccessTokensUserSetting_AccessToken)(nil), // 4: memos.store.AccessTokensUserSetting.AccessToken+ (*ShortcutsUserSetting_Shortcut)(nil), // 5: memos.store.ShortcutsUserSetting.Shortcut}var file_store_user_setting_proto_depIdxs = []int32{0, // 0: memos.store.UserSetting.key:type_name -> memos.store.UserSettingKey2, // 1: memos.store.UserSetting.access_tokens:type_name -> memos.store.AccessTokensUserSetting- 3, // 2: memos.store.AccessTokensUserSetting.access_tokens:type_name -> memos.store.AccessTokensUserSetting.AccessToken- 3, // [3:3] is the sub-list for method output_type- 3, // [3:3] is the sub-list for method input_type- 3, // [3:3] is the sub-list for extension type_name- 3, // [3:3] is the sub-list for extension extendee- 0, // [0:3] is the sub-list for field type_name+ 3, // 2: memos.store.UserSetting.shortcuts:type_name -> memos.store.ShortcutsUserSetting+ 4, // 3: memos.store.AccessTokensUserSetting.access_tokens:type_name -> memos.store.AccessTokensUserSetting.AccessToken+ 5, // 4: memos.store.ShortcutsUserSetting.shortcuts:type_name -> memos.store.ShortcutsUserSetting.Shortcut+ 5, // [5:5] is the sub-list for method output_type+ 5, // [5:5] is the sub-list for method input_type+ 5, // [5:5] is the sub-list for extension type_name+ 5, // [5:5] is the sub-list for extension extendee+ 0, // [0:5] is the sub-list for field type_name}func init() { file_store_user_setting_proto_init() }@@ -406,6 +550,7 @@ func file_store_user_setting_proto_init() {(*UserSetting_Locale)(nil),(*UserSetting_Appearance)(nil),(*UserSetting_MemoVisibility)(nil),+ (*UserSetting_Shortcuts)(nil),}type x struct{}out := protoimpl.TypeBuilder{@@ -413,7 +558,7 @@ func file_store_user_setting_proto_init() {GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: unsafe.Slice(unsafe.StringData(file_store_user_setting_proto_rawDesc), len(file_store_user_setting_proto_rawDesc)),NumEnums: 1,- NumMessages: 3,+ NumMessages: 5,NumExtensions: 0,NumServices: 0,},diff --git a/proto/store/user_setting.proto b/proto/store/user_setting.protoindex 345e8dacd..5e2d4566f 100644--- a/proto/store/user_setting.proto+++ b/proto/store/user_setting.proto@@ -14,6 +14,8 @@ enum UserSettingKey {APPEARANCE = 3;// The visibility of the memo.MEMO_VISIBILITY = 4;+ // The shortcuts of the user.+ SHORTCUTS = 5;}message UserSetting {@@ -24,6 +26,7 @@ message UserSetting {string locale = 4;string appearance = 5;string memo_visibility = 6;+ ShortcutsUserSetting shortcuts = 7;}}@@ -37,3 +40,12 @@ message AccessTokensUserSetting {}repeated AccessToken access_tokens = 1;}++message ShortcutsUserSetting {+ message Shortcut {+ string id = 1;+ string title = 2;+ string filter = 3;+ }+ repeated Shortcut shortcuts = 1;+}diff --git a/server/router/api/v1/user_service_shortcuts.go b/server/router/api/v1/user_service_shortcuts.gonew file mode 100644index 000000000..3ed902aaf--- /dev/null+++ b/server/router/api/v1/user_service_shortcuts.go@@ -0,0 +1,214 @@+package v1++import (+ "context"++ "google.golang.org/grpc/codes"+ "google.golang.org/grpc/status"+ "google.golang.org/protobuf/types/known/emptypb"++ v1pb "github.com/usememos/memos/proto/gen/api/v1"+ storepb "github.com/usememos/memos/proto/gen/store"+ "github.com/usememos/memos/store"+)++func (s *APIV1Service) ListShortcuts(ctx context.Context, request *v1pb.ListShortcutsRequest) (*v1pb.ListShortcutsResponse, error) {+ userID, err := ExtractUserIDFromName(request.Parent)+ if err != nil {+ return nil, status.Errorf(codes.InvalidArgument, "invalid user name: %v", err)+ }++ currentUser, err := s.GetCurrentUser(ctx)+ if err != nil {+ return nil, status.Errorf(codes.Internal, "failed to get current user: %v", err)+ }+ if currentUser == nil || currentUser.ID != userID {+ return nil, status.Errorf(codes.PermissionDenied, "permission denied")+ }++ userSetting, err := s.Store.GetUserSetting(ctx, &store.FindUserSetting{+ UserID: &userID,+ Key: storepb.UserSettingKey_SHORTCUTS,+ })+ if err != nil {+ return nil, err+ }+ if userSetting == nil {+ return &v1pb.ListShortcutsResponse{+ Shortcuts: []*v1pb.Shortcut{},+ }, nil+ }++ shortcutsUserSetting := userSetting.GetShortcuts()+ shortcuts := []*v1pb.Shortcut{}+ for _, shortcut := range shortcutsUserSetting.GetShortcuts() {+ shortcuts = append(shortcuts, &v1pb.Shortcut{+ Id: shortcut.GetId(),+ Title: shortcut.GetTitle(),+ Filter: shortcut.GetFilter(),+ })+ }++ return &v1pb.ListShortcutsResponse{+ Shortcuts: shortcuts,+ }, nil+}++func (s *APIV1Service) CreateShortcut(ctx context.Context, request *v1pb.CreateShortcutRequest) (*v1pb.Shortcut, error) {+ userID, err := ExtractUserIDFromName(request.Parent)+ if err != nil {+ return nil, status.Errorf(codes.InvalidArgument, "invalid user name: %v", err)+ }++ currentUser, err := s.GetCurrentUser(ctx)+ if err != nil {+ return nil, status.Errorf(codes.Internal, "failed to get current user: %v", err)+ }+ if currentUser == nil || currentUser.ID != userID {+ return nil, status.Errorf(codes.PermissionDenied, "permission denied")+ }++ userSetting, err := s.Store.GetUserSetting(ctx, &store.FindUserSetting{+ UserID: &userID,+ Key: storepb.UserSettingKey_SHORTCUTS,+ })+ if err != nil {+ return nil, err+ }+ if userSetting == nil {+ userSetting = &storepb.UserSetting{+ UserId: userID,+ Key: storepb.UserSettingKey_SHORTCUTS,+ Value: &storepb.UserSetting_Shortcuts{},+ }+ }++ shortcutsUserSetting := userSetting.GetShortcuts()+ shortcuts := shortcutsUserSetting.GetShortcuts()+ shortcuts = append(shortcuts, &storepb.ShortcutsUserSetting_Shortcut{+ Id: request.Shortcut.GetId(),+ Title: request.Shortcut.GetTitle(),+ Filter: request.Shortcut.GetFilter(),+ })+ shortcutsUserSetting.Shortcuts = shortcuts++ userSetting.Value = &storepb.UserSetting_Shortcuts{+ Shortcuts: shortcutsUserSetting,+ }++ _, err = s.Store.UpsertUserSetting(ctx, userSetting)+ if err != nil {+ return nil, err+ }++ return &v1pb.Shortcut{+ Id: request.Shortcut.GetId(),+ Title: request.Shortcut.GetTitle(),+ Filter: request.Shortcut.GetFilter(),+ }, nil+}++func (s *APIV1Service) UpdateShortcut(ctx context.Context, request *v1pb.UpdateShortcutRequest) (*v1pb.Shortcut, error) {+ userID, err := ExtractUserIDFromName(request.Parent)+ if err != nil {+ return nil, status.Errorf(codes.InvalidArgument, "invalid user name: %v", err)+ }++ currentUser, err := s.GetCurrentUser(ctx)+ if err != nil {+ return nil, status.Errorf(codes.Internal, "failed to get current user: %v", err)+ }+ if currentUser == nil || currentUser.ID != userID {+ return nil, status.Errorf(codes.PermissionDenied, "permission denied")+ }++ if request.UpdateMask == nil || len(request.UpdateMask.Paths) == 0 {+ return nil, status.Errorf(codes.InvalidArgument, "update mask is required")+ }++ userSetting, err := s.Store.GetUserSetting(ctx, &store.FindUserSetting{+ UserID: &userID,+ Key: storepb.UserSettingKey_SHORTCUTS,+ })+ if err != nil {+ return nil, err+ }+ if userSetting == nil {+ return nil, status.Errorf(codes.NotFound, "shortcut not found")+ }++ shortcutsUserSetting := userSetting.GetShortcuts()+ shortcuts := shortcutsUserSetting.GetShortcuts()+ newShortcuts := make([]*storepb.ShortcutsUserSetting_Shortcut, 0, len(shortcuts))+ for _, shortcut := range shortcuts {+ if shortcut.GetId() == request.Shortcut.GetId() {+ for _, field := range request.UpdateMask.Paths {+ if field == "title" {+ shortcut.Title = request.Shortcut.GetTitle()+ } else if field == "filter" {+ shortcut.Filter = request.Shortcut.GetFilter()+ }+ }+ }+ newShortcuts = append(newShortcuts, shortcut)+ }+ shortcutsUserSetting.Shortcuts = newShortcuts+ userSetting.Value = &storepb.UserSetting_Shortcuts{+ Shortcuts: shortcutsUserSetting,+ }+ _, err = s.Store.UpsertUserSetting(ctx, userSetting)+ if err != nil {+ return nil, err+ }++ return &v1pb.Shortcut{+ Id: request.Shortcut.GetId(),+ Title: request.Shortcut.GetTitle(),+ Filter: request.Shortcut.GetFilter(),+ }, nil+}++func (s *APIV1Service) DeleteShortcut(ctx context.Context, request *v1pb.DeleteShortcutRequest) (*emptypb.Empty, error) {+ userID, err := ExtractUserIDFromName(request.Parent)+ if err != nil {+ return nil, status.Errorf(codes.InvalidArgument, "invalid user name: %v", err)+ }++ currentUser, err := s.GetCurrentUser(ctx)+ if err != nil {+ return nil, status.Errorf(codes.Internal, "failed to get current user: %v", err)+ }+ if currentUser == nil || currentUser.ID != userID {+ return nil, status.Errorf(codes.PermissionDenied, "permission denied")+ }++ userSetting, err := s.Store.GetUserSetting(ctx, &store.FindUserSetting{+ UserID: &userID,+ Key: storepb.UserSettingKey_SHORTCUTS,+ })+ if err != nil {+ return nil, err+ }+ if userSetting == nil {+ return &emptypb.Empty{}, nil+ }++ shortcutsUserSetting := userSetting.GetShortcuts()+ shortcuts := shortcutsUserSetting.GetShortcuts()+ newShortcuts := make([]*storepb.ShortcutsUserSetting_Shortcut, 0, len(shortcuts))+ for _, shortcut := range shortcuts {+ if shortcut.GetId() != request.Id {+ newShortcuts = append(newShortcuts, shortcut)+ }+ }+ shortcutsUserSetting.Shortcuts = newShortcuts+ userSetting.Value = &storepb.UserSetting_Shortcuts{+ Shortcuts: shortcutsUserSetting,+ }+ _, err = s.Store.UpsertUserSetting(ctx, userSetting)+ if err != nil {+ return nil, err+ }++ return &emptypb.Empty{}, nil+}diff --git a/store/user_setting.go b/store/user_setting.goindex 8ef1bb117..18d0761e0 100644--- a/store/user_setting.go+++ b/store/user_setting.go@@ -145,6 +145,12 @@ func convertUserSettingFromRaw(raw *UserSetting) (*storepb.UserSetting, error) {return nil, err}userSetting.Value = &storepb.UserSetting_AccessTokens{AccessTokens: accessTokensUserSetting}+ case storepb.UserSettingKey_SHORTCUTS:+ shortcutsUserSetting := &storepb.ShortcutsUserSetting{}+ if err := protojsonUnmarshaler.Unmarshal([]byte(raw.Value), shortcutsUserSetting); err != nil {+ return nil, err+ }+ userSetting.Value = &storepb.UserSetting_Shortcuts{Shortcuts: shortcutsUserSetting}case storepb.UserSettingKey_LOCALE:userSetting.Value = &storepb.UserSetting_Locale{Locale: raw.Value}case storepb.UserSettingKey_APPEARANCE:@@ -171,6 +177,13 @@ func convertUserSettingToRaw(userSetting *storepb.UserSetting) (*UserSetting, erreturn nil, err}raw.Value = string(value)+ case storepb.UserSettingKey_SHORTCUTS:+ shortcutsUserSetting := userSetting.GetShortcuts()+ value, err := protojson.Marshal(shortcutsUserSetting)+ if err != nil {+ return nil, err+ }+ raw.Value = string(value)case storepb.UserSettingKey_LOCALE:raw.Value = userSetting.GetLocale()case storepb.UserSettingKey_APPEARANCE: