user_setting.proto 1023 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. syntax = "proto3";
  2. package memos.store;
  3. option go_package = "gen/store";
  4. message UserSetting {
  5. int32 user_id = 1;
  6. UserSettingKey key = 2;
  7. oneof value {
  8. AccessTokensUserSetting access_tokens = 3;
  9. string locale = 4;
  10. string appearance = 5;
  11. string memo_visibility = 6;
  12. string telegram_user_id = 7;
  13. }
  14. }
  15. enum UserSettingKey {
  16. USER_SETTING_KEY_UNSPECIFIED = 0;
  17. // Access tokens for the user.
  18. USER_SETTING_ACCESS_TOKENS = 1;
  19. // The locale of the user.
  20. USER_SETTING_LOCALE = 2;
  21. // The appearance of the user.
  22. USER_SETTING_APPEARANCE = 3;
  23. // The visibility of the memo.
  24. USER_SETTING_MEMO_VISIBILITY = 4;
  25. // The telegram user id of the user.
  26. USER_SETTING_TELEGRAM_USER_ID = 5;
  27. }
  28. message AccessTokensUserSetting {
  29. message AccessToken {
  30. // The access token is a JWT token.
  31. // Including expiration time, issuer, etc.
  32. string access_token = 1;
  33. // A description for the access token.
  34. string description = 2;
  35. }
  36. repeated AccessToken access_tokens = 1;
  37. }