voucher/internal/conf/conf.proto

88 lines
1.6 KiB
Protocol Buffer

syntax = "proto3";
package voucher.config;
option go_package = "voucher/cpn/conf;conf";
import "google/protobuf/duration.proto";
message Bootstrap {
Server server = 1;
Logs logs = 2;
Data data = 3;
RocketMQ rocketMQ = 4;
Wechat wechat = 5;
Cmb cmb = 6;
}
message Server {
message HTTP {
string network = 1;
string addr = 2;
google.protobuf.Duration timeout = 3;
bool isOpenSwagger = 4;
bool isResponseReqHeaders = 5;
}
HTTP http = 1;
}
message Data {
message Database {
string driver = 1;
string source = 2;
int32 maxIdle = 3;
int32 maxOpen = 4;
google.protobuf.Duration maxLifetime = 5;
bool isDebug = 6;
}
message Redis {
string network = 1;
string addr = 2;
google.protobuf.Duration readTimeout = 3;
google.protobuf.Duration writeTimeout = 4;
string password = 5;
int32 poolSize = 6;
int32 minIdleConns = 7;
google.protobuf.Duration connMaxIdleTime = 8;
uint32 db = 9;
}
Database db = 1;
Redis redis = 2;
}
message RocketMQ {
string addr = 1;
string accessKey = 2;
string secretKey = 3;
string secretToken = 4;
map<string, EventMap> eventMap = 5;
}
message EventMap {
string group = 1;
string topic = 2;
int32 perCoroutineCnt = 3;
bool isOpenConsumer = 4;
}
message Wechat {
string mchID = 1;
string mchCertificateSerialNumber = 2;
}
message Cmb {
string mid = 1;
string aid = 2;
string sm2Prk = 3;
string sm2Puk = 4;
string cmbSm2Pik = 5;
string cmbSm2Puk = 6;
string keyAlias = 7;
string cmbKeyAlias = 8;
string notifyUrl = 9;
}
message Logs {
string business = 1;
string access = 2;
}