mirror of
https://github.com/aykhans/slash-e.git
synced 2025-04-24 15:13:09 +00:00
55 lines
1006 B
Protocol Buffer
55 lines
1006 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package slash.store;
|
|
|
|
option go_package = "gen/store";
|
|
|
|
message UserSetting {
|
|
int32 user_id = 1;
|
|
|
|
UserSettingKey key = 2;
|
|
|
|
oneof value {
|
|
AccessTokensUserSetting access_tokens = 3;
|
|
|
|
LocaleUserSetting locale = 4;
|
|
|
|
ColorThemeUserSetting color_theme = 5;
|
|
}
|
|
}
|
|
|
|
enum UserSettingKey {
|
|
USER_SETTING_KEY_UNSPECIFIED = 0;
|
|
// Access tokens for the user.
|
|
ACCESS_TOKENS = 1;
|
|
// Locale for the user.
|
|
LOCALE = 2;
|
|
// Color theme for the user.
|
|
COLOR_THEME = 3;
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
enum LocaleUserSetting {
|
|
LOCALE_USER_SETTING_UNSPECIFIED = 0;
|
|
EN = 1;
|
|
ZH = 2;
|
|
FR = 3;
|
|
}
|
|
|
|
enum ColorThemeUserSetting {
|
|
COLOR_THEME_USER_SETTING_UNSPECIFIED = 0;
|
|
SYSTEM = 1;
|
|
LIGHT = 2;
|
|
DARK = 3;
|
|
}
|