Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CORS ¶
type CORS struct { Enable bool `toml:"enable"` AllowOrigins []string `toml:"allow_origins"` AllowMethods []string `toml:"allow_methods"` AllowHeaders []string `toml:"allow_headers"` AllowCredentials bool `toml:"allow_credentials"` MaxAge int `toml:"max_age"` }
CORS 跨域请求配置参数
type Captcha ¶
type Captcha struct { Store string `toml:"store"` Length int `toml:"length"` Width int `toml:"width"` Height int `toml:"height"` RedisDB int `toml:"redis_db"` RedisPrefix string `toml:"redis_prefix"` }
Captcha 图形验证码配置参数
type Casbin ¶
type Casbin struct { Enable bool `toml:"enable"` Debug bool `toml:"debug"` Model string `toml:"model"` AutoLoad bool `toml:"auto_load"` AutoLoadInternal int `toml:"auto_load_internal"` }
Casbin casbin配置参数
type Config ¶
type Config struct { RunMode string `toml:"run_mode"` WWW string `toml:"www"` Swagger string `toml:"swagger"` Store string `toml:"store"` HTTP HTTP `toml:"http"` Menu Menu `toml:"menu"` Casbin Casbin `toml:"casbin"` Log Log `toml:"log"` LogGormHook LogGormHook `toml:"log_gorm_hook"` Root Root `toml:"root"` JWTAuth JWTAuth `toml:"jwt_auth"` Monitor Monitor `toml:"monitor"` Captcha Captcha `toml:"captcha"` RateLimiter RateLimiter `toml:"rate_limiter"` CORS CORS `toml:"cors"` Redis Redis `toml:"redis"` Gorm Gorm `toml:"gorm"` MySQL MySQL `toml:"mysql"` Postgres Postgres `toml:"postgres"` Sqlite3 Sqlite3 `toml:"sqlite3"` }
Config 配置参数
type Gorm ¶
type Gorm struct { Debug bool `toml:"debug"` DBType string `toml:"db_type"` MaxLifetime int `toml:"max_lifetime"` MaxOpenConns int `toml:"max_open_conns"` MaxIdleConns int `toml:"max_idle_conns"` TablePrefix string `toml:"table_prefix"` EnableAutoMigrate bool `toml:"enable_auto_migrate"` }
Gorm gorm配置参数
type HTTP ¶
type HTTP struct { Host string `toml:"host"` Port int `toml:"port"` CertFile string `toml:"cert_file"` KeyFile string `toml:"key_file"` ShutdownTimeout int `toml:"shutdown_timeout"` }
HTTP http配置参数
type JWTAuth ¶
type JWTAuth struct { SigningMethod string `toml:"signing_method"` SigningKey string `toml:"signing_key"` Expired int `toml:"expired"` Store string `toml:"store"` FilePath string `toml:"file_path"` RedisDB int `toml:"redis_db"` RedisPrefix string `toml:"redis_prefix"` }
JWTAuth 用户认证
type Log ¶
type Log struct { Level int `toml:"level"` Format string `toml:"format"` Output string `toml:"output"` OutputFile string `toml:"output_file"` EnableHook bool `toml:"enable_hook"` Hook string `toml:"hook"` HookMaxThread int `toml:"hook_max_thread"` HookMaxBuffer int `toml:"hook_max_buffer"` }
Log 日志配置参数
type LogGormHook ¶
type LogGormHook struct { DBType string `toml:"db_type"` MaxLifetime int `toml:"max_lifetime"` MaxOpenConns int `toml:"max_open_conns"` MaxIdleConns int `toml:"max_idle_conns"` Table string `toml:"table"` }
LogGormHook 日志gorm钩子配置
type Monitor ¶
type Monitor struct { Enable bool `toml:"enable"` Addr string `toml:"addr"` ConfigDir string `toml:"config_dir"` }
Monitor 监控配置参数
type MySQL ¶
type MySQL struct { Host string `toml:"host"` Port int `toml:"port"` User string `toml:"user"` Password string `toml:"password"` DBName string `toml:"db_name"` Parameters string `toml:"parameters"` }
MySQL mysql配置参数
type Postgres ¶
type Postgres struct { Host string `toml:"host"` Port int `toml:"port"` User string `toml:"user"` Password string `toml:"password"` DBName string `toml:"db_name"` SSLMode string `toml:"ssl_mode"` }
Postgres postgres配置参数
type RateLimiter ¶
type RateLimiter struct { Enable bool `toml:"enable"` Count int64 `toml:"count"` RedisDB int `toml:"redis_db"` }
RateLimiter 请求频率限制配置参数
Click to show internal directories.
Click to hide internal directories.