Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReqStorage ¶
type ReqStorage interface { Source() interface{} Get(key StorageKey) interface{} Set(key StorageKey, value string) Delete(key StorageKey) }
ReqStorage Use to set-get-delete data,and it'll be cleaned after request
type Request ¶
type Request interface { Source() interface{} // Header get from request header Header(key string) string // PostForm get value from postForm PostForm(key string) string // Query https://example.org/?a=1&a=2&b=&=3&&&&" Query(a) return 1 Query(key string) string // Path https://example.org/ex?a=1&a=2&b=&=3&&&& Path() return /ex Path() string // Url https://example.org/?a=1&a=2&b=&=3&&&& Url() return https://example.org/?a=1&a=2&b=&=3&&&& Url() string // UrlNoQuery return Url without query param UrlNoQuery() string // Method request method Method() string // Cookie get value from cookie Cookie(key string) string }
type Response ¶
type Response interface { Source() interface{} DeleteCookie(name string, path string, domain string) AddCookie(name string, value string, path string, domain string, timeout int64) SetHeader(name string, value string) AddHeader(name string, value string) SetServer(value string) Redirect(url string) Status(status int) }
type StorageKey ¶
type StorageKey string
Click to show internal directories.
Click to hide internal directories.