// Copyright 2019 github.com. All rights reserved. // Use of this source code is governed by github.com. package config type LogConfig struct { Path string Level string MaxSize int MaxBackups int MaxAge int Stacktrace bool } type JwtConfig struct { Secret string // 密钥 Issuer string // 发行人 Seconds int64 // 过期秒数 } 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 GatewayConfig struct { AppKey string AppSecret string ServiceName string ServiceIp string ServicePort int MysqlDb string RedisDb int LogLevel string LogStacktrace bool } 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 RPCConfig struct { Keepalive KeepaliveConfig SmartAuth RPCNode SmartAlarm RPCNode } type OssConfig struct { Protocol string UseSsl bool Endpoint string Id string Key string StaffBucket string } type Configure struct { // 基础配置 K8s bool RunMode string Log LogConfig //Jwt JwtConfig // 按需配置 Mysql MysqlConfig Redis RedisConfig //Elastic ElasticConfig // 所要启用的服务 AccessControlMonitor GatewayConfig Rpc RPCConfig Oss OssConfig }