user_setting.proto 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. ACCESS_TOKENS = 1;
  8. // The locale of the user.
  9. LOCALE = 2;
  10. // The appearance of the user.
  11. APPEARANCE = 3;
  12. // The visibility of the memo.
  13. MEMO_VISIBILITY = 4;
  14. // The shortcuts of the user.
  15. SHORTCUTS = 5;
  16. }
  17. message UserSetting {
  18. int32 user_id = 1;
  19. UserSettingKey key = 2;
  20. oneof value {
  21. AccessTokensUserSetting access_tokens = 3;
  22. string locale = 4;
  23. string appearance = 5;
  24. string memo_visibility = 6;
  25. ShortcutsUserSetting shortcuts = 7;
  26. }
  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. }
  38. message ShortcutsUserSetting {
  39. message Shortcut {
  40. string id = 1;
  41. string title = 2;
  42. string filter = 3;
  43. }
  44. repeated Shortcut shortcuts = 1;
  45. }