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
chore: update user setting api
Stevenc1f55abaebbe
diff --git a/api/v2/inbox_service .go b/api/v2/inbox_service .goindex faaf625c9..51b170b2e 100644--- a/api/v2/inbox_service .go+++ b/api/v2/inbox_service .go@@ -53,8 +53,8 @@ func (s *APIV2Service) UpdateInbox(ctx context.Context, request *apiv2pb.UpdateIupdate := &store.UpdateInbox{ID: inboxID,}- for _, path := range request.UpdateMask.Paths {- if path == "status" {+ for _, field := range request.UpdateMask.Paths {+ if field == "status" {if request.Inbox.Status == apiv2pb.Inbox_STATUS_UNSPECIFIED {return nil, status.Errorf(codes.InvalidArgument, "status is required")}diff --git a/api/v2/system_service.go b/api/v2/system_service.goindex af37a22c7..4605387d5 100644--- a/api/v2/system_service.go+++ b/api/v2/system_service.go@@ -46,8 +46,8 @@ func (s *APIV2Service) UpdateSystemInfo(ctx context.Context, request *apiv2pb.Up}// Update system settings.- for _, path := range request.UpdateMask.Paths {- if path == "allow_registration" {+ for _, field := range request.UpdateMask.Paths {+ if field == "allow_registration" {_, err := s.Store.UpsertSystemSetting(ctx, &store.SystemSetting{Name: "allow-signup",Value: strconv.FormatBool(request.SystemInfo.AllowRegistration),@@ -55,7 +55,7 @@ func (s *APIV2Service) UpdateSystemInfo(ctx context.Context, request *apiv2pb.Upif err != nil {return nil, status.Errorf(codes.Internal, "failed to update allow_registration system setting: %v", err)}- } else if path == "disable_password_login" {+ } else if field == "disable_password_login" {_, err := s.Store.UpsertSystemSetting(ctx, &store.SystemSetting{Name: "disable-password-login",Value: strconv.FormatBool(request.SystemInfo.DisablePasswordLogin),@@ -63,7 +63,7 @@ func (s *APIV2Service) UpdateSystemInfo(ctx context.Context, request *apiv2pb.Upif err != nil {return nil, status.Errorf(codes.Internal, "failed to update disable_password_login system setting: %v", err)}- } else if path == "additional_script" {+ } else if field == "additional_script" {_, err := s.Store.UpsertSystemSetting(ctx, &store.SystemSetting{Name: "additional-script",Value: request.SystemInfo.AdditionalScript,@@ -71,7 +71,7 @@ func (s *APIV2Service) UpdateSystemInfo(ctx context.Context, request *apiv2pb.Upif err != nil {return nil, status.Errorf(codes.Internal, "failed to update additional_script system setting: %v", err)}- } else if path == "additional_style" {+ } else if field == "additional_style" {_, err := s.Store.UpsertSystemSetting(ctx, &store.SystemSetting{Name: "additional-style",Value: request.SystemInfo.AdditionalStyle,diff --git a/api/v2/user_service.go b/api/v2/user_service.goindex 2dfad9921..27c4f6b22 100644--- a/api/v2/user_service.go+++ b/api/v2/user_service.go@@ -187,6 +187,94 @@ func (s *APIV2Service) DeleteUser(ctx context.Context, request *apiv2pb.DeleteUsreturn &apiv2pb.DeleteUserResponse{}, nil}+func (s *APIV2Service) GetUserSettings(ctx context.Context, _ *apiv2pb.GetUserSettingsRequest) (*apiv2pb.GetUserSettingsResponse, error) {+ user, err := getCurrentUser(ctx, s.Store)+ if err != nil {+ return nil, status.Errorf(codes.Internal, "failed to get current user: %v", err)+ }++ userSettings, err := s.Store.ListUserSettingsV1(ctx, &store.FindUserSettingV1{+ UserID: &user.ID,+ })+ if err != nil {+ return nil, status.Errorf(codes.Internal, "failed to list user settings: %v", err)+ }+ userSetting := &apiv2pb.UserSetting{}+ for _, setting := range userSettings {+ if setting.Key == storepb.UserSettingKey_USER_SETTING_LOCALE {+ userSetting.Locale = setting.GetLocale()+ } else if setting.Key == storepb.UserSettingKey_USER_SETTING_APPEARANCE {+ userSetting.Appearance = setting.GetAppearance()+ } else if setting.Key == storepb.UserSettingKey_USER_SETTING_MEMO_VISIBILITY {+ userSetting.MemoVisibility = setting.GetMemoVisibility()+ } else if setting.Key == storepb.UserSettingKey_USER_SETTING_TELEGRAM_USER_ID {+ userSetting.TelegramUserId = setting.GetTelegramUserId()+ }+ }+ return &apiv2pb.GetUserSettingsResponse{+ Settings: userSetting,+ }, nil+}++func (s *APIV2Service) UpdateUserSettings(ctx context.Context, request *apiv2pb.UpdateUserSettingsRequest) (*apiv2pb.UpdateUserSettingsResponse, error) {+ user, err := getCurrentUser(ctx, s.Store)+ if err != nil {+ return nil, status.Errorf(codes.Internal, "failed to get current user: %v", err)+ }++ if request.UpdateMask == nil || len(request.UpdateMask.Paths) == 0 {+ return nil, status.Errorf(codes.InvalidArgument, "update mask is empty")+ }++ for _, field := range request.UpdateMask.Paths {+ if field == "locale" {+ if _, err := s.Store.UpsertUserSettingV1(ctx, &storepb.UserSetting{+ UserId: user.ID,+ Key: storepb.UserSettingKey_USER_SETTING_LOCALE,+ Value: &storepb.UserSetting_Locale{+ Locale: request.Settings.Locale,+ },+ }); err != nil {+ return nil, status.Errorf(codes.Internal, "failed to upsert user setting: %v", err)+ }+ } else if field == "appearance" {+ if _, err := s.Store.UpsertUserSettingV1(ctx, &storepb.UserSetting{+ UserId: user.ID,+ Key: storepb.UserSettingKey_USER_SETTING_APPEARANCE,+ Value: &storepb.UserSetting_Appearance{+ Appearance: request.Settings.Appearance,+ },+ }); err != nil {+ return nil, status.Errorf(codes.Internal, "failed to upsert user setting: %v", err)+ }+ } else if field == "memo_visibility" {+ if _, err := s.Store.UpsertUserSettingV1(ctx, &storepb.UserSetting{+ UserId: user.ID,+ Key: storepb.UserSettingKey_USER_SETTING_MEMO_VISIBILITY,+ Value: &storepb.UserSetting_MemoVisibility{+ MemoVisibility: request.Settings.MemoVisibility,+ },+ }); err != nil {+ return nil, status.Errorf(codes.Internal, "failed to upsert user setting: %v", err)+ }+ } else if field == "telegram_user_id" {+ if _, err := s.Store.UpsertUserSettingV1(ctx, &storepb.UserSetting{+ UserId: user.ID,+ Key: storepb.UserSettingKey_USER_SETTING_TELEGRAM_USER_ID,+ Value: &storepb.UserSetting_TelegramUserId{+ TelegramUserId: request.Settings.TelegramUserId,+ },+ }); err != nil {+ return nil, status.Errorf(codes.Internal, "failed to upsert user setting: %v", err)+ }+ } else {+ return nil, status.Errorf(codes.InvalidArgument, "invalid update path: %s", field)+ }+ }++ return &apiv2pb.UpdateUserSettingsResponse{}, nil+}+func (s *APIV2Service) ListUserAccessTokens(ctx context.Context, request *apiv2pb.ListUserAccessTokensRequest) (*apiv2pb.ListUserAccessTokensResponse, error) {user, err := getCurrentUser(ctx, s.Store)if err != nil {diff --git a/api/v2/webhook_service.go b/api/v2/webhook_service.goindex 149afb920..3beb84068 100644--- a/api/v2/webhook_service.go+++ b/api/v2/webhook_service.go@@ -76,8 +76,8 @@ func (s *APIV2Service) UpdateWebhook(ctx context.Context, request *apiv2pb.Updat}update := &store.UpdateWebhook{}- for _, path := range request.UpdateMask.Paths {- switch path {+ for _, field := range request.UpdateMask.Paths {+ switch field {case "row_status":rowStatus := storepb.RowStatus(storepb.RowStatus_value[request.Webhook.RowStatus.String()])update.RowStatus = &rowStatusdiff --git a/proto/api/v2/user_service.proto b/proto/api/v2/user_service.protoindex c36bf1c62..8e9200b39 100644--- a/proto/api/v2/user_service.proto+++ b/proto/api/v2/user_service.proto@@ -38,6 +38,17 @@ service UserService {option (google.api.http) = {delete: "/api/v2/{name=users/*}"};option (google.api.method_signature) = "name";}+ rpc GetUserSettings(GetUserSettingsRequest) returns (GetUserSettingsResponse) {+ option (google.api.http) = {get: "/api/v2/{name=users/*}/settings"};+ option (google.api.method_signature) = "name";+ }+ rpc UpdateUserSettings(UpdateUserSettingsRequest) returns (UpdateUserSettingsResponse) {+ option (google.api.http) = {+ patch: "/api/v2/{settings.name=users/*/settings}"+ body: "settings"+ };+ option (google.api.method_signature) = "settings,update_mask";+ }// ListUserAccessTokens returns a list of access tokens for a user.rpc ListUserAccessTokens(ListUserAccessTokensRequest) returns (ListUserAccessTokensResponse) {option (google.api.http) = {get: "/api/v2/{name=users/*}/access_tokens"};@@ -124,6 +135,40 @@ message DeleteUserRequest {message DeleteUserResponse {}+message UserSetting {+ // The name of the user.+ // Format: users/{username}+ string name = 1;+ // The preferred locale of the user.+ string locale = 2;+ // The preferred appearance of the user.+ string appearance = 3;+ // The default visibility of the memo.+ string memo_visibility = 4;+ // The telegram user id of the user.+ string telegram_user_id = 5;+}++message GetUserSettingsRequest {+ // The name of the user.+ // Format: users/{username}+ string name = 1;+}++message GetUserSettingsResponse {+ UserSetting settings = 1;+}++message UpdateUserSettingsRequest {+ UserSetting settings = 1 [(google.api.field_behavior) = REQUIRED];++ google.protobuf.FieldMask update_mask = 2;+}++message UpdateUserSettingsResponse {+ UserSetting settings = 1;+}+message UserAccessToken {string access_token = 1;string description = 2;diff --git a/proto/gen/api/v2/README.md b/proto/gen/api/v2/README.mdindex ca96996d3..898fcddaa 100644--- a/proto/gen/api/v2/README.md+++ b/proto/gen/api/v2/README.md@@ -27,12 +27,17 @@- [DeleteUserResponse](#memos-api-v2-DeleteUserResponse)- [GetUserRequest](#memos-api-v2-GetUserRequest)- [GetUserResponse](#memos-api-v2-GetUserResponse)+ - [GetUserSettingsRequest](#memos-api-v2-GetUserSettingsRequest)+ - [GetUserSettingsResponse](#memos-api-v2-GetUserSettingsResponse)- [ListUserAccessTokensRequest](#memos-api-v2-ListUserAccessTokensRequest)- [ListUserAccessTokensResponse](#memos-api-v2-ListUserAccessTokensResponse)- [UpdateUserRequest](#memos-api-v2-UpdateUserRequest)- [UpdateUserResponse](#memos-api-v2-UpdateUserResponse)+ - [UpdateUserSettingsRequest](#memos-api-v2-UpdateUserSettingsRequest)+ - [UpdateUserSettingsResponse](#memos-api-v2-UpdateUserSettingsResponse)- [User](#memos-api-v2-User)- [UserAccessToken](#memos-api-v2-UserAccessToken)+ - [UserSetting](#memos-api-v2-UserSetting)- [User.Role](#memos-api-v2-User-Role)@@ -431,6 +436,36 @@+<a name="memos-api-v2-GetUserSettingsRequest"></a>++### GetUserSettingsRequest++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | The name of the user. Format: users/{username} |+++++++<a name="memos-api-v2-GetUserSettingsResponse"></a>++### GetUserSettingsResponse++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| settings | [UserSetting](#memos-api-v2-UserSetting) | | |++++++<a name="memos-api-v2-ListUserAccessTokensRequest"></a>### ListUserAccessTokensRequest@@ -492,6 +527,37 @@+<a name="memos-api-v2-UpdateUserSettingsRequest"></a>++### UpdateUserSettingsRequest++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| settings | [UserSetting](#memos-api-v2-UserSetting) | | |+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | |+++++++<a name="memos-api-v2-UpdateUserSettingsResponse"></a>++### UpdateUserSettingsResponse++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| settings | [UserSetting](#memos-api-v2-UserSetting) | | |++++++<a name="memos-api-v2-User"></a>### User@@ -533,6 +599,25 @@++<a name="memos-api-v2-UserSetting"></a>++### UserSetting++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | The name of the user. Format: users/{username} |+| locale | [string](#string) | | The preferred locale of the user. |+| appearance | [string](#string) | | The preferred appearance of the user. |+| memo_visibility | [string](#string) | | The default visibility of the memo. |+| telegram_user_id | [string](#string) | | The telegram user id of the user. |+++++@@ -565,6 +650,8 @@| CreateUser | [CreateUserRequest](#memos-api-v2-CreateUserRequest) | [CreateUserResponse](#memos-api-v2-CreateUserResponse) | CreateUser creates a new user. || UpdateUser | [UpdateUserRequest](#memos-api-v2-UpdateUserRequest) | [UpdateUserResponse](#memos-api-v2-UpdateUserResponse) | UpdateUser updates a user. || DeleteUser | [DeleteUserRequest](#memos-api-v2-DeleteUserRequest) | [DeleteUserResponse](#memos-api-v2-DeleteUserResponse) | DeleteUser deletes a user. |+| GetUserSettings | [GetUserSettingsRequest](#memos-api-v2-GetUserSettingsRequest) | [GetUserSettingsResponse](#memos-api-v2-GetUserSettingsResponse) | |+| UpdateUserSettings | [UpdateUserSettingsRequest](#memos-api-v2-UpdateUserSettingsRequest) | [UpdateUserSettingsResponse](#memos-api-v2-UpdateUserSettingsResponse) | || ListUserAccessTokens | [ListUserAccessTokensRequest](#memos-api-v2-ListUserAccessTokensRequest) | [ListUserAccessTokensResponse](#memos-api-v2-ListUserAccessTokensResponse) | ListUserAccessTokens returns a list of access tokens for a user. || CreateUserAccessToken | [CreateUserAccessTokenRequest](#memos-api-v2-CreateUserAccessTokenRequest) | [CreateUserAccessTokenResponse](#memos-api-v2-CreateUserAccessTokenResponse) | CreateUserAccessToken creates a new access token for a user. || DeleteUserAccessToken | [DeleteUserAccessTokenRequest](#memos-api-v2-DeleteUserAccessTokenRequest) | [DeleteUserAccessTokenResponse](#memos-api-v2-DeleteUserAccessTokenResponse) | DeleteUserAccessToken deletes an access token for a user. |diff --git a/proto/gen/api/v2/user_service.pb.go b/proto/gen/api/v2/user_service.pb.goindex 0745f023f..37062bf47 100644--- a/proto/gen/api/v2/user_service.pb.go+++ b/proto/gen/api/v2/user_service.pb.go@@ -575,6 +575,289 @@ func (*DeleteUserResponse) Descriptor() ([]byte, []int) {return file_api_v2_user_service_proto_rawDescGZIP(), []int{8}}+type UserSetting struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ // The name of the user.+ // Format: users/{username}+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`+ // The preferred locale of the user.+ Locale string `protobuf:"bytes,2,opt,name=locale,proto3" json:"locale,omitempty"`+ // The preferred appearance of the user.+ Appearance string `protobuf:"bytes,3,opt,name=appearance,proto3" json:"appearance,omitempty"`+ // The default visibility of the memo.+ MemoVisibility string `protobuf:"bytes,4,opt,name=memo_visibility,json=memoVisibility,proto3" json:"memo_visibility,omitempty"`+ // The telegram user id of the user.+ TelegramUserId string `protobuf:"bytes,5,opt,name=telegram_user_id,json=telegramUserId,proto3" json:"telegram_user_id,omitempty"`+}++func (x *UserSetting) Reset() {+ *x = UserSetting{}+ if protoimpl.UnsafeEnabled {+ mi := &file_api_v2_user_service_proto_msgTypes[9]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *UserSetting) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*UserSetting) ProtoMessage() {}++func (x *UserSetting) ProtoReflect() protoreflect.Message {+ mi := &file_api_v2_user_service_proto_msgTypes[9]+ if protoimpl.UnsafeEnabled && x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use UserSetting.ProtoReflect.Descriptor instead.+func (*UserSetting) Descriptor() ([]byte, []int) {+ return file_api_v2_user_service_proto_rawDescGZIP(), []int{9}+}++func (x *UserSetting) GetName() string {+ if x != nil {+ return x.Name+ }+ return ""+}++func (x *UserSetting) GetLocale() string {+ if x != nil {+ return x.Locale+ }+ return ""+}++func (x *UserSetting) GetAppearance() string {+ if x != nil {+ return x.Appearance+ }+ return ""+}++func (x *UserSetting) GetMemoVisibility() string {+ if x != nil {+ return x.MemoVisibility+ }+ return ""+}++func (x *UserSetting) GetTelegramUserId() string {+ if x != nil {+ return x.TelegramUserId+ }+ return ""+}++type GetUserSettingsRequest struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ // The name of the user.+ // Format: users/{username}+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`+}++func (x *GetUserSettingsRequest) Reset() {+ *x = GetUserSettingsRequest{}+ if protoimpl.UnsafeEnabled {+ mi := &file_api_v2_user_service_proto_msgTypes[10]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *GetUserSettingsRequest) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*GetUserSettingsRequest) ProtoMessage() {}++func (x *GetUserSettingsRequest) ProtoReflect() protoreflect.Message {+ mi := &file_api_v2_user_service_proto_msgTypes[10]+ if protoimpl.UnsafeEnabled && x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use GetUserSettingsRequest.ProtoReflect.Descriptor instead.+func (*GetUserSettingsRequest) Descriptor() ([]byte, []int) {+ return file_api_v2_user_service_proto_rawDescGZIP(), []int{10}+}++func (x *GetUserSettingsRequest) GetName() string {+ if x != nil {+ return x.Name+ }+ return ""+}++type GetUserSettingsResponse struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ Settings *UserSetting `protobuf:"bytes,1,opt,name=settings,proto3" json:"settings,omitempty"`+}++func (x *GetUserSettingsResponse) Reset() {+ *x = GetUserSettingsResponse{}+ if protoimpl.UnsafeEnabled {+ mi := &file_api_v2_user_service_proto_msgTypes[11]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *GetUserSettingsResponse) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*GetUserSettingsResponse) ProtoMessage() {}++func (x *GetUserSettingsResponse) ProtoReflect() protoreflect.Message {+ mi := &file_api_v2_user_service_proto_msgTypes[11]+ if protoimpl.UnsafeEnabled && x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use GetUserSettingsResponse.ProtoReflect.Descriptor instead.+func (*GetUserSettingsResponse) Descriptor() ([]byte, []int) {+ return file_api_v2_user_service_proto_rawDescGZIP(), []int{11}+}++func (x *GetUserSettingsResponse) GetSettings() *UserSetting {+ if x != nil {+ return x.Settings+ }+ return nil+}++type UpdateUserSettingsRequest struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ Settings *UserSetting `protobuf:"bytes,1,opt,name=settings,proto3" json:"settings,omitempty"`+ UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`+}++func (x *UpdateUserSettingsRequest) Reset() {+ *x = UpdateUserSettingsRequest{}+ if protoimpl.UnsafeEnabled {+ mi := &file_api_v2_user_service_proto_msgTypes[12]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *UpdateUserSettingsRequest) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*UpdateUserSettingsRequest) ProtoMessage() {}++func (x *UpdateUserSettingsRequest) ProtoReflect() protoreflect.Message {+ mi := &file_api_v2_user_service_proto_msgTypes[12]+ if protoimpl.UnsafeEnabled && x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use UpdateUserSettingsRequest.ProtoReflect.Descriptor instead.+func (*UpdateUserSettingsRequest) Descriptor() ([]byte, []int) {+ return file_api_v2_user_service_proto_rawDescGZIP(), []int{12}+}++func (x *UpdateUserSettingsRequest) GetSettings() *UserSetting {+ if x != nil {+ return x.Settings+ }+ return nil+}++func (x *UpdateUserSettingsRequest) GetUpdateMask() *fieldmaskpb.FieldMask {+ if x != nil {+ return x.UpdateMask+ }+ return nil+}++type UpdateUserSettingsResponse struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ Settings *UserSetting `protobuf:"bytes,1,opt,name=settings,proto3" json:"settings,omitempty"`+}++func (x *UpdateUserSettingsResponse) Reset() {+ *x = UpdateUserSettingsResponse{}+ if protoimpl.UnsafeEnabled {+ mi := &file_api_v2_user_service_proto_msgTypes[13]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *UpdateUserSettingsResponse) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*UpdateUserSettingsResponse) ProtoMessage() {}++func (x *UpdateUserSettingsResponse) ProtoReflect() protoreflect.Message {+ mi := &file_api_v2_user_service_proto_msgTypes[13]+ if protoimpl.UnsafeEnabled && x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use UpdateUserSettingsResponse.ProtoReflect.Descriptor instead.+func (*UpdateUserSettingsResponse) Descriptor() ([]byte, []int) {+ return file_api_v2_user_service_proto_rawDescGZIP(), []int{13}+}++func (x *UpdateUserSettingsResponse) GetSettings() *UserSetting {+ if x != nil {+ return x.Settings+ }+ return nil+}+type UserAccessToken struct {state protoimpl.MessageStatesizeCache protoimpl.SizeCache@@ -589,7 +872,7 @@ type UserAccessToken struct {func (x *UserAccessToken) Reset() {*x = UserAccessToken{}if protoimpl.UnsafeEnabled {- mi := &file_api_v2_user_service_proto_msgTypes[9]+ mi := &file_api_v2_user_service_proto_msgTypes[14]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -602,7 +885,7 @@ func (x *UserAccessToken) String() string {func (*UserAccessToken) ProtoMessage() {}func (x *UserAccessToken) ProtoReflect() protoreflect.Message {- mi := &file_api_v2_user_service_proto_msgTypes[9]+ mi := &file_api_v2_user_service_proto_msgTypes[14]if protoimpl.UnsafeEnabled && x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -615,7 +898,7 @@ func (x *UserAccessToken) ProtoReflect() protoreflect.Message {// Deprecated: Use UserAccessToken.ProtoReflect.Descriptor instead.func (*UserAccessToken) Descriptor() ([]byte, []int) {- return file_api_v2_user_service_proto_rawDescGZIP(), []int{9}+ return file_api_v2_user_service_proto_rawDescGZIP(), []int{14}}func (x *UserAccessToken) GetAccessToken() string {@@ -659,7 +942,7 @@ type ListUserAccessTokensRequest struct {func (x *ListUserAccessTokensRequest) Reset() {*x = ListUserAccessTokensRequest{}if protoimpl.UnsafeEnabled {- mi := &file_api_v2_user_service_proto_msgTypes[10]+ mi := &file_api_v2_user_service_proto_msgTypes[15]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -672,7 +955,7 @@ func (x *ListUserAccessTokensRequest) String() string {func (*ListUserAccessTokensRequest) ProtoMessage() {}func (x *ListUserAccessTokensRequest) ProtoReflect() protoreflect.Message {- mi := &file_api_v2_user_service_proto_msgTypes[10]+ mi := &file_api_v2_user_service_proto_msgTypes[15]if protoimpl.UnsafeEnabled && x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -685,7 +968,7 @@ func (x *ListUserAccessTokensRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use ListUserAccessTokensRequest.ProtoReflect.Descriptor instead.func (*ListUserAccessTokensRequest) Descriptor() ([]byte, []int) {- return file_api_v2_user_service_proto_rawDescGZIP(), []int{10}+ return file_api_v2_user_service_proto_rawDescGZIP(), []int{15}}func (x *ListUserAccessTokensRequest) GetName() string {@@ -706,7 +989,7 @@ type ListUserAccessTokensResponse struct {func (x *ListUserAccessTokensResponse) Reset() {*x = ListUserAccessTokensResponse{}if protoimpl.UnsafeEnabled {- mi := &file_api_v2_user_service_proto_msgTypes[11]+ mi := &file_api_v2_user_service_proto_msgTypes[16]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -719,7 +1002,7 @@ func (x *ListUserAccessTokensResponse) String() string {func (*ListUserAccessTokensResponse) ProtoMessage() {}func (x *ListUserAccessTokensResponse) ProtoReflect() protoreflect.Message {- mi := &file_api_v2_user_service_proto_msgTypes[11]+ mi := &file_api_v2_user_service_proto_msgTypes[16]if protoimpl.UnsafeEnabled && x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -732,7 +1015,7 @@ func (x *ListUserAccessTokensResponse) ProtoReflect() protoreflect.Message {// Deprecated: Use ListUserAccessTokensResponse.ProtoReflect.Descriptor instead.func (*ListUserAccessTokensResponse) Descriptor() ([]byte, []int) {- return file_api_v2_user_service_proto_rawDescGZIP(), []int{11}+ return file_api_v2_user_service_proto_rawDescGZIP(), []int{16}}func (x *ListUserAccessTokensResponse) GetAccessTokens() []*UserAccessToken {@@ -757,7 +1040,7 @@ type CreateUserAccessTokenRequest struct {func (x *CreateUserAccessTokenRequest) Reset() {*x = CreateUserAccessTokenRequest{}if protoimpl.UnsafeEnabled {- mi := &file_api_v2_user_service_proto_msgTypes[12]+ mi := &file_api_v2_user_service_proto_msgTypes[17]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -770,7 +1053,7 @@ func (x *CreateUserAccessTokenRequest) String() string {func (*CreateUserAccessTokenRequest) ProtoMessage() {}func (x *CreateUserAccessTokenRequest) ProtoReflect() protoreflect.Message {- mi := &file_api_v2_user_service_proto_msgTypes[12]+ mi := &file_api_v2_user_service_proto_msgTypes[17]if protoimpl.UnsafeEnabled && x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -783,7 +1066,7 @@ func (x *CreateUserAccessTokenRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use CreateUserAccessTokenRequest.ProtoReflect.Descriptor instead.func (*CreateUserAccessTokenRequest) Descriptor() ([]byte, []int) {- return file_api_v2_user_service_proto_rawDescGZIP(), []int{12}+ return file_api_v2_user_service_proto_rawDescGZIP(), []int{17}}func (x *CreateUserAccessTokenRequest) GetName() string {@@ -818,7 +1101,7 @@ type CreateUserAccessTokenResponse struct {func (x *CreateUserAccessTokenResponse) Reset() {*x = CreateUserAccessTokenResponse{}if protoimpl.UnsafeEnabled {- mi := &file_api_v2_user_service_proto_msgTypes[13]+ mi := &file_api_v2_user_service_proto_msgTypes[18]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -831,7 +1114,7 @@ func (x *CreateUserAccessTokenResponse) String() string {func (*CreateUserAccessTokenResponse) ProtoMessage() {}func (x *CreateUserAccessTokenResponse) ProtoReflect() protoreflect.Message {- mi := &file_api_v2_user_service_proto_msgTypes[13]+ mi := &file_api_v2_user_service_proto_msgTypes[18]if protoimpl.UnsafeEnabled && x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -844,7 +1127,7 @@ func (x *CreateUserAccessTokenResponse) ProtoReflect() protoreflect.Message {// Deprecated: Use CreateUserAccessTokenResponse.ProtoReflect.Descriptor instead.func (*CreateUserAccessTokenResponse) Descriptor() ([]byte, []int) {- return file_api_v2_user_service_proto_rawDescGZIP(), []int{13}+ return file_api_v2_user_service_proto_rawDescGZIP(), []int{18}}func (x *CreateUserAccessTokenResponse) GetAccessToken() *UserAccessToken {@@ -869,7 +1152,7 @@ type DeleteUserAccessTokenRequest struct {func (x *DeleteUserAccessTokenRequest) Reset() {*x = DeleteUserAccessTokenRequest{}if protoimpl.UnsafeEnabled {- mi := &file_api_v2_user_service_proto_msgTypes[14]+ mi := &file_api_v2_user_service_proto_msgTypes[19]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -882,7 +1165,7 @@ func (x *DeleteUserAccessTokenRequest) String() string {func (*DeleteUserAccessTokenRequest) ProtoMessage() {}func (x *DeleteUserAccessTokenRequest) ProtoReflect() protoreflect.Message {- mi := &file_api_v2_user_service_proto_msgTypes[14]+ mi := &file_api_v2_user_service_proto_msgTypes[19]if protoimpl.UnsafeEnabled && x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -895,7 +1178,7 @@ func (x *DeleteUserAccessTokenRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use DeleteUserAccessTokenRequest.ProtoReflect.Descriptor instead.func (*DeleteUserAccessTokenRequest) Descriptor() ([]byte, []int) {- return file_api_v2_user_service_proto_rawDescGZIP(), []int{14}+ return file_api_v2_user_service_proto_rawDescGZIP(), []int{19}}func (x *DeleteUserAccessTokenRequest) GetName() string {@@ -921,7 +1204,7 @@ type DeleteUserAccessTokenResponse struct {func (x *DeleteUserAccessTokenResponse) Reset() {*x = DeleteUserAccessTokenResponse{}if protoimpl.UnsafeEnabled {- mi := &file_api_v2_user_service_proto_msgTypes[15]+ mi := &file_api_v2_user_service_proto_msgTypes[20]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -934,7 +1217,7 @@ func (x *DeleteUserAccessTokenResponse) String() string {func (*DeleteUserAccessTokenResponse) ProtoMessage() {}func (x *DeleteUserAccessTokenResponse) ProtoReflect() protoreflect.Message {- mi := &file_api_v2_user_service_proto_msgTypes[15]+ mi := &file_api_v2_user_service_proto_msgTypes[20]if protoimpl.UnsafeEnabled && x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -947,7 +1230,7 @@ func (x *DeleteUserAccessTokenResponse) ProtoReflect() protoreflect.Message {// Deprecated: Use DeleteUserAccessTokenResponse.ProtoReflect.Descriptor instead.func (*DeleteUserAccessTokenResponse) Descriptor() ([]byte, []int) {- return file_api_v2_user_service_proto_rawDescGZIP(), []int{15}+ return file_api_v2_user_service_proto_rawDescGZIP(), []int{20}}var File_api_v2_user_service_proto protoreflect.FileDescriptor@@ -1023,129 +1306,184 @@ var file_api_v2_user_service_proto_rawDesc = []byte{0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65,0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x14, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,- 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xca, 0x01, 0x0a,- 0x0f, 0x55, 0x73, 0x65, 0x72, 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, 0x12, 0x37, 0x0a, 0x09, 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x5f,- 0x61, 0x74, 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, 0x54, 0x69, 0x6d, 0x65, 0x73,- 0x74, 0x61, 0x6d, 0x70, 0x52, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39,- 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01,- 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,- 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09,- 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x22, 0x31, 0x0a, 0x1b, 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, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,- 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x62, 0x0a, 0x1c,- 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, 0x12, 0x42, 0x0a, 0x0d,- 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x01, 0x20,- 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e,- 0x76, 0x32, 0x2e, 0x55, 0x73, 0x65, 0x72, 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,- 0x22, 0xa3, 0x01, 0x0a, 0x1c, 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, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,- 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,- 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63,- 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72,- 0x65, 0x73, 0x5f, 0x61, 0x74, 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, 0x54, 0x69,- 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72,- 0x65, 0x73, 0x41, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x65, 0x78, 0x70, 0x69,- 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x22, 0x61, 0x0a, 0x1d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,- 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52,- 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73,- 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e,- 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x73, 0x65,- 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x0b, 0x61, 0x63,- 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x55, 0x0a, 0x1c, 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, 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,- 0x22, 0x1f, 0x0a, 0x1d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63,- 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,- 0x65, 0x32, 0x89, 0x08, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,- 0x65, 0x12, 0x6d, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x6d,- 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x55,- 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6d, 0x65, 0x6d,- 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65,- 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0xda, 0x41, 0x04, 0x6e, 0x61,- 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76,- 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d,- 0x12, 0x6f, 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, 0x32, 0x2e, 0x43, 0x72,- 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,- 0x20, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43,- 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,- 0x65, 0x22, 0x1e, 0xda, 0x41, 0x04, 0x75, 0x73, 0x65, 0x72, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11,- 0x3a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x09, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72,- 0x73, 0x12, 0x8d, 0x01, 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, 0x32, 0x2e,- 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,- 0x74, 0x1a, 0x20, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32,- 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f,- 0x6e, 0x73, 0x65, 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, 0x32, 0x2f, 0x7b, 0x75,- 0x73, 0x65, 0x72, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a,- 0x7d, 0x12, 0x76, 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, 0x32, 0x2e, 0x44,- 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,- 0x1a, 0x20, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e,- 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,- 0x73, 0x65, 0x22, 0x25, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02,- 0x18, 0x2a, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65,- 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 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,- 0x32, 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, 0x32, 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,- 0x32, 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, 0xa8,- 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, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73,+ 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xac, 0x01, 0x0a,+ 0x0b, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x04,+ 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,+ 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,+ 0x52, 0x06, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x70, 0x70, 0x65,+ 0x61, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70,+ 0x70, 0x65, 0x61, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x6d, 0x65, 0x6d, 0x6f,+ 0x5f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28,+ 0x09, 0x52, 0x0e, 0x6d, 0x65, 0x6d, 0x6f, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74,+ 0x79, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x75, 0x73,+ 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x65, 0x6c,+ 0x65, 0x67, 0x72, 0x61, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x2c, 0x0a, 0x16, 0x47,+ 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65,+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,+ 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x50, 0x0a, 0x17, 0x47, 0x65, 0x74,+ 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70,+ 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73,+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61,+ 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,+ 0x67, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x94, 0x01, 0x0a, 0x19,+ 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,+ 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x08, 0x73, 0x65, 0x74,+ 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x65,+ 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53,+ 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x73, 0x65, 0x74,+ 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f,+ 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f,+ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65,+ 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61,+ 0x73, 0x6b, 0x22, 0x53, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72,+ 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,+ 0x12, 0x35, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01,+ 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76,+ 0x32, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x73,+ 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0xca, 0x01, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72,+ 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,+ 0x12, 0x37, 0x0a, 0x09, 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x5f, 0x61, 0x74, 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, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52,+ 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x65, 0x78, 0x70,+ 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,+ 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72,+ 0x65, 0x73, 0x41, 0x74, 0x22, 0x31, 0x0a, 0x1b, 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, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,+ 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x62, 0x0a, 0x1c, 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, 0x12, 0x42, 0x0a, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x73,+ 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d,+ 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x73,+ 0x65, 0x72, 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, 0x22, 0xa3, 0x01, 0x0a, 0x1c,+ 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, 0x12, 0x12, 0x0a, 0x04,+ 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,+ 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18,+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69,+ 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74,+ 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, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,+ 0x6d, 0x70, 0x48, 0x00, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x88,+ 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61,+ 0x74, 0x22, 0x61, 0x0a, 0x1d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41,+ 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,+ 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b,+ 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73,+ 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65,+ 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54,+ 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x55, 0x0a, 0x1c, 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, 0x2b, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69,- 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63,- 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,- 0x65, 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, 0x32, 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, 0xc1, 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, 0x32, 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,- 0x2b, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44,+ 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, 0x22, 0x1f, 0x0a, 0x1d, 0x44,0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54,- 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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,- 0x32, 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, 0x32, 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, 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x32, 0xa2, 0x02, 0x03, 0x4d, 0x41, 0x58, 0xaa, 0x02,- 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x0c,- 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, 0xe2, 0x02, 0x18, 0x4d,- 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, 0x5c, 0x47, 0x50, 0x42, 0x4d,- 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a,- 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,+ 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xd7, 0x0a, 0x0a,+ 0x0b, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6d, 0x0a, 0x07,+ 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e,+ 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65,+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70,+ 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70,+ 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4,+ 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x6e, 0x61,+ 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x6f, 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, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55,+ 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, 0x65, 0x6d,+ 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,+ 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0xda, 0x41,+ 0x04, 0x75, 0x73, 0x65, 0x72, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x3a, 0x04, 0x75, 0x73, 0x65,+ 0x72, 0x22, 0x09, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x8d, 0x01, 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, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74,+ 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d,+ 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61,+ 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, 0x32, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x6e,+ 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x76, 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, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,+ 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, 0x65,+ 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74,+ 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0xda,+ 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x2a, 0x16, 0x2f, 0x61,+ 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72,+ 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x8e, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72,+ 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x24, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73,+ 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53,+ 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25,+ 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65,+ 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73,+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3,+ 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x6e,+ 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x73, 0x65, 0x74,+ 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0xba, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,+ 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x27, 0x2e, 0x6d,+ 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61,+ 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65,+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70,+ 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x53,+ 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,+ 0x51, 0xda, 0x41, 0x14, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2c, 0x75, 0x70, 0x64,+ 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x3a, 0x08,+ 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x32, 0x28, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76,+ 0x32, 0x2f, 0x7b, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x6e, 0x61, 0x6d, 0x65,+ 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,+ 0x73, 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, 0x32, 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, 0x32, 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, 0x32, 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, 0xa8, 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, 0x32,+ 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, 0x2b, 0x2e,+ 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65,+ 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b,+ 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, 0x32, 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, 0xc1, 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, 0x32, 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, 0x2b, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73,+ 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73,+ 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73,+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, 0x32, 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, 0x32, 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, 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76,+ 0x32, 0xa2, 0x02, 0x03, 0x4d, 0x41, 0x58, 0xaa, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e,+ 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41,+ 0x70, 0x69, 0x5c, 0x56, 0x32, 0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70,+ 0x69, 0x5c, 0x56, 0x32, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,+ 0xea, 0x02, 0x0e, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56,+ 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,}var (@@ -1161,7 +1499,7 @@ func file_api_v2_user_service_proto_rawDescGZIP() []byte {}var file_api_v2_user_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)-var file_api_v2_user_service_proto_msgTypes = make([]protoimpl.MessageInfo, 16)+var file_api_v2_user_service_proto_msgTypes = make([]protoimpl.MessageInfo, 21)var file_api_v2_user_service_proto_goTypes = []interface{}{(User_Role)(0), // 0: memos.api.v2.User.Role(*User)(nil), // 1: memos.api.v2.User@@ -1173,52 +1511,65 @@ var file_api_v2_user_service_proto_goTypes = []interface{}{(*UpdateUserResponse)(nil), // 7: memos.api.v2.UpdateUserResponse(*DeleteUserRequest)(nil), // 8: memos.api.v2.DeleteUserRequest(*DeleteUserResponse)(nil), // 9: memos.api.v2.DeleteUserResponse- (*UserAccessToken)(nil), // 10: memos.api.v2.UserAccessToken- (*ListUserAccessTokensRequest)(nil), // 11: memos.api.v2.ListUserAccessTokensRequest- (*ListUserAccessTokensResponse)(nil), // 12: memos.api.v2.ListUserAccessTokensResponse- (*CreateUserAccessTokenRequest)(nil), // 13: memos.api.v2.CreateUserAccessTokenRequest- (*CreateUserAccessTokenResponse)(nil), // 14: memos.api.v2.CreateUserAccessTokenResponse- (*DeleteUserAccessTokenRequest)(nil), // 15: memos.api.v2.DeleteUserAccessTokenRequest- (*DeleteUserAccessTokenResponse)(nil), // 16: memos.api.v2.DeleteUserAccessTokenResponse- (RowStatus)(0), // 17: memos.api.v2.RowStatus- (*timestamppb.Timestamp)(nil), // 18: google.protobuf.Timestamp- (*fieldmaskpb.FieldMask)(nil), // 19: google.protobuf.FieldMask+ (*UserSetting)(nil), // 10: memos.api.v2.UserSetting+ (*GetUserSettingsRequest)(nil), // 11: memos.api.v2.GetUserSettingsRequest+ (*GetUserSettingsResponse)(nil), // 12: memos.api.v2.GetUserSettingsResponse+ (*UpdateUserSettingsRequest)(nil), // 13: memos.api.v2.UpdateUserSettingsRequest+ (*UpdateUserSettingsResponse)(nil), // 14: memos.api.v2.UpdateUserSettingsResponse+ (*UserAccessToken)(nil), // 15: memos.api.v2.UserAccessToken+ (*ListUserAccessTokensRequest)(nil), // 16: memos.api.v2.ListUserAccessTokensRequest+ (*ListUserAccessTokensResponse)(nil), // 17: memos.api.v2.ListUserAccessTokensResponse+ (*CreateUserAccessTokenRequest)(nil), // 18: memos.api.v2.CreateUserAccessTokenRequest+ (*CreateUserAccessTokenResponse)(nil), // 19: memos.api.v2.CreateUserAccessTokenResponse+ (*DeleteUserAccessTokenRequest)(nil), // 20: memos.api.v2.DeleteUserAccessTokenRequest+ (*DeleteUserAccessTokenResponse)(nil), // 21: memos.api.v2.DeleteUserAccessTokenResponse+ (RowStatus)(0), // 22: memos.api.v2.RowStatus+ (*timestamppb.Timestamp)(nil), // 23: google.protobuf.Timestamp+ (*fieldmaskpb.FieldMask)(nil), // 24: google.protobuf.FieldMask}var file_api_v2_user_service_proto_depIdxs = []int32{0, // 0: memos.api.v2.User.role:type_name -> memos.api.v2.User.Role- 17, // 1: memos.api.v2.User.row_status:type_name -> memos.api.v2.RowStatus- 18, // 2: memos.api.v2.User.create_time:type_name -> google.protobuf.Timestamp- 18, // 3: memos.api.v2.User.update_time:type_name -> google.protobuf.Timestamp+ 22, // 1: memos.api.v2.User.row_status:type_name -> memos.api.v2.RowStatus+ 23, // 2: memos.api.v2.User.create_time:type_name -> google.protobuf.Timestamp+ 23, // 3: memos.api.v2.User.update_time:type_name -> google.protobuf.Timestamp1, // 4: memos.api.v2.GetUserResponse.user:type_name -> memos.api.v2.User1, // 5: memos.api.v2.CreateUserRequest.user:type_name -> memos.api.v2.User1, // 6: memos.api.v2.CreateUserResponse.user:type_name -> memos.api.v2.User1, // 7: memos.api.v2.UpdateUserRequest.user:type_name -> memos.api.v2.User- 19, // 8: memos.api.v2.UpdateUserRequest.update_mask:type_name -> google.protobuf.FieldMask+ 24, // 8: memos.api.v2.UpdateUserRequest.update_mask:type_name -> google.protobuf.FieldMask1, // 9: memos.api.v2.UpdateUserResponse.user:type_name -> memos.api.v2.User- 18, // 10: memos.api.v2.UserAccessToken.issued_at:type_name -> google.protobuf.Timestamp- 18, // 11: memos.api.v2.UserAccessToken.expires_at:type_name -> google.protobuf.Timestamp- 10, // 12: memos.api.v2.ListUserAccessTokensResponse.access_tokens:type_name -> memos.api.v2.UserAccessToken- 18, // 13: memos.api.v2.CreateUserAccessTokenRequest.expires_at:type_name -> google.protobuf.Timestamp- 10, // 14: memos.api.v2.CreateUserAccessTokenResponse.access_token:type_name -> memos.api.v2.UserAccessToken- 2, // 15: memos.api.v2.UserService.GetUser:input_type -> memos.api.v2.GetUserRequest- 4, // 16: memos.api.v2.UserService.CreateUser:input_type -> memos.api.v2.CreateUserRequest- 6, // 17: memos.api.v2.UserService.UpdateUser:input_type -> memos.api.v2.UpdateUserRequest- 8, // 18: memos.api.v2.UserService.DeleteUser:input_type -> memos.api.v2.DeleteUserRequest- 11, // 19: memos.api.v2.UserService.ListUserAccessTokens:input_type -> memos.api.v2.ListUserAccessTokensRequest- 13, // 20: memos.api.v2.UserService.CreateUserAccessToken:input_type -> memos.api.v2.CreateUserAccessTokenRequest- 15, // 21: memos.api.v2.UserService.DeleteUserAccessToken:input_type -> memos.api.v2.DeleteUserAccessTokenRequest- 3, // 22: memos.api.v2.UserService.GetUser:output_type -> memos.api.v2.GetUserResponse- 5, // 23: memos.api.v2.UserService.CreateUser:output_type -> memos.api.v2.CreateUserResponse- 7, // 24: memos.api.v2.UserService.UpdateUser:output_type -> memos.api.v2.UpdateUserResponse- 9, // 25: memos.api.v2.UserService.DeleteUser:output_type -> memos.api.v2.DeleteUserResponse- 12, // 26: memos.api.v2.UserService.ListUserAccessTokens:output_type -> memos.api.v2.ListUserAccessTokensResponse- 14, // 27: memos.api.v2.UserService.CreateUserAccessToken:output_type -> memos.api.v2.CreateUserAccessTokenResponse- 16, // 28: memos.api.v2.UserService.DeleteUserAccessToken:output_type -> memos.api.v2.DeleteUserAccessTokenResponse- 22, // [22:29] is the sub-list for method output_type- 15, // [15:22] is the sub-list for method input_type- 15, // [15:15] is the sub-list for extension type_name- 15, // [15:15] is the sub-list for extension extendee- 0, // [0:15] is the sub-list for field type_name+ 10, // 10: memos.api.v2.GetUserSettingsResponse.settings:type_name -> memos.api.v2.UserSetting+ 10, // 11: memos.api.v2.UpdateUserSettingsRequest.settings:type_name -> memos.api.v2.UserSetting+ 24, // 12: memos.api.v2.UpdateUserSettingsRequest.update_mask:type_name -> google.protobuf.FieldMask+ 10, // 13: memos.api.v2.UpdateUserSettingsResponse.settings:type_name -> memos.api.v2.UserSetting+ 23, // 14: memos.api.v2.UserAccessToken.issued_at:type_name -> google.protobuf.Timestamp+ 23, // 15: memos.api.v2.UserAccessToken.expires_at:type_name -> google.protobuf.Timestamp+ 15, // 16: memos.api.v2.ListUserAccessTokensResponse.access_tokens:type_name -> memos.api.v2.UserAccessToken+ 23, // 17: memos.api.v2.CreateUserAccessTokenRequest.expires_at:type_name -> google.protobuf.Timestamp+ 15, // 18: memos.api.v2.CreateUserAccessTokenResponse.access_token:type_name -> memos.api.v2.UserAccessToken+ 2, // 19: memos.api.v2.UserService.GetUser:input_type -> memos.api.v2.GetUserRequest+ 4, // 20: memos.api.v2.UserService.CreateUser:input_type -> memos.api.v2.CreateUserRequest+ 6, // 21: memos.api.v2.UserService.UpdateUser:input_type -> memos.api.v2.UpdateUserRequest+ 8, // 22: memos.api.v2.UserService.DeleteUser:input_type -> memos.api.v2.DeleteUserRequest+ 11, // 23: memos.api.v2.UserService.GetUserSettings:input_type -> memos.api.v2.GetUserSettingsRequest+ 13, // 24: memos.api.v2.UserService.UpdateUserSettings:input_type -> memos.api.v2.UpdateUserSettingsRequest+ 16, // 25: memos.api.v2.UserService.ListUserAccessTokens:input_type -> memos.api.v2.ListUserAccessTokensRequest+ 18, // 26: memos.api.v2.UserService.CreateUserAccessToken:input_type -> memos.api.v2.CreateUserAccessTokenRequest+ 20, // 27: memos.api.v2.UserService.DeleteUserAccessToken:input_type -> memos.api.v2.DeleteUserAccessTokenRequest+ 3, // 28: memos.api.v2.UserService.GetUser:output_type -> memos.api.v2.GetUserResponse+ 5, // 29: memos.api.v2.UserService.CreateUser:output_type -> memos.api.v2.CreateUserResponse+ 7, // 30: memos.api.v2.UserService.UpdateUser:output_type -> memos.api.v2.UpdateUserResponse+ 9, // 31: memos.api.v2.UserService.DeleteUser:output_type -> memos.api.v2.DeleteUserResponse+ 12, // 32: memos.api.v2.UserService.GetUserSettings:output_type -> memos.api.v2.GetUserSettingsResponse+ 14, // 33: memos.api.v2.UserService.UpdateUserSettings:output_type -> memos.api.v2.UpdateUserSettingsResponse+ 17, // 34: memos.api.v2.UserService.ListUserAccessTokens:output_type -> memos.api.v2.ListUserAccessTokensResponse+ 19, // 35: memos.api.v2.UserService.CreateUserAccessToken:output_type -> memos.api.v2.CreateUserAccessTokenResponse+ 21, // 36: memos.api.v2.UserService.DeleteUserAccessToken:output_type -> memos.api.v2.DeleteUserAccessTokenResponse+ 28, // [28:37] is the sub-list for method output_type+ 19, // [19:28] 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}func init() { file_api_v2_user_service_proto_init() }@@ -1337,7 +1688,7 @@ func file_api_v2_user_service_proto_init() {}}file_api_v2_user_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {- switch v := v.(*UserAccessToken); i {+ switch v := v.(*UserSetting); i {case 0:return &v.statecase 1:@@ -1349,7 +1700,7 @@ func file_api_v2_user_service_proto_init() {}}file_api_v2_user_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {- switch v := v.(*ListUserAccessTokensRequest); i {+ switch v := v.(*GetUserSettingsRequest); i {case 0:return &v.statecase 1:@@ -1361,7 +1712,7 @@ func file_api_v2_user_service_proto_init() {}}file_api_v2_user_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {- switch v := v.(*ListUserAccessTokensResponse); i {+ switch v := v.(*GetUserSettingsResponse); i {case 0:return &v.statecase 1:@@ -1373,7 +1724,7 @@ func file_api_v2_user_service_proto_init() {}}file_api_v2_user_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {- switch v := v.(*CreateUserAccessTokenRequest); i {+ switch v := v.(*UpdateUserSettingsRequest); i {case 0:return &v.statecase 1:@@ -1385,7 +1736,7 @@ func file_api_v2_user_service_proto_init() {}}file_api_v2_user_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {- switch v := v.(*CreateUserAccessTokenResponse); i {+ switch v := v.(*UpdateUserSettingsResponse); i {case 0:return &v.statecase 1:@@ -1397,7 +1748,7 @@ func file_api_v2_user_service_proto_init() {}}file_api_v2_user_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {- switch v := v.(*DeleteUserAccessTokenRequest); i {+ switch v := v.(*UserAccessToken); i {case 0:return &v.statecase 1:@@ -1409,6 +1760,66 @@ func file_api_v2_user_service_proto_init() {}}file_api_v2_user_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*ListUserAccessTokensRequest); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ file_api_v2_user_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*ListUserAccessTokensResponse); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ file_api_v2_user_service_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*CreateUserAccessTokenRequest); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ file_api_v2_user_service_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*CreateUserAccessTokenResponse); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ file_api_v2_user_service_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*DeleteUserAccessTokenRequest); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ file_api_v2_user_service_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {switch v := v.(*DeleteUserAccessTokenResponse); i {case 0:return &v.state@@ -1421,14 +1832,14 @@ func file_api_v2_user_service_proto_init() {}}}- file_api_v2_user_service_proto_msgTypes[12].OneofWrappers = []interface{}{}+ file_api_v2_user_service_proto_msgTypes[17].OneofWrappers = []interface{}{}type x struct{}out := protoimpl.TypeBuilder{File: protoimpl.DescBuilder{GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: file_api_v2_user_service_proto_rawDesc,NumEnums: 1,- NumMessages: 16,+ NumMessages: 21,NumExtensions: 0,NumServices: 1,},diff --git a/proto/gen/api/v2/user_service.pb.gw.go b/proto/gen/api/v2/user_service.pb.gw.goindex 665231bbe..16754fca7 100644--- a/proto/gen/api/v2/user_service.pb.gw.go+++ b/proto/gen/api/v2/user_service.pb.gw.go@@ -269,6 +269,158 @@ func local_request_UserService_DeleteUser_0(ctx context.Context, marshaler runti}+func request_UserService_GetUserSettings_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var protoReq GetUserSettingsRequest+ var metadata runtime.ServerMetadata++ var (+ val string+ ok bool+ err error+ _ = err+ )++ val, ok = pathParams["name"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")+ }++ protoReq.Name, err = runtime.String(val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)+ }++ msg, err := client.GetUserSettings(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))+ return msg, metadata, err++}++func local_request_UserService_GetUserSettings_0(ctx context.Context, marshaler runtime.Marshaler, server UserServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var protoReq GetUserSettingsRequest+ var metadata runtime.ServerMetadata++ var (+ val string+ ok bool+ err error+ _ = err+ )++ val, ok = pathParams["name"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")+ }++ protoReq.Name, err = runtime.String(val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)+ }++ msg, err := server.GetUserSettings(ctx, &protoReq)+ return msg, metadata, err++}++var (+ filter_UserService_UpdateUserSettings_0 = &utilities.DoubleArray{Encoding: map[string]int{"settings": 0, "name": 1}, Base: []int{1, 4, 5, 2, 0, 0, 0, 0}, Check: []int{0, 1, 1, 2, 4, 2, 2, 3}}+)++func request_UserService_UpdateUserSettings_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var protoReq UpdateUserSettingsRequest+ var metadata runtime.ServerMetadata++ 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.Settings); err != nil && 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.Settings); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ } else {+ protoReq.UpdateMask = fieldMask+ }+ }++ var (+ val string+ ok bool+ err error+ _ = err+ )++ val, ok = pathParams["settings.name"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "settings.name")+ }++ err = runtime.PopulateFieldFromPath(&protoReq, "settings.name", val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "settings.name", 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_UpdateUserSettings_0); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }++ msg, err := client.UpdateUserSettings(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))+ return msg, metadata, err++}++func local_request_UserService_UpdateUserSettings_0(ctx context.Context, marshaler runtime.Marshaler, server UserServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var protoReq UpdateUserSettingsRequest+ var metadata runtime.ServerMetadata++ 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.Settings); err != nil && 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.Settings); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ } else {+ protoReq.UpdateMask = fieldMask+ }+ }++ var (+ val string+ ok bool+ err error+ _ = err+ )++ val, ok = pathParams["settings.name"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "settings.name")+ }++ err = runtime.PopulateFieldFromPath(&protoReq, "settings.name", val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "settings.name", 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_UpdateUserSettings_0); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }++ msg, err := server.UpdateUserSettings(ctx, &protoReq)+ return msg, metadata, err++}+func request_UserService_ListUserAccessTokens_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {var protoReq ListUserAccessTokensRequestvar metadata runtime.ServerMetadata@@ -567,6 +719,56 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux})+ mux.Handle("GET", pattern_UserService_GetUserSettings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ var stream runtime.ServerTransportStream+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ var err error+ var annotatedContext context.Context+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.UserService/GetUserSettings", runtime.WithHTTPPathPattern("/api/v2/{name=users/*}/settings"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := local_request_UserService_GetUserSettings_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_GetUserSettings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)++ })++ mux.Handle("PATCH", pattern_UserService_UpdateUserSettings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ var stream runtime.ServerTransportStream+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ var err error+ var annotatedContext context.Context+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.UserService/UpdateUserSettings", runtime.WithHTTPPathPattern("/api/v2/{settings.name=users/*/settings}"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := local_request_UserService_UpdateUserSettings_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_UpdateUserSettings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)++ })+mux.Handle("GET", pattern_UserService_ListUserAccessTokens_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {ctx, cancel := context.WithCancel(req.Context())defer cancel()@@ -771,6 +973,50 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux})+ mux.Handle("GET", pattern_UserService_GetUserSettings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ var err error+ var annotatedContext context.Context+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.UserService/GetUserSettings", runtime.WithHTTPPathPattern("/api/v2/{name=users/*}/settings"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := request_UserService_GetUserSettings_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_GetUserSettings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)++ })++ mux.Handle("PATCH", pattern_UserService_UpdateUserSettings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ var err error+ var annotatedContext context.Context+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.UserService/UpdateUserSettings", runtime.WithHTTPPathPattern("/api/v2/{settings.name=users/*/settings}"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := request_UserService_UpdateUserSettings_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_UpdateUserSettings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)++ })+mux.Handle("GET", pattern_UserService_ListUserAccessTokens_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {ctx, cancel := context.WithCancel(req.Context())defer cancel()@@ -849,6 +1095,10 @@ var (pattern_UserService_DeleteUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v2", "users", "name"}, ""))+ pattern_UserService_GetUserSettings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v2", "users", "name", "settings"}, ""))++ pattern_UserService_UpdateUserSettings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 2, 3, 4, 3, 5, 4}, []string{"api", "v2", "users", "settings", "settings.name"}, ""))+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", "v2", "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", "v2", "users", "name", "access_tokens"}, ""))@@ -865,6 +1115,10 @@ var (forward_UserService_DeleteUser_0 = runtime.ForwardResponseMessage+ forward_UserService_GetUserSettings_0 = runtime.ForwardResponseMessage++ forward_UserService_UpdateUserSettings_0 = runtime.ForwardResponseMessage+forward_UserService_ListUserAccessTokens_0 = runtime.ForwardResponseMessageforward_UserService_CreateUserAccessToken_0 = runtime.ForwardResponseMessagediff --git a/proto/gen/api/v2/user_service_grpc.pb.go b/proto/gen/api/v2/user_service_grpc.pb.goindex 6f277ccf9..b0e077f73 100644--- a/proto/gen/api/v2/user_service_grpc.pb.go+++ b/proto/gen/api/v2/user_service_grpc.pb.go@@ -23,6 +23,8 @@ const (UserService_CreateUser_FullMethodName = "/memos.api.v2.UserService/CreateUser"UserService_UpdateUser_FullMethodName = "/memos.api.v2.UserService/UpdateUser"UserService_DeleteUser_FullMethodName = "/memos.api.v2.UserService/DeleteUser"+ UserService_GetUserSettings_FullMethodName = "/memos.api.v2.UserService/GetUserSettings"+ UserService_UpdateUserSettings_FullMethodName = "/memos.api.v2.UserService/UpdateUserSettings"UserService_ListUserAccessTokens_FullMethodName = "/memos.api.v2.UserService/ListUserAccessTokens"UserService_CreateUserAccessToken_FullMethodName = "/memos.api.v2.UserService/CreateUserAccessToken"UserService_DeleteUserAccessToken_FullMethodName = "/memos.api.v2.UserService/DeleteUserAccessToken"@@ -40,6 +42,8 @@ type UserServiceClient interface {UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UpdateUserResponse, error)// DeleteUser deletes a user.DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*DeleteUserResponse, error)+ GetUserSettings(ctx context.Context, in *GetUserSettingsRequest, opts ...grpc.CallOption) (*GetUserSettingsResponse, error)+ UpdateUserSettings(ctx context.Context, in *UpdateUserSettingsRequest, opts ...grpc.CallOption) (*UpdateUserSettingsResponse, error)// ListUserAccessTokens returns a list of access tokens for a user.ListUserAccessTokens(ctx context.Context, in *ListUserAccessTokensRequest, opts ...grpc.CallOption) (*ListUserAccessTokensResponse, error)// CreateUserAccessToken creates a new access token for a user.@@ -92,6 +96,24 @@ func (c *userServiceClient) DeleteUser(ctx context.Context, in *DeleteUserRequesreturn out, nil}+func (c *userServiceClient) GetUserSettings(ctx context.Context, in *GetUserSettingsRequest, opts ...grpc.CallOption) (*GetUserSettingsResponse, error) {+ out := new(GetUserSettingsResponse)+ err := c.cc.Invoke(ctx, UserService_GetUserSettings_FullMethodName, in, out, opts...)+ if err != nil {+ return nil, err+ }+ return out, nil+}++func (c *userServiceClient) UpdateUserSettings(ctx context.Context, in *UpdateUserSettingsRequest, opts ...grpc.CallOption) (*UpdateUserSettingsResponse, error) {+ out := new(UpdateUserSettingsResponse)+ err := c.cc.Invoke(ctx, UserService_UpdateUserSettings_FullMethodName, in, out, opts...)+ if err != nil {+ return nil, err+ }+ return out, nil+}+func (c *userServiceClient) ListUserAccessTokens(ctx context.Context, in *ListUserAccessTokensRequest, opts ...grpc.CallOption) (*ListUserAccessTokensResponse, error) {out := new(ListUserAccessTokensResponse)err := c.cc.Invoke(ctx, UserService_ListUserAccessTokens_FullMethodName, in, out, opts...)@@ -131,6 +153,8 @@ type UserServiceServer interface {UpdateUser(context.Context, *UpdateUserRequest) (*UpdateUserResponse, error)// DeleteUser deletes a user.DeleteUser(context.Context, *DeleteUserRequest) (*DeleteUserResponse, error)+ GetUserSettings(context.Context, *GetUserSettingsRequest) (*GetUserSettingsResponse, error)+ UpdateUserSettings(context.Context, *UpdateUserSettingsRequest) (*UpdateUserSettingsResponse, error)// ListUserAccessTokens returns a list of access tokens for a user.ListUserAccessTokens(context.Context, *ListUserAccessTokensRequest) (*ListUserAccessTokensResponse, error)// CreateUserAccessToken creates a new access token for a user.@@ -156,6 +180,12 @@ func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserReqfunc (UnimplementedUserServiceServer) DeleteUser(context.Context, *DeleteUserRequest) (*DeleteUserResponse, error) {return nil, status.Errorf(codes.Unimplemented, "method DeleteUser not implemented")}+func (UnimplementedUserServiceServer) GetUserSettings(context.Context, *GetUserSettingsRequest) (*GetUserSettingsResponse, error) {+ return nil, status.Errorf(codes.Unimplemented, "method GetUserSettings not implemented")+}+func (UnimplementedUserServiceServer) UpdateUserSettings(context.Context, *UpdateUserSettingsRequest) (*UpdateUserSettingsResponse, error) {+ return nil, status.Errorf(codes.Unimplemented, "method UpdateUserSettings not implemented")+}func (UnimplementedUserServiceServer) ListUserAccessTokens(context.Context, *ListUserAccessTokensRequest) (*ListUserAccessTokensResponse, error) {return nil, status.Errorf(codes.Unimplemented, "method ListUserAccessTokens not implemented")}@@ -250,6 +280,42 @@ func _UserService_DeleteUser_Handler(srv interface{}, ctx context.Context, dec freturn interceptor(ctx, in, info, handler)}+func _UserService_GetUserSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(GetUserSettingsRequest)+ if err := dec(in); err != nil {+ return nil, err+ }+ if interceptor == nil {+ return srv.(UserServiceServer).GetUserSettings(ctx, in)+ }+ info := &grpc.UnaryServerInfo{+ Server: srv,+ FullMethod: UserService_GetUserSettings_FullMethodName,+ }+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {+ return srv.(UserServiceServer).GetUserSettings(ctx, req.(*GetUserSettingsRequest))+ }+ return interceptor(ctx, in, info, handler)+}++func _UserService_UpdateUserSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(UpdateUserSettingsRequest)+ if err := dec(in); err != nil {+ return nil, err+ }+ if interceptor == nil {+ return srv.(UserServiceServer).UpdateUserSettings(ctx, in)+ }+ info := &grpc.UnaryServerInfo{+ Server: srv,+ FullMethod: UserService_UpdateUserSettings_FullMethodName,+ }+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {+ return srv.(UserServiceServer).UpdateUserSettings(ctx, req.(*UpdateUserSettingsRequest))+ }+ return interceptor(ctx, in, info, handler)+}+func _UserService_ListUserAccessTokens_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {in := new(ListUserAccessTokensRequest)if err := dec(in); err != nil {@@ -327,6 +393,14 @@ var UserService_ServiceDesc = grpc.ServiceDesc{MethodName: "DeleteUser",Handler: _UserService_DeleteUser_Handler,},+ {+ MethodName: "GetUserSettings",+ Handler: _UserService_GetUserSettings_Handler,+ },+ {+ MethodName: "UpdateUserSettings",+ Handler: _UserService_UpdateUserSettings_Handler,+ },{MethodName: "ListUserAccessTokens",Handler: _UserService_ListUserAccessTokens_Handler,diff --git a/proto/gen/store/README.md b/proto/gen/store/README.mdindex bd171c882..609ad2762 100644--- a/proto/gen/store/README.md+++ b/proto/gen/store/README.md@@ -266,6 +266,10 @@| user_id | [int32](#int32) | | || key | [UserSettingKey](#memos-store-UserSettingKey) | | || access_tokens | [AccessTokensUserSetting](#memos-store-AccessTokensUserSetting) | | |+| locale | [string](#string) | | |+| appearance | [string](#string) | | |+| memo_visibility | [string](#string) | | |+| telegram_user_id | [string](#string) | | |@@ -283,6 +287,10 @@| ---- | ------ | ----------- || USER_SETTING_KEY_UNSPECIFIED | 0 | || USER_SETTING_ACCESS_TOKENS | 1 | Access tokens for the user. |+| USER_SETTING_LOCALE | 2 | The locale of the user. |+| USER_SETTING_APPEARANCE | 3 | The appearance of the user. |+| USER_SETTING_MEMO_VISIBILITY | 4 | The visibility of the memo. |+| USER_SETTING_TELEGRAM_USER_ID | 5 | The telegram user id of the user. |diff --git a/proto/gen/store/user_setting.pb.go b/proto/gen/store/user_setting.pb.goindex c2e6419ee..4046368b7 100644--- a/proto/gen/store/user_setting.pb.go+++ b/proto/gen/store/user_setting.pb.go@@ -26,6 +26,14 @@ const (UserSettingKey_USER_SETTING_KEY_UNSPECIFIED UserSettingKey = 0// Access tokens for the user.UserSettingKey_USER_SETTING_ACCESS_TOKENS UserSettingKey = 1+ // The locale of the user.+ UserSettingKey_USER_SETTING_LOCALE UserSettingKey = 2+ // The appearance of the user.+ UserSettingKey_USER_SETTING_APPEARANCE UserSettingKey = 3+ // The visibility of the memo.+ UserSettingKey_USER_SETTING_MEMO_VISIBILITY UserSettingKey = 4+ // The telegram user id of the user.+ UserSettingKey_USER_SETTING_TELEGRAM_USER_ID UserSettingKey = 5)// Enum value maps for UserSettingKey.@@ -33,10 +41,18 @@ var (UserSettingKey_name = map[int32]string{0: "USER_SETTING_KEY_UNSPECIFIED",1: "USER_SETTING_ACCESS_TOKENS",+ 2: "USER_SETTING_LOCALE",+ 3: "USER_SETTING_APPEARANCE",+ 4: "USER_SETTING_MEMO_VISIBILITY",+ 5: "USER_SETTING_TELEGRAM_USER_ID",}UserSettingKey_value = map[string]int32{- "USER_SETTING_KEY_UNSPECIFIED": 0,- "USER_SETTING_ACCESS_TOKENS": 1,+ "USER_SETTING_KEY_UNSPECIFIED": 0,+ "USER_SETTING_ACCESS_TOKENS": 1,+ "USER_SETTING_LOCALE": 2,+ "USER_SETTING_APPEARANCE": 3,+ "USER_SETTING_MEMO_VISIBILITY": 4,+ "USER_SETTING_TELEGRAM_USER_ID": 5,})@@ -77,6 +93,10 @@ type UserSetting struct {// Types that are assignable to Value://// *UserSetting_AccessTokens+ // *UserSetting_Locale+ // *UserSetting_Appearance+ // *UserSetting_MemoVisibility+ // *UserSetting_TelegramUserIdValue isUserSetting_Value `protobuf_oneof:"value"`}@@ -140,6 +160,34 @@ func (x *UserSetting) GetAccessTokens() *AccessTokensUserSetting {return nil}+func (x *UserSetting) GetLocale() string {+ if x, ok := x.GetValue().(*UserSetting_Locale); ok {+ return x.Locale+ }+ return ""+}++func (x *UserSetting) GetAppearance() string {+ if x, ok := x.GetValue().(*UserSetting_Appearance); ok {+ return x.Appearance+ }+ return ""+}++func (x *UserSetting) GetMemoVisibility() string {+ if x, ok := x.GetValue().(*UserSetting_MemoVisibility); ok {+ return x.MemoVisibility+ }+ return ""+}++func (x *UserSetting) GetTelegramUserId() string {+ if x, ok := x.GetValue().(*UserSetting_TelegramUserId); ok {+ return x.TelegramUserId+ }+ return ""+}+type isUserSetting_Value interface {isUserSetting_Value()}@@ -148,8 +196,32 @@ type UserSetting_AccessTokens struct {AccessTokens *AccessTokensUserSetting `protobuf:"bytes,3,opt,name=access_tokens,json=accessTokens,proto3,oneof"`}+type UserSetting_Locale struct {+ Locale string `protobuf:"bytes,4,opt,name=locale,proto3,oneof"`+}++type UserSetting_Appearance struct {+ Appearance string `protobuf:"bytes,5,opt,name=appearance,proto3,oneof"`+}++type UserSetting_MemoVisibility struct {+ MemoVisibility string `protobuf:"bytes,6,opt,name=memo_visibility,json=memoVisibility,proto3,oneof"`+}++type UserSetting_TelegramUserId struct {+ TelegramUserId string `protobuf:"bytes,7,opt,name=telegram_user_id,json=telegramUserId,proto3,oneof"`+}+func (*UserSetting_AccessTokens) isUserSetting_Value() {}+func (*UserSetting_Locale) isUserSetting_Value() {}++func (*UserSetting_Appearance) isUserSetting_Value() {}++func (*UserSetting_MemoVisibility) isUserSetting_Value() {}++func (*UserSetting_TelegramUserId) isUserSetting_Value() {}+type AccessTokensUserSetting struct {state protoimpl.MessageStatesizeCache protoimpl.SizeCache@@ -260,7 +332,7 @@ var File_store_user_setting_proto protoreflect.FileDescriptorvar file_store_user_setting_proto_rawDesc = []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, 0xab, 0x01, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72,+ 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x22, 0xbe, 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,@@ -270,36 +342,53 @@ var file_store_user_setting_proto_rawDesc = []byte{0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 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, 0x48, 0x00, 0x52, 0x0c,- 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x42, 0x07, 0x0a, 0x05,- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xc4, 0x01, 0x0a, 0x17, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73,+ 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x06,+ 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06,+ 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0a, 0x61, 0x70, 0x70, 0x65, 0x61, 0x72,+ 0x61, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x61, 0x70,+ 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, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x5f,+ 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,+ 0x0e, 0x74, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 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, 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, 0x52, 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, 0x1e, 0x0a, 0x1a, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x49, 0x4e, 0x47,- 0x5f, 0x41, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x53, 0x10, 0x01,- 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, 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, 0x73, 0x74,- 0x6f, 0x72, 0x65, 0xa2, 0x02, 0x03, 0x4d, 0x53, 0x58, 0xaa, 0x02, 0x0b, 0x4d, 0x65, 0x6d, 0x6f,- 0x73, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0xca, 0x02, 0x0b, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c,- 0x53, 0x74, 0x6f, 0x72, 0x65, 0xe2, 0x02, 0x17, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x74,- 0x6f, 0x72, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea,- 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06,- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,+ 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,+ 0xcd, 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, 0x1e, 0x0a, 0x1a, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x53, 0x45, 0x54,+ 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x4f, 0x4b, 0x45,+ 0x4e, 0x53, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x53, 0x45, 0x54,+ 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x45, 0x10, 0x02, 0x12, 0x1b, 0x0a,+ 0x17, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x41, 0x50,+ 0x50, 0x45, 0x41, 0x52, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x12, 0x20, 0x0a, 0x1c, 0x55, 0x53,+ 0x45, 0x52, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x4d, 0x45, 0x4d, 0x4f, 0x5f,+ 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x10, 0x04, 0x12, 0x21, 0x0a, 0x1d,+ 0x55, 0x53, 0x45, 0x52, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x54, 0x45, 0x4c,+ 0x45, 0x47, 0x52, 0x41, 0x4d, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x49, 0x44, 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, 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, 0x73, 0x74, 0x6f,+ 0x72, 0x65, 0xa2, 0x02, 0x03, 0x4d, 0x53, 0x58, 0xaa, 0x02, 0x0b, 0x4d, 0x65, 0x6d, 0x6f, 0x73,+ 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0xca, 0x02, 0x0b, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x53,+ 0x74, 0x6f, 0x72, 0x65, 0xe2, 0x02, 0x17, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x74, 0x6f,+ 0x72, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02,+ 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70,+ 0x72, 0x6f, 0x74, 0x6f, 0x33,}var (@@ -378,6 +467,10 @@ func file_store_user_setting_proto_init() {}file_store_user_setting_proto_msgTypes[0].OneofWrappers = []interface{}{(*UserSetting_AccessTokens)(nil),+ (*UserSetting_Locale)(nil),+ (*UserSetting_Appearance)(nil),+ (*UserSetting_MemoVisibility)(nil),+ (*UserSetting_TelegramUserId)(nil),}type x struct{}out := protoimpl.TypeBuilder{diff --git a/proto/store/user_setting.proto b/proto/store/user_setting.protoindex 6d46fc986..09a55992c 100644--- a/proto/store/user_setting.proto+++ b/proto/store/user_setting.proto@@ -11,6 +11,10 @@ message UserSetting {oneof value {AccessTokensUserSetting access_tokens = 3;+ string locale = 4;+ string appearance = 5;+ string memo_visibility = 6;+ string telegram_user_id = 7;}}@@ -19,6 +23,18 @@ enum UserSettingKey {// Access tokens for the user.USER_SETTING_ACCESS_TOKENS = 1;++ // The locale of the user.+ USER_SETTING_LOCALE = 2;++ // The appearance of the user.+ USER_SETTING_APPEARANCE = 3;++ // The visibility of the memo.+ USER_SETTING_MEMO_VISIBILITY = 4;++ // The telegram user id of the user.+ USER_SETTING_TELEGRAM_USER_ID = 5;}message AccessTokensUserSetting {