conf.proto 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. syntax = "proto3";
  2. package kratos.api;
  3. option go_package = "w303a/server/app/push/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 UCloud {
  21. string project_id = 1;
  22. string public_key = 2;
  23. string private_key = 3;
  24. }
  25. message Logger {
  26. string output = 1;
  27. int32 max_size = 2;
  28. int32 max_backups = 3;
  29. int32 max_age = 4;
  30. bool compress = 5;
  31. }
  32. HTTP http = 1;
  33. GRPC grpc = 2;
  34. string secret_key = 3;
  35. UCloud ucloud = 4;
  36. Logger logger = 5;
  37. }
  38. message Data {
  39. message Database {
  40. string driver = 1;
  41. string source = 2;
  42. }
  43. message Redis {
  44. string network = 1;
  45. string addr = 2;
  46. string password = 3;
  47. int32 db = 4;
  48. google.protobuf.Duration read_timeout = 5;
  49. google.protobuf.Duration write_timeout = 6;
  50. }
  51. message Mongo {
  52. string addr = 1;
  53. string database = 2;
  54. }
  55. Database database = 1;
  56. Redis redis = 2;
  57. Mongo mongo = 3;
  58. }