Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCtrlFunc ¶
func GetCtrlFunc(ctrl Controller) func() Controller
GetCtrlFunc returns a new copy of the contoller everytime the function is called
Types ¶
type BaseController ¶
BaseController implements the Controller interface, It is recommended all user defined Controllers should embed *BaseController.
func (*BaseController) HTML ¶
func (b *BaseController) HTML(code int)
HTML renders text/html with the given code as status code
func (*BaseController) JSON ¶
func (b *BaseController) JSON(code int)
JSON renders application/json with the given code
func (*BaseController) New ¶
func (b *BaseController) New(ctx *base.Context)
New sets ctx as the active context
func (*BaseController) Render ¶
func (b *BaseController) Render() error
Render commits the changes made in the active context.
func (*BaseController) RenderJSON ¶
func (b *BaseController) RenderJSON(value interface{}, code int)
RenderJSON encodes value into json and renders the response as JSON
func (*BaseController) String ¶
func (b *BaseController) String(code int)
String renders text/plain with given code as status code
type Controller ¶
Controller is an interface for utron controllers
Click to show internal directories.
Click to hide internal directories.