Documentation ¶
Index ¶
- Variables
- func PanicTrace() []byte
- type AppStruct
- func (app *AppStruct) Register(function func(*Request) *Response, path string, includeBack bool)
- func (app *AppStruct) Run(config Config)
- func (app *AppStruct) SetDebugMode(onoff bool)
- func (app *AppStruct) SetEnableConsoleLog(onoff bool)
- func (app *AppStruct) SetEnableKeepAlive(onoff bool)
- func (app *AppStruct) SetKeepAliveTimeout(timeout uint64)
- func (app *AppStruct) SetTls(pemPath string, keyPath string) error
- type Config
- type Request
- func (request *Request) ConnRead(buf []byte) (int, error)
- func (request *Request) ConnReadUntil(spliter []byte, writer io.Writer, maxSize uint64) error
- func (request *Request) ConnWrite(buf []byte) (int, error)
- func (request *Request) DecodeCookie() map[string]string
- func (request *Request) DecodeFormUrlEncoded() (map[string]string, error)
- func (request *Request) DecodeUrlParameter() map[string]string
- func (request *Request) RecvFile(storePath string, filename string, maxSize uint64) error
- func (request *Request) SendFile(response *Response, path string, filename string)
- func (request *Request) SendHeader(response *Response)
- type Response
- type UrlNode
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrBufferTooBig = errors.New("buffer too big") ErrRequirementNotSatisfied = errors.New("requirement not satisfied") )
Functions ¶
func PanicTrace ¶ added in v1.7.1
func PanicTrace() []byte
Types ¶
type AppStruct ¶ added in v1.7.1
func (*AppStruct) SetDebugMode ¶ added in v1.7.1
func (*AppStruct) SetEnableConsoleLog ¶ added in v1.7.1
func (*AppStruct) SetEnableKeepAlive ¶ added in v1.7.1
func (*AppStruct) SetKeepAliveTimeout ¶ added in v1.7.1
type Request ¶ added in v1.7.1
type Request struct { Method string Path string UrlParameter string Protocol string Host string Header map[string]string // contains filtered or unexported fields }
func (*Request) ConnReadUntil ¶ added in v1.7.1
func (*Request) DecodeCookie ¶ added in v1.7.1
func (*Request) DecodeFormUrlEncoded ¶ added in v1.7.1
func (*Request) DecodeUrlParameter ¶ added in v1.7.1
func (*Request) SendHeader ¶ added in v1.7.1
type Response ¶ added in v1.7.1
type Response struct { Protocol string Code string CodeName string Header map[string]string Body *bytes.Buffer SetCookieList []string // contains filtered or unexported fields }
func Build404DefaultResponse ¶ added in v1.7.1
func Build404DefaultResponse() *Response
func Build404Response ¶ added in v1.7.1
func Build404Response() *Response
func Build500DefaultResponse ¶ added in v1.7.1
func Build500DefaultResponse() *Response
func BuildBasicResponse ¶
func BuildBasicResponse() *Response
func BuildStaticFileResponse ¶ added in v1.7.1
Click to show internal directories.
Click to hide internal directories.