Documentation ¶
Index ¶
- func InitContext() martini.Handler
- type Context
- func (context *Context) AddError(err string)
- func (context *Context) AddFieldError(field string, err string)
- func (context *Context) AddMessage(message string)
- func (context *Context) Clear()
- func (context *Context) ClearError()
- func (context *Context) ClearMessages()
- func (context *Context) Delete(key string)
- func (context *Context) FieldErrors() map[string]string
- func (context *Context) Get(key string) interface{}
- func (context *Context) HasCommonError() bool
- func (context *Context) HasError() bool
- func (context *Context) HasFieldError() bool
- func (context *Context) HasMessage() bool
- func (context *Context) HasOverallError() bool
- func (context *Context) JoinFormErrors(err binding.Errors)
- func (context *Context) OverallErrors() map[string]string
- func (context *Context) SessionClear()
- func (context *Context) SessionDelete(key string)
- func (context *Context) SessionGet(key string) interface{}
- func (context *Context) SessionSet(key string, val interface{})
- func (context *Context) Set(key string, val interface{})
- func (context *Context) SetFormErrors(err binding.Errors)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶
type Context struct { render.Render C martini.Context S sessions.Session R *http.Request W http.ResponseWriter FormErr binding.Errors Messages []string Errors []string Response map[string]interface{} Session map[string]interface{} }
Context martini context
func (*Context) AddFieldError ¶
AddFieldError martini context add field error
func (*Context) AddMessage ¶
AddMessage martini context add message
func (*Context) ClearError ¶
func (context *Context) ClearError()
ClearError martini context clear all error
func (*Context) ClearMessages ¶
func (context *Context) ClearMessages()
ClearMessages martini context clear all message
func (*Context) FieldErrors ¶
FieldErrors get FieldErrors
func (*Context) HasCommonError ¶
HasCommonError martini context check if has common error
func (*Context) HasFieldError ¶
HasFieldError check if has field error
func (*Context) HasMessage ¶
HasMessage martini context check if has message
func (*Context) HasOverallError ¶
HasOverallError check if has overall error
func (*Context) JoinFormErrors ¶
JoinFormErrors martini context init
func (*Context) OverallErrors ¶
OverallErrors get OverallErrors
func (*Context) SessionClear ¶
func (context *Context) SessionClear()
SessionClear martini context clear session
func (*Context) SessionDelete ¶
SessionDelete martini context delete session
func (*Context) SessionGet ¶
SessionGet martini context get session interface
func (*Context) SessionSet ¶
SessionSet martini context set session
func (*Context) SetFormErrors ¶
SetFormErrors martini context set form binding error