Documentation ¶
Index ¶
- func Register(mux *mux.Router)
- type Context
- func (c *Context) Err(err Error)
- func (c *Context) GetHeader(name string) string
- func (c *Context) HTTPErr(err string, status int)
- func (c *Context) JSON(v interface{})
- func (c *Context) Method() string
- func (c *Context) OK()
- func (c *Context) SetHeader(name, value string)
- func (c *Context) Var(name string) (ret string)
- type Err
- type Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶
type Context struct { User string Admin bool Body []byte JWT *jwt.Token Status int Request *http.Request Response http.ResponseWriter }
Context is the context object shared between http handlers
Click to show internal directories.
Click to hide internal directories.