Documentation ¶
Index ¶
Constants ¶
View Source
const ( // 基本设置 AppName = "ginger" AppVersion = "v1.0.0" DefaultEnv = gin.DebugMode // 环境变量未设置时的默认值,默认使用开发环境配置 // jwt编码时的私钥字符串 TokenPrivateKey = "gingeradmin" // oauth2 Key and Secret // 微信 WechatSignSwitch = true WechatOAuth2AppKey = "" WechatOAuth2AppSecret = "" )
常量级参数配置项,编译前设置值
Variables ¶
Functions ¶
Types ¶
type Cors ¶
type Cors struct { AllowHeaders []string `yaml:"AllowHeaders"` AllowCredentials bool `yaml:"AllowCredentials"` ExposeHeaders []string `yaml:"ExposeHeaders"` MaxAge int `yaml:"MaxAge"` AllowAllOrigins bool `yaml:"AllowAllOrigins"` AllowOrigins []string `yaml:"AllowOrigins"` AllowMethods []string `yaml:"AllowMethods"` }
Cors配置
type Log ¶
type Log struct { LogDir string `yaml:"logDir"` LogMaxDayCount int `yaml:"maxDayCount"` LogMongoHookSwitch bool `yaml:"logMongoHookSwitch"` LogMongoCollection string `yaml:"logMongoCol"` LogMongoExpireAfterSeconds int `yaml:"logMongoExpire"` WithRotationTime int `yaml:"withRotationTime"` }
日志配置
type Mongodb ¶
type Mongodb struct { DbHosts []string `yaml:"dbHosts"` DbPorts []int `yaml:"dbPorts"` DbUser string `yaml:"dbUser"` DbPasswd string `yaml:"dbPasswd"` DbName string `yaml:"dbName"` }
MongoDB 配置
type Mysql ¶
type Mysql struct { DbHost string `yaml:"dbHost"` DbPort int64 `yaml:"dbPort"` DbUser string `yaml:"dbUser"` DbPasswd string `yaml:"dbPasswd"` DbName string `yaml:"dbName"` ConnMaxLifetime int64 `yaml:"connMaxLifetime"` MaxIdleConns int64 `yaml:"maxIdleConns"` MaxOpenConns int64 `yaml:"maxOpenConns"` ChartSet string `yaml:"charset"` AllowCleartextPasswords bool `yaml:"allowCleartextPasswords"` InterpolateParams bool `yaml:"interpolateParams"` Timeout int64 `yaml:"timeout"` ReadTimeout int64 `yaml:"readTimeout"` ParseTime bool `yaml:"parseTime"` PING bool `yaml:"ping"` }
MysqlDB 配置
type NatsMq ¶
type NatsMq struct { Switch bool `yaml:"switch"` NatsServers []NatsServer `yaml:"natsServer"` }
Nats Mq 消息系统
type NatsServer ¶
type NatsServer struct { Host string `yaml:"host"` Port int `yaml:"port"` AuthSwitch bool `yaml:"authSwitch"` UserName string `yaml:"userName"` Password string `yaml:"password"` }
可配集群
Click to show internal directories.
Click to hide internal directories.