Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
LogWriter io.Writer
// Address 服务监听端口
Address string `yaml:"address" json:"address" xml:"address"`
// KeepAlive
KeepAlive bool `yaml:"keep_alive" json:"keep_alive" xml:"keep_alive"`
// AccessLogFormat http access 日志格式
AccessLogFormat string `yaml:"access_log_format" json:"access_log_format" xml:"access_log_format"`
// CORSConfig 跨域配置
CORSConfig *middleware.CORSConfig `yaml:"cors" json:"cors_config" xml:"cors_config"`
// SecureConfig 安全配置
SecureConfig *middleware.SecureConfig `yaml:"secure" json:"secure_config" xml:"secure_config"`
// RewriteRules 规则重写URL路径配置
RewriteRules map[string]string `yaml:"rewrite_rules" json:"rewrite_rules" xml:"rewrite_rules"`
// CookieDomain cookie域
CookieDomain string `yaml:"cookie_domain" json:"cookie_domain" xml:"cookie_domain"`
// StaticPrefix 静态路径前缀
StaticPrefix string `yaml:"static_prefix" json:"static_prefix" xml:"static_prefix"`
// StaticDir 静态文件目录
StaticDir string `yaml:"static_dir" json:"static_dir" xml:"static_dir"`
// BodyLimit body文件大小限制. Limit can be specified as 4x or 4xB, where x is one of the multiple from K, M, G, T or P.
BodyLimit string `yaml:"body_limit" json:"body_limit" xml:"body_limit"`
// TemplatePattern 视图模板渲染文件路径
TemplatePattern string `yaml:"template_pattern" json:"template_pattern" xml:"template_pattern"`
}
Click to show internal directories.
Click to hide internal directories.