package configApp //服务基础配置 type Server struct { Appsetup appsetup `mapstructure:"appsetup" json:"appsetup" yaml:"appsetup"` Logsetup logsetup `mapstructure:"logconfig" json:"logconfig" yaml:"logconfig"` Captcha captcha `mapstructure:"captcha" json:"captcha" yaml:"captcha"` RedisPrefixStr redisPrefixStr `mapstructure:"redisprefix" json:"redisprefix" yaml:"redisprefix"` } //服务配置详情 type appsetup struct { Port int `mapstructure:"port" json:"port" yaml:"port"` Readtime int `mapstructure:"readtime" json:"readtime" yaml:"readtime"` Writetime int `mapstructure:"writetime" json:"writetime" yaml:"writetime"` AppKey string `mapstructure:"appkey" json:"appkey" yaml:"appkey"` DefaultPassword string `mapstructure:"password" json:"password" yaml:"password"` PreFix string `mapstructure:"prefix" json:"prefix" yaml:"prefix"` } //日志配置 type logsetup struct { Path string `mapstructure:"path" json:"path" yaml:"path"` } //验证码相关 type captcha struct { KeyLong int `mapstructure:"key-long" json:"keyLong" yaml:"key-long"` // 验证码长度 ImgWidth int `mapstructure:"img-width" json:"imgWidth" yaml:"img-width"` // 验证码宽度 ImgHeight int `mapstructure:"img-height" json:"imgHeight" yaml:"img-height"` // 验证码高度 } type redisPrefixStr struct { PreFix string `mapstructure:"prefix" json:"prefix" yaml:"prefix"` // redis键前缀 Alias string `mapstructure:"alias" json:"alias" yaml:"alias"` // redis键前缀 }