confs.proto 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. syntax = "proto3";
  2. package protos;
  3. option go_package = ".;protos";
  4. //import "structs.proto";
  5. // 项目中配置文件定义
  6. message LogConf {
  7. string path = 1;
  8. string level = 2;
  9. }
  10. // zookeeper/etcd 连接配置
  11. message ConfConf {
  12. repeated string addrs = 1;
  13. string username = 2;
  14. string password = 3;
  15. int32 timeout = 4;
  16. }
  17. // redis 连接配置
  18. message RedisConf {
  19. repeated string addrs = 1;
  20. string password = 2;
  21. int32 db = 3;
  22. }
  23. // nats(-streaming) 连接配置
  24. message NatsConf {
  25. repeated string addrs = 1;
  26. string username = 2;
  27. string password = 3;
  28. string clusterId = 4;
  29. }
  30. // zk 中 login 配置
  31. message LoginConfConf {
  32. repeated string addrs = 1;
  33. string password = 2;
  34. }
  35. message AppConfConf {
  36. string namespace = 1;
  37. uint64 id = 2;
  38. string addr = 3;
  39. string rpcAddr = 5;
  40. string externalAddr = 6;
  41. int32 offline = 7;
  42. }
  43. message AppConf {
  44. ConfConf zoo = 1;
  45. string namespace = 2;
  46. uint64 id = 3;
  47. string addr = 4;
  48. string rpcAddr = 5;
  49. string profileAddr = 6;
  50. string externalAddr = 7;
  51. LogConf log = 8;
  52. string mode = 10;
  53. }
  54. message Message {
  55. string tplSubject = 1;
  56. string tplBody = 2;
  57. }
  58. // smtp 服务器配置
  59. message EmailConf {
  60. string smtp = 1;
  61. int32 port = 2;
  62. string username = 3;
  63. string password = 4;
  64. string crypto = 5;
  65. repeated Message msg= 6;
  66. }
  67. message SmsTpl {
  68. string tplCode = 1;
  69. string tplParam = 2;
  70. }
  71. message SmsConf {
  72. string type = 1;
  73. string signName = 2;
  74. string region = 3;
  75. string secretKey = 6;
  76. string accessKey = 10;
  77. repeated SmsTpl tpls= 11;
  78. }