conf.proto 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. syntax = "proto3";
  2. package kratos.api;
  3. option go_package = "w303a/server/app/user/internal/conf;conf";
  4. import "google/protobuf/duration.proto";
  5. message Bootstrap {
  6. Server server = 1;
  7. Data data = 2;
  8. }
  9. message Server {
  10. message HTTP {
  11. string network = 1;
  12. string addr = 2;
  13. google.protobuf.Duration timeout = 3;
  14. }
  15. message GRPC {
  16. string network = 1;
  17. string addr = 2;
  18. google.protobuf.Duration timeout = 3;
  19. }
  20. message Registry {
  21. message Etcd {
  22. repeated string endpoints = 1;
  23. }
  24. Etcd etcd = 1;
  25. }
  26. message UCloud {
  27. string project_id = 1;
  28. string public_key = 2;
  29. string private_key = 3;
  30. }
  31. message Logger {
  32. string output = 1;
  33. int32 max_size = 2;
  34. int32 max_backups = 3;
  35. int32 max_age = 4;
  36. bool compress = 5;
  37. }
  38. HTTP http = 1;
  39. GRPC grpc = 2;
  40. string secret_key = 3;
  41. UCloud ucloud = 4;
  42. Registry registry = 5;
  43. Logger logger = 6;
  44. }
  45. message Data {
  46. message Database {
  47. string driver = 1;
  48. string source = 2;
  49. }
  50. message Redis {
  51. string network = 1;
  52. string addr = 2;
  53. string password = 3;
  54. int32 db = 4;
  55. google.protobuf.Duration read_timeout = 5;
  56. google.protobuf.Duration write_timeout = 6;
  57. }
  58. message Mongo {
  59. string addr = 1;
  60. string database = 2;
  61. }
  62. Database database = 1;
  63. Redis redis = 2;
  64. Mongo mongo = 3;
  65. }