Documentation ¶
Index ¶
- type Cookie
- type CookieConfig
- type File
- type Request
- func (r *Request) All(keys ...string) map[string]string
- func (r *Request) AllFiles() (map[string]*File, error)
- func (r *Request) Cookie(key string, value ...string) (string, error)
- func (r *Request) Except(keys ...string) map[string]string
- func (r *Request) Exists(keys ...string) bool
- func (r *Request) File(key string) (*File, error)
- func (r *Request) FullUrl() string
- func (r *Request) GetHttpRequest() *http.Request
- func (r *Request) GetMethod() string
- func (r *Request) GetPath() string
- func (r *Request) Has(keys ...string) bool
- func (r *Request) Input(key string, value ...string) (string, error)
- func (r *Request) IsMethod(m string) bool
- func (r *Request) Method() string
- func (r *Request) Only(keys ...string) map[string]string
- func (r *Request) Path() string
- func (r *Request) Post(key string, value ...string) (string, error)
- func (r *Request) Query(key string, value ...string) (string, error)
- func (r *Request) Session() Session
- func (r *Request) SetSession(s Session)
- func (r *Request) Url() string
- type Response
- func (r *Response) Cookie(name interface{}, params ...interface{}) error
- func (r *Response) GetCharset() string
- func (r *Response) GetCode() int
- func (r *Response) GetContent() string
- func (r *Response) GetContentType() string
- func (r *Response) Send(w http.ResponseWriter)
- func (r *Response) SetCharset(val string)
- func (r *Response) SetCode(val int)
- func (r *Response) SetContent(val string)
- func (r *Response) SetContentType(val string)
- type Session
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cookie ¶
type Cookie struct {
Config *CookieConfig
}
type CookieConfig ¶
type CookieConfig struct { Prefix string Path string // optional Domain string // optional Expires time.Time // optional RawExpires string // for reading cookies only // MaxAge=0 means no 'Max-Age' attribute specified. // MaxAge<0 means delete cookie now, equivalently 'Max-Age: 0' // MaxAge>0 means Max-Age attribute present and given in seconds MaxAge int Secure bool HttpOnly bool Raw string Unparsed []string // Raw text of unparsed attribute-value pairs }
type File ¶
type File struct {
FileHeader *multipart.FileHeader
}
type Request ¶
type Request struct { Request *http.Request CookieHandler *Cookie // contains filtered or unexported fields }
Request HTTP request
func NewRequest ¶
NewRequest create a new HTTP request from *http.Request
func (*Request) GetHttpRequest ¶
GetHttpRequest get Current *http.Request
func (*Request) SetSession ¶
Session set the session associated with the request.
type Response ¶
type Response struct { CookieHandler *Cookie // contains filtered or unexported fields }
func (*Response) GetCharset ¶
GetContentType get the Charset on the response.
func (*Response) GetContent ¶
GetCode get the response content.
func (*Response) GetContentType ¶
GetContentType get the Content-Type on the response.
func (*Response) Send ¶
func (r *Response) Send(w http.ResponseWriter)
Send Sends HTTP headers and content.
func (*Response) SetCharset ¶
GetContentType sets the Charset on the response.
func (*Response) SetContent ¶
SetContent sets the content on the response.
func (*Response) SetContentType ¶
GetContentType sets the Content-Type on the response.
Click to show internal directories.
Click to hide internal directories.