69 lines
1.3 KiB
Protocol Buffer
69 lines
1.3 KiB
Protocol Buffer
syntax = "proto3";
|
|
package voucher.config;
|
|
|
|
option go_package = "voucher/internal/conf;conf";
|
|
|
|
import "google/protobuf/duration.proto";
|
|
|
|
message Bootstrap {
|
|
Server server = 1;
|
|
Logs logs = 2;
|
|
Data data = 3;
|
|
RocketMQ rocketMQ = 4;
|
|
}
|
|
|
|
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 Logs {
|
|
string business = 1;
|
|
string access = 2;
|
|
} |