Documentation
¶
Index ¶
- type CORSConfig
- type CaptchaConfig
- type CasbinConfig
- type Config
- type EntConfig
- type GZIPConfig
- type HTTPConfig
- type InfluxDBConfig
- type JWTAuthConfig
- type LogConfig
- type LogGormHook
- type LogHook
- type LogMongoHook
- type MenuConfig
- type MonitorConfig
- type MySQLConfig
- type PostgresConfig
- type RabbitMQConfig
- type RateLimiterConfig
- type RedisConfig
- type RootConfig
- type Sqlite3Config
- type SystemConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CORSConfig ¶
type CORSConfig struct {
Enable bool
AllowOrigins []string
AllowMethods []string
AllowHeaders []string
AllowCredentials bool
MaxAge int
}
CORS 跨域请求配置参数
type CaptchaConfig ¶
type CaptchaConfig struct {
Store string
Length int
Width int
Height int
NoiseCount int
ShowLineOptions int //
Source string
BgColor *color.RGBA //
Fonts []string //
Duration int
RedisDB int
RedisPrefix string
}
Captcha 图形验证码配置参数
type CasbinConfig ¶
Casbin casbin配置参数
type Config ¶
type Config struct {
System SystemConfig `mapstructure:"System" json:"system"`
HTTP HTTPConfig `mapstructure:"HTTP" json:"http"`
Menu MenuConfig `mapstructure:"menu" json:"menu"`
Casbin CasbinConfig `mapstructure:"Casbin" json:"casbin"`
Log LogConfig `mapstructure:"Log" json:"log"`
LogGormHook LogGormHook
LogMongoHook LogMongoHook
Root RootConfig `mapstructure:"Root" json:"root"`
JWTAuth JWTAuthConfig `mapstructure:"JWTAuth" json:"jwtAuth"`
Monitor MonitorConfig `mapstructure:"Monitor" json:"monitor"`
Captcha CaptchaConfig `mapstructure:"Captcha" json:"captcha"`
RateLimiter RateLimiterConfig `mapstructure:"RateLimiter" json:"rateLimiter"`
CORS CORSConfig `mapstructure:"CORS" json:"CORS"`
GZIP GZIPConfig `mapstructure:"GZIP" json:"GZIP"`
Redis RedisConfig `mapstructure:"Redis" json:"redis"`
Ent EntConfig `mapstructure:"Ent" json:"ent"`
MySQL MySQLConfig `mapstructure:"MySQL" json:"mysql"`
Postgres PostgresConfig `mapstructure:"Postgres" json:"postgres"`
Sqlite3 Sqlite3Config `mapstructure:"Sqlite3" json:"sqlite3"`
RabbitMQ RabbitMQConfig `mapstructure:"RabbitMQ" json:"rabbitmq"`
InfluxDB InfluxDBConfig `mapstructure:"InfluxDB" json:"influxdb"`
}
Config 配置参数
type EntConfig ¶ added in v1.0.6
type EntConfig struct {
Debug bool
DBType string
MaxLifetime int
MaxOpenConns int
MaxIdleConns int
TablePrefix string
EnableAutoMigrate bool
}
Ent 配置参数
type GZIPConfig ¶
GZIP gzip压缩
type HTTPConfig ¶
type HTTPConfig struct {
Host string
Port int
CertFile string
KeyFile string
ShutdownTimeout int
MaxContentLength int64
MaxLoggerLength int `default:"4096"`
}
HTTP http配置参数
type InfluxDBConfig ¶ added in v1.0.6
type InfluxDBConfig struct {
Schema string
Host string
Port int
Token string
Bucket string
Org string
}
Influxdb 配置参数
type JWTAuthConfig ¶
type JWTAuthConfig struct {
Enable bool
SigningMethod string
SigningKey string
Expired int
Store string
FilePath string
RedisDB int
RedisPrefix string
}
JWTAuth 用户认证
type LogConfig ¶
type LogConfig struct {
Level int
Format string
Output string
OutputFile string
EnableHook bool
HookLevels []string
Hook LogHook
HookMaxThread int
HookMaxBuffer int
}
Log 日志配置参数
type LogGormHook ¶
type LogGormHook struct {
DBType string
MaxLifetime int
MaxOpenConns int
MaxIdleConns int
Table string
}
LogGormHook 日志gorm钩子配置
type MonitorConfig ¶
Monitor 监控配置参数
type MySQLConfig ¶
type MySQLConfig struct {
Host string
Port int
User string
Password string
DBName string
Parameters string
}
MySQL mysql配置参数
type PostgresConfig ¶
type PostgresConfig struct {
Host string
Port int
User string
Password string
DBName string
SSLMode string
}
Postgres postgres配置参数
type RabbitMQConfig ¶ added in v1.0.6
RabbitMQ 配置参数
type RateLimiterConfig ¶
RateLimiter 请求频率限制配置参数
type RedisConfig ¶
Redis redis配置参数
type RootConfig ¶
type RootConfig struct {
UserName string
Password string
RealName string
FirstName string
LastName string
}
Root root用户
Click to show internal directories.
Click to hide internal directories.