123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151 |
- // Copyright 2019 getensh.com. All rights reserved.
- // Use of this source code is governed by getensh.com.
- package config
- type LogConfig struct {
- Path string
- Level string
- MaxSize int
- MaxBackups int
- MaxAge int
- Stacktrace bool
- }
- type MysqlConfig struct {
- User string
- Password string
- Addr string
- DB string
- Charset string
- MaxIdle int
- MaxConn int
- LogMode bool
- }
- type RedisConfig struct {
- Addrs []string
- Password string
- DB int
- PoolSize int
- MinIdleConns int
- MaxRetries int
- Cluster bool
- }
- type ElasticConfig struct {
- Addrs []string
- Sniff bool
- }
- type ThirdPartNode struct {
- Host string
- AppKey string
- AppSecret string
- }
- type AliPartNode struct {
- AesKey string
- }
- type WxNode struct {
- AppletAppId string
- AppletAppSecret string
- AppletNotifyUrl string
- AppletMchId string
- AppletAppKey string
- PublicAppId string
- PublicAppSecret string
- MerchantMchID string
- MerchantMchCertificateSerialNumber string
- MerchantMchAPIv3Key string
- MerchantMchPrivateKey string
- }
- type ThirdPartyConfig struct {
- Ali AliPartNode
- Wx WxNode
- }
- type RPCNode struct {
- ServiceName string
- ServicePort int
- ServiceIp string
- MysqlDb string
- RedisDb int
- LogLevel string
- LogStacktrace bool
- }
- type KeepaliveConfig struct {
- ClientTime int
- ClientTimeout int
- ServerTime int
- ServerTimeout int
- ServerMiniTime int
- }
- type OssConfig struct {
- Protocol string
- Endpoint string
- Id string
- Key string
- PropertyCompanyBucket string
- BusinessAuthorizationLetterTempUrl string
- BankTempUrl string
- ProvinceTempUrl string
- }
- type Coupon struct {
- Url string
- Action string
- ExpireDate string
- }
- type RPCConfig struct {
- Prefix string
- Keepalive KeepaliveConfig
- Company RPCNode
- Garden RPCNode
- Common RPCNode
- System RPCNode
- PropertyLog RPCNode
- Thirdparty RPCNode
- }
- type GatewayConfig struct {
- AppKey string
- AppSecret string
- ServiceName string
- ServiceIp string
- ServicePort int
- MysqlDb string
- RedisDb int
- LogLevel string
- LogStacktrace bool
- }
- type JwtConfig struct {
- Secret string // 密钥
- Issuer string // 发行人
- Seconds int64 // 过期秒数
- }
- type Configure struct {
- // 基础配置
- K8s bool
- EtcdAddrs []string
- RunMode string
- Log LogConfig
- // 按需配置
- Mysql MysqlConfig
- Redis RedisConfig
- Elastic ElasticConfig
- ThirdParty ThirdPartyConfig
- Oss OssConfig
- Jwt JwtConfig
- // 所要启用的服务
- Rpc RPCConfig
- PropertyCompanyGateway GatewayConfig
- }
|