Documentation
¶
Index ¶
Constants ¶
View Source
const ConfigKey = "gin"
ConfigKey for this repo
Variables ¶
View Source
var Factory *tao.BaseFactory[*gin.Engine]
Factory is the global factory instance for managing gin.Engine
View Source
var G = &Config{}
G is the global config instance for tao-gin
Functions ¶
Types ¶
type Config ¶ added in v0.0.3
type Config struct {
tao.BaseMultiConfig[InstanceConfig]
RunAfters []string `json:"run_after,omitempty" yaml:"run_after,omitempty"`
}
Config 总配置,实现 tao.MultiConfig 接口
type InstanceConfig ¶ added in v0.2.0
type InstanceConfig struct {
Schema string `json:"schema"`
Host string `json:"host"`
Port int `json:"port"`
Listen string `json:"listen"`
Mode string `json:"mode"`
TrustProxies []string `json:"trust_proxies"`
HTMLPattern string `json:"html_pattern"`
StaticPath string `json:"static_path"`
Pprof *Pprof `json:"pprof"`
Writer string `json:"writer"`
}
InstanceConfig 单实例配置
Click to show internal directories.
Click to hide internal directories.