confs.proto 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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 AppConf {
  36. ConfConf zoo = 1;
  37. string namespace = 2;
  38. uint64 id = 3;
  39. string addr = 4;
  40. string rpcAddr = 5;
  41. string profileAddr = 6;
  42. string externalAddr = 7;
  43. LogConf log = 8;
  44. string mode = 10;
  45. }
  46. message Message {
  47. string tplSubject = 1;
  48. string tplBody = 2;
  49. }
  50. // smtp 服务器配置
  51. message EmailConf {
  52. string smtp = 1;
  53. int32 port = 2;
  54. string username = 3;
  55. string password = 4;
  56. string crypto = 5;
  57. repeated Message msg= 6;
  58. }
  59. message SmsTpl {
  60. string tplCode = 1;
  61. string tplParam = 2;
  62. }
  63. message SmsConf {
  64. string type = 1;
  65. string signName = 2;
  66. string region = 3;
  67. string secretKey = 6;
  68. string accessKey = 10;
  69. repeated SmsTpl tpls= 11;
  70. }