Documentation ¶
Index ¶
- Variables
- func Initialize() error
- func IsExist() bool
- func Recover() error
- func Remove() error
- func SetDefaultAddrAndTimeFormat()
- func Start(wf WebFunc)
- func StartTest(wf WebFunc)
- func ToStaticUrl(uri string) string
- type Captcha
- type Cors
- type Limit
- type Route
- type System
- type Web
- type WebBaseFunc
- type WebFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var CONFIG = Web{ FileMaxSize: 1024, SessionTimeout: 60, Cors: Cors{ AccessOrigin: "*", AccessHeaders: "Content-Type,AccessToken,X-CSRF-Token, Authorization, Token,X-Token,X-User-Id", AccessMethods: "POST,GET,OPTIONS,DELETE,PUT", AccessExposeHeaders: "Content-Length,Access-Control-Allow-Origin,Access-Control-Allow-Headers,Content-Type", AccessCredentials: "true", }, Except: Route{ Uri: "", Method: "", }, System: System{ Tls: false, Level: "debug", Addr: "127.0.0.1:8085", DbType: "mysql", TimeFormat: "2006-01-02 15:04:05", }, Limit: Limit{ Disable: true, Limit: 0, Burst: 5, }, Captcha: Captcha{ KeyLong: 4, ImgWidth: 240, ImgHeight: 80, }, }
Functions ¶
func SetDefaultAddrAndTimeFormat ¶ added in v1.2.15
func SetDefaultAddrAndTimeFormat()
SetDefaultAddrAndTimeFormat
Types ¶
type Cors ¶ added in v1.2.15
type Cors struct { AccessOrigin string `mapstructure:"access-origin" json:"burst" access-origin:"access-origin"` AccessHeaders string `mapstructure:"access-headers" json:"access-headers" yaml:"access-headers"` AccessMethods string `mapstructure:"access-methods" json:"access-methods" yaml:"access-methods"` AccessExposeHeaders string `mapstructure:"access-expose-headers" json:"access-expose-headers" yaml:"access-expose-headers"` AccessCredentials string `mapstructure:"access-credentials" json:"access-credentials" yaml:"access-credentials"` }
type System ¶ added in v1.1.2
type System struct { Tls bool `mapstructure:"tls" json:"tls" yaml:"tls"` // debug,release,test Level string `mapstructure:"level" json:"level" yaml:"level"` // debug,release,test Addr string `mapstructure:"addr" json:"addr" yaml:"addr"` StaticPrefix string `mapstructure:"static-prefix" json:"static-prefix" yaml:"static-prefix"` WebPrefix string `mapstructure:"web-prefix" json:"web-prefix" yaml:"web-prefix"` DbType string `mapstructure:"db-type" json:"db-type" yaml:"db-type"` TimeFormat string `mapstructure:"time-format" json:"time-format" yaml:"time-format"` }
type Web ¶ added in v1.1.2
type Web struct { FileMaxSize int64 `mapstructure:"file-max-size" json:"file-max-size" yaml:"file-max-siz"` SessionTimeout int64 `mapstructure:"session-timeout" json:"session-timeout" yaml:"session-timeout"` Except Route `mapstructure:"except" json:"except" yaml:"except"` System System `mapstructure:"system" json:"system" yaml:"system"` Limit Limit `mapstructure:"limit" json:"limit" yaml:"limit"` Captcha Captcha `mapstructure:"captcha" json:"captcha" yaml:"captcha"` Cors Cors `mapstructure:"cors" json:"cors" yaml:"cors"` }
type WebBaseFunc ¶ added in v1.1.2
type WebFunc ¶
type WebFunc interface { WebBaseFunc }
WebFunc - GetTestClient - GetTestLogin - AddWebStatic - AddUploadStatic - Run
Click to show internal directories.
Click to hide internal directories.