user_setting.proto 1.1 KB

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