user_setting.proto 855 B

123456789101112131415161718192021222324252627282930313233343536373839
  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. }
  15. message UserSetting {
  16. int32 user_id = 1;
  17. UserSettingKey key = 2;
  18. oneof value {
  19. AccessTokensUserSetting access_tokens = 3;
  20. string locale = 4;
  21. string appearance = 5;
  22. string memo_visibility = 6;
  23. }
  24. }
  25. message AccessTokensUserSetting {
  26. message AccessToken {
  27. // The access token is a JWT token.
  28. // Including expiration time, issuer, etc.
  29. string access_token = 1;
  30. // A description for the access token.
  31. string description = 2;
  32. }
  33. repeated AccessToken access_tokens = 1;
  34. }