Documentation ¶
Index ¶
- type Cookies
- type Headers
- type Request
- func (r *Request) Body() io.ReadCloser
- func (r *Request) File(input string) (multipart.File, *multipart.FileHeader, error)
- func (r *Request) Form() url.Values
- func (r *Request) Header() nethttp.Header
- func (r *Request) MultipartForm() *multipart.Form
- func (r *Request) PostForm() url.Values
- func (r *Request) Referer() string
- type Response
- func (r *Response) Chunked() chan []byte
- func (r *Response) Close()
- func (r *Response) EventStream() chan []byte
- func (r *Response) GetWriter() nethttp.ResponseWriter
- func (r *Response) Gzip()
- func (r *Response) Redirect(url *neturl.URL, status int)
- func (r *Response) Send()
- func (r *Response) SessionID() string
- func (r *Response) Write(bytes []byte) (int, error)
- func (r *Response) WriteText(text string)
- type Session
- func (session *Session) Redirect(url *neturl.URL)
- func (session *Session) Render(asset string)
- func (session *Session) RenderException(status int, err error)
- func (session *Session) RenderNotFound()
- func (session *Session) RenderTemplate(asset string) (string, error)
- func (session *Session) RenderWithLayout(asset string, layout string, key string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Request ¶
type Request struct { Session *Session URL *url.URL Method string Cookies map[string]*nethttp.Cookie RemoteAddr string // contains filtered or unexported fields }
func (*Request) Body ¶
func (r *Request) Body() io.ReadCloser
func (*Request) MultipartForm ¶
type Response ¶
type Response struct { Gzipped bool IsChunked bool IsEventStream bool Status int Headers Headers Cookies Cookies // contains filtered or unexported fields }
func CreateResponse ¶
func CreateResponse(session *Session, writer nethttp.ResponseWriter) *Response
func (*Response) EventStream ¶
func (*Response) GetWriter ¶
func (r *Response) GetWriter() nethttp.ResponseWriter
type Session ¶
type Session struct { Config *Config.Config Route *route.Route Request *Request Response *Response Stash map[string]interface{} SessionID string SessionData map[string]string }
func CreateSession ¶
func CreateSession(conf *Config.Config, request *nethttp.Request, writer nethttp.ResponseWriter) *Session
func (*Session) RenderException ¶
func (*Session) RenderNotFound ¶
func (session *Session) RenderNotFound()
func (*Session) RenderTemplate ¶
Click to show internal directories.
Click to hide internal directories.