Documentation ¶
Index ¶
- func ParseBytes(size string) (int, error)
- func ParseTimeDuration(timeout string) time.Duration
- type System
- func (sys *System) Editable(fileName string) (string, bool)
- func (sys *System) EditableFileMaxBytes() int
- func (c *System) HTTPLogSkipper(ctx echo.Context) bool
- func (sys *System) Init()
- func (sys *System) IsEnv(name string) bool
- func (sys *System) MaxRequestBodySizeBytes() int
- func (sys *System) Playable(fileName string) (string, bool)
- func (sys *System) ReloadRealIPConfig(newConfig *System, c *realip.Config)
- func (sys *System) SetRealIPParams(c *realip.Config)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseBytes ¶
func ParseTimeDuration ¶
Types ¶
type System ¶
type System struct { Env string `json:"env"` // prod/dev/test AllowIP []string `json:"allowIP"` SSLAuto bool `json:"sslAuto"` SSLEmail string `json:"sslEmail"` SSLHosts []string `json:"sslHosts"` SSLCacheDir string `json:"sslCacheDir"` SSLKeyFile string `json:"sslKeyFile"` SSLCertFile string `json:"sslCertFile"` RealIPTrustedProxies []string `json:"realIPTrustedProxies"` RealIPProxyType string `json:"realIPProxyType"` RealIPHeaders []string `json:"realIPHeaders"` EditableFileExtensions map[string]string `json:"editableFileExtensions"` EditableFileMaxSize string `json:"editableFileMaxSize"` PlayableFileExtensions map[string]string `json:"playableFileExtensions"` ErrorPages map[int]string `json:"errorPages"` CmdTimeout string `json:"cmdTimeout"` CmdTimeoutDuration time.Duration `json:"-"` ShowExpirationTime int64 `json:"showExpirationTime"` //显示过期时间:0为始终显示;大于0为距离剩余到期时间多少秒的时候显示;小于0为不显示 SessionName string `json:"sessionName"` SessionEngine string `json:"sessionEngine"` SessionConfig echo.H `json:"sessionConfig"` MaxRequestBodySize string `json:"maxRequestBodySize"` DisableAutoUpgradeDB bool `json:"disableAutoUpgradeDB"` // 是否关闭自动升级数据表结构 DisableHTTPLog bool `json:"disableHTTPLog"` // contains filtered or unexported fields }
func (*System) EditableFileMaxBytes ¶
func (*System) MaxRequestBodySizeBytes ¶
func (*System) ReloadRealIPConfig ¶
func (*System) SetRealIPParams ¶
Click to show internal directories.
Click to hide internal directories.