mirror of
https://github.com/aykhans/slash-e.git
synced 2025-06-14 20:07:50 +00:00
chore: update user setting key
This commit is contained in:
@ -196,8 +196,8 @@
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| access_token | [string](#string) | | |
|
||||
| description | [string](#string) | | |
|
||||
| access_token | [string](#string) | | The access token is a JWT token. Including expiration time, issuer, etc. |
|
||||
| description | [string](#string) | | A description for the access token. |
|
||||
|
||||
|
||||
|
||||
@ -214,8 +214,8 @@
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| user_id | [int32](#int32) | | |
|
||||
| key | [UserSettingKey](#slash-store-UserSettingKey) | | |
|
||||
| access_tokens_user_setting | [AccessTokensUserSetting](#slash-store-AccessTokensUserSetting) | | |
|
||||
| locale_user_setting | [LocaleUserSetting](#slash-store-LocaleUserSetting) | | |
|
||||
| access_tokens | [AccessTokensUserSetting](#slash-store-AccessTokensUserSetting) | | |
|
||||
| locale | [LocaleUserSetting](#slash-store-LocaleUserSetting) | | |
|
||||
|
||||
|
||||
|
||||
@ -245,8 +245,8 @@
|
||||
| Name | Number | Description |
|
||||
| ---- | ------ | ----------- |
|
||||
| USER_SETTING_KEY_UNSPECIFIED | 0 | |
|
||||
| USER_SETTING_ACCESS_TOKENS | 1 | |
|
||||
| USER_SETTING_LOCALE | 2 | |
|
||||
| USER_SETTING_ACCESS_TOKENS | 1 | Access tokens for the user. |
|
||||
| USER_SETTING_LOCALE | 2 | Locale for the user. |
|
||||
|
||||
|
||||
|
||||
|
@ -24,8 +24,10 @@ type UserSettingKey int32
|
||||
|
||||
const (
|
||||
UserSettingKey_USER_SETTING_KEY_UNSPECIFIED UserSettingKey = 0
|
||||
UserSettingKey_USER_SETTING_ACCESS_TOKENS UserSettingKey = 1
|
||||
UserSettingKey_USER_SETTING_LOCALE UserSettingKey = 2
|
||||
// Access tokens for the user.
|
||||
UserSettingKey_USER_SETTING_ACCESS_TOKENS UserSettingKey = 1
|
||||
// Locale for the user.
|
||||
UserSettingKey_USER_SETTING_LOCALE UserSettingKey = 2
|
||||
)
|
||||
|
||||
// Enum value maps for UserSettingKey.
|
||||
@ -127,8 +129,8 @@ type UserSetting struct {
|
||||
Key UserSettingKey `protobuf:"varint,2,opt,name=key,proto3,enum=slash.store.UserSettingKey" json:"key,omitempty"`
|
||||
// Types that are assignable to Value:
|
||||
//
|
||||
// *UserSetting_AccessTokensUserSetting
|
||||
// *UserSetting_LocaleUserSetting
|
||||
// *UserSetting_AccessTokens
|
||||
// *UserSetting_Locale
|
||||
Value isUserSetting_Value `protobuf_oneof:"value"`
|
||||
}
|
||||
|
||||
@ -185,16 +187,16 @@ func (m *UserSetting) GetValue() isUserSetting_Value {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *UserSetting) GetAccessTokensUserSetting() *AccessTokensUserSetting {
|
||||
if x, ok := x.GetValue().(*UserSetting_AccessTokensUserSetting); ok {
|
||||
return x.AccessTokensUserSetting
|
||||
func (x *UserSetting) GetAccessTokens() *AccessTokensUserSetting {
|
||||
if x, ok := x.GetValue().(*UserSetting_AccessTokens); ok {
|
||||
return x.AccessTokens
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *UserSetting) GetLocaleUserSetting() LocaleUserSetting {
|
||||
if x, ok := x.GetValue().(*UserSetting_LocaleUserSetting); ok {
|
||||
return x.LocaleUserSetting
|
||||
func (x *UserSetting) GetLocale() LocaleUserSetting {
|
||||
if x, ok := x.GetValue().(*UserSetting_Locale); ok {
|
||||
return x.Locale
|
||||
}
|
||||
return LocaleUserSetting_LOCALE_USER_SETTING_UNSPECIFIED
|
||||
}
|
||||
@ -203,17 +205,17 @@ type isUserSetting_Value interface {
|
||||
isUserSetting_Value()
|
||||
}
|
||||
|
||||
type UserSetting_AccessTokensUserSetting struct {
|
||||
AccessTokensUserSetting *AccessTokensUserSetting `protobuf:"bytes,3,opt,name=access_tokens_user_setting,json=accessTokensUserSetting,proto3,oneof"`
|
||||
type UserSetting_AccessTokens struct {
|
||||
AccessTokens *AccessTokensUserSetting `protobuf:"bytes,3,opt,name=access_tokens,json=accessTokens,proto3,oneof"`
|
||||
}
|
||||
|
||||
type UserSetting_LocaleUserSetting struct {
|
||||
LocaleUserSetting LocaleUserSetting `protobuf:"varint,4,opt,name=locale_user_setting,json=localeUserSetting,proto3,enum=slash.store.LocaleUserSetting,oneof"`
|
||||
type UserSetting_Locale struct {
|
||||
Locale LocaleUserSetting `protobuf:"varint,4,opt,name=locale,proto3,enum=slash.store.LocaleUserSetting,oneof"`
|
||||
}
|
||||
|
||||
func (*UserSetting_AccessTokensUserSetting) isUserSetting_Value() {}
|
||||
func (*UserSetting_AccessTokens) isUserSetting_Value() {}
|
||||
|
||||
func (*UserSetting_LocaleUserSetting) isUserSetting_Value() {}
|
||||
func (*UserSetting_Locale) isUserSetting_Value() {}
|
||||
|
||||
type AccessTokensUserSetting struct {
|
||||
state protoimpl.MessageState
|
||||
@ -267,7 +269,10 @@ type AccessTokensUserSetting_AccessToken struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// The access token is a JWT token.
|
||||
// Including expiration time, issuer, etc.
|
||||
AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
|
||||
// A description for the access token.
|
||||
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
|
||||
}
|
||||
|
||||
@ -322,24 +327,21 @@ var File_store_user_setting_proto protoreflect.FileDescriptor
|
||||
var 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, 0x73, 0x6c, 0x61, 0x73,
|
||||
0x68, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x22, 0x95, 0x02, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72,
|
||||
0x68, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x22, 0xe5, 0x01, 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,
|
||||
0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x55, 0x73, 0x65, 0x72,
|
||||
0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x4b, 0x65, 0x79, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
|
||||
0x63, 0x0a, 0x1a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73,
|
||||
0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 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, 0x17, 0x61, 0x63, 0x63,
|
||||
0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74,
|
||||
0x74, 0x69, 0x6e, 0x67, 0x12, 0x50, 0x0a, 0x13, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x5f, 0x75,
|
||||
0x73, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x0e, 0x32, 0x1e, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e,
|
||||
0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,
|
||||
0x67, 0x48, 0x00, 0x52, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x55, 0x73, 0x65, 0x72, 0x53,
|
||||
0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22,
|
||||
0x4b, 0x0a, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 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, 0x12, 0x38, 0x0a, 0x06,
|
||||
0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x73,
|
||||
0x6c, 0x61, 0x73, 0x68, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c,
|
||||
0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x48, 0x00, 0x52, 0x06,
|
||||
0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 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,
|
||||
@ -402,8 +404,8 @@ var file_store_user_setting_proto_goTypes = []interface{}{
|
||||
}
|
||||
var file_store_user_setting_proto_depIdxs = []int32{
|
||||
0, // 0: slash.store.UserSetting.key:type_name -> slash.store.UserSettingKey
|
||||
3, // 1: slash.store.UserSetting.access_tokens_user_setting:type_name -> slash.store.AccessTokensUserSetting
|
||||
1, // 2: slash.store.UserSetting.locale_user_setting:type_name -> slash.store.LocaleUserSetting
|
||||
3, // 1: slash.store.UserSetting.access_tokens:type_name -> slash.store.AccessTokensUserSetting
|
||||
1, // 2: slash.store.UserSetting.locale:type_name -> slash.store.LocaleUserSetting
|
||||
4, // 3: slash.store.AccessTokensUserSetting.access_tokens:type_name -> slash.store.AccessTokensUserSetting.AccessToken
|
||||
4, // [4:4] is the sub-list for method output_type
|
||||
4, // [4:4] is the sub-list for method input_type
|
||||
@ -456,8 +458,8 @@ func file_store_user_setting_proto_init() {
|
||||
}
|
||||
}
|
||||
file_store_user_setting_proto_msgTypes[0].OneofWrappers = []interface{}{
|
||||
(*UserSetting_AccessTokensUserSetting)(nil),
|
||||
(*UserSetting_LocaleUserSetting)(nil),
|
||||
(*UserSetting_AccessTokens)(nil),
|
||||
(*UserSetting_Locale)(nil),
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
|
@ -10,23 +10,26 @@ message UserSetting {
|
||||
UserSettingKey key = 2;
|
||||
|
||||
oneof value {
|
||||
AccessTokensUserSetting access_tokens_user_setting = 3;
|
||||
AccessTokensUserSetting access_tokens = 3;
|
||||
|
||||
LocaleUserSetting locale_user_setting = 4;
|
||||
LocaleUserSetting locale = 4;
|
||||
}
|
||||
}
|
||||
|
||||
enum UserSettingKey {
|
||||
USER_SETTING_KEY_UNSPECIFIED = 0;
|
||||
|
||||
// Access tokens for the user.
|
||||
USER_SETTING_ACCESS_TOKENS = 1;
|
||||
|
||||
// Locale for the user.
|
||||
USER_SETTING_LOCALE = 2;
|
||||
}
|
||||
|
||||
message AccessTokensUserSetting {
|
||||
message AccessToken {
|
||||
// The access token is a JWT token.
|
||||
// Including expiration time, issuer, etc.
|
||||
string access_token = 1;
|
||||
// A description for the access token.
|
||||
string description = 2;
|
||||
}
|
||||
repeated AccessToken access_tokens = 1;
|
||||
|
Reference in New Issue
Block a user