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 Cross-domain request configuration parameters
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 - Graphic verification code configuration parameter
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 configuration parameters
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"` I18n i18n `toml:"i18n"` Permission Permission `toml:"permission"` 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 parameters
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 configuration parameters
type HTTP ¶
type HTTP struct { Host string `toml:"host"` Port int `toml:"port"` ShutdownTimeout int `toml:"shutdown_timeout"` }
HTTP configuration parameters
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 User Authentication
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 configuration parameters
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"` }
Log Gorm Hook configuration
type Monitor ¶
type Monitor struct { Enable bool `toml:"enable"` Addr string `toml:"addr"` ConfigDir string `toml:"config_dir"` }
Monitor configuration parameters
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 configuration parameters
type Permission ¶
Permission configuration parameters
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 Configuration parameter
type RateLimiter ¶
type RateLimiter struct { Enable bool `toml:"enable"` Count int64 `toml:"count"` RedisDB int `toml:"redis_db"` }
RateLimiter - Request frequency limit configuration parameter
Click to show internal directories.
Click to hide internal directories.