Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthConfig ¶
type AuthConfig struct {
RefreshTokenTtl int `mapstructure:"refresh_token_ttl"`
AccessTokenTtl int `mapstructure:"access_token_ttl"`
HmacSecret string `mapstructure:"hmac_secret"`
}
AuthConfig 认证配置(Admin 和 Api 共用字段)
type CorsConfig ¶
type CorsConfig struct {
AllowOrigins []string `mapstructure:"allow_origins"`
AllowMethods []string `mapstructure:"allow_methods"`
AllowHeaders []string `mapstructure:"allow_headers"`
AllowCredentials bool `mapstructure:"allow_credentials"`
}
CorsConfig 跨域配置
type FileLogConfig ¶
type FileLogConfig struct {
Path string `mapstructure:"path"`
Filename string `mapstructure:"filename"`
MaxSize int `mapstructure:"max_size"`
MaxAge int `mapstructure:"max_age"`
MaxBackups int `mapstructure:"max_backups"`
Compress bool `mapstructure:"compress"`
LocalTime bool `mapstructure:"local_time"`
}
FileLogConfig 文件日志配置
type LoggerConfig ¶
type LoggerConfig struct {
Level string `mapstructure:"level"`
Writers []string `mapstructure:"writers"`
File FileLogConfig `mapstructure:"file"`
}
LoggerConfig 日志配置
type MongoDBConfig ¶
type MongoDBConfig struct {
URI string `mapstructure:"uri"`
Database string `mapstructure:"database"`
Enabled bool `mapstructure:"enabled"`
}
MongoDBConfig MongoDB配置
type MySQLConfig ¶
MySQLConfig MySQL配置
type RedisConfig ¶
type RedisConfig struct {
Host string `mapstructure:"host"`
Port int `mapstructure:"port"`
Password string `mapstructure:"password"`
DB int `mapstructure:"db"`
}
RedisConfig Redis配置
type ServerConfig ¶
ServerConfig 服务配置
Click to show internal directories.
Click to hide internal directories.