Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { App App `mapstructure:"app" json:"app" yaml:"app"` Log Log `mapstructure:"log" json:"log" yaml:"log"` Database Database `mapstructure:"database" json:"database" yaml:"database"` Jwt Jwt `mapstructure:"jwt" json:"jwt" yaml:"jwt"` Redis Redis `mapstructure:"redis" json:"redis" yaml:"redis"` Storage Storage `mapstructure:"storage" json:"storage" yaml:"storage"` }
type Database ¶
type Database struct { Driver string `mapstructure:"driver" json:"driver" yaml:"driver"` Host string `mapstructure:"host" json:"host" yaml:"host"` Port int `mapstructure:"port" json:"port" yaml:"port"` Database string `mapstructure:"database" json:"database" yaml:"database"` UserName string `mapstructure:"username" json:"username" yaml:"username"` Password string `mapstructure:"password" json:"password" yaml:"password"` Charset string `mapstructure:"charset" json:"charset" yaml:"charset"` MaxIdleConns int `mapstructure:"max_idle_conns" json:"max_idle_conns" yaml:"max_idle_conns"` MaxOpenConns int `mapstructure:"max_open_conns" json:"max_open_conns" yaml:"max_open_conns"` LogMode string `mapstructure:"log_mode" json:"log_mode" yaml:"log_mode"` EnableFileLogWriter bool `mapstructure:"enable_file_log_writer" json:"enable_file_log_writer" yaml:"enable_file_log_writer"` LogFilename string `mapstructure:"log_filename" json:"log_filename" yaml:"log_filename"` }
type Jwt ¶
type Jwt struct { Secret string `mapstructure:"secret" json:"secret" yaml:"secret"` JwtTtl int64 `mapstructure:"jwt_ttl" json:"jwt_ttl" yaml:"jwt_ttl"` // token 有效期(秒) JwtBlacklistGracePeriod int64 `mapstructure:"jwt_blacklist_grace_period" json:"jwt_blacklist_grace_period" yaml:"jwt_blacklist_grace_period"` // 黑名单宽限时间(秒) RefreshGracePeriod int64 `mapstructure:"refresh_grace_period" json:"refresh_grace_period" yaml:"refresh_grace_period"` // token 自动刷新宽限时间(秒) }
type Log ¶
type Log struct { Level string `mapstructure:"level" json:"level" yaml:"level"` RootDir string `mapstructure:"root_dir" json:"root_dir" yaml:"root_dir"` Filename string `mapstructure:"filename" json:"filename" yaml:"filename"` Format string `mapstructure:"format" json:"format" yaml:"format"` ShowLine bool `mapstructure:"show_line" json:"show_line" yaml:"show_line"` MaxBackups int `mapstructure:"max_backups" json:"max_backups" yaml:"max_backups"` MaxSize int `mapstructure:"max_size" json:"max_size" yaml:"max_size"` // MB MaxAge int `mapstructure:"max_age" json:"max_age" yaml:"max_age"` // day Compress bool `mapstructure:"compress" json:"compress" yaml:"compress"` }
Click to show internal directories.
Click to hide internal directories.