Documentation ¶
Index ¶
- func RawDecode(raw io.Reader, out interface{}) error
- type Api
- func (self *Api) Create(ctx IContext) []error
- func (self *Api) Delete(ctx IContext) []error
- func (self *Api) DeleteAll(ctx IContext) []error
- func (self *Api) Fill(ctx IContext, id string)
- func (self *Api) Init()
- func (self *Api) List(ctx IContext) []error
- func (self *Api) Update(ctx IContext) []error
- func (self *Api) UpdateAll(ctx IContext) []error
- func (self *Api) View(ctx IContext) []error
- func (self *Api) With(ctx IContext, dataItem interface{})
- type ApiWrapper
- func (self *ApiWrapper) Api() IApi
- func (self *ApiWrapper) Create(ctx IContext) []error
- func (self *ApiWrapper) Delete(ctx IContext) []error
- func (self *ApiWrapper) DeleteAll(ctx IContext) []error
- func (self *ApiWrapper) Fill(ctx IContext, id string)
- func (self *ApiWrapper) Init()
- func (self *ApiWrapper) List(ctx IContext) []error
- func (self *ApiWrapper) LoopWith(ctx IContext)
- func (self *ApiWrapper) Update(ctx IContext) []error
- func (self *ApiWrapper) UpdateAll(ctx IContext) []error
- func (self *ApiWrapper) View(ctx IContext) []error
- func (self *ApiWrapper) With(ctx IContext, dataItem interface{})
- type Context
- func (self *Context) AddErr(errs ...error)
- func (self *Context) Errs() []error
- func (self *Context) Handler() *Handler
- func (self *Context) Params() *urlValues
- func (self *Context) Req() *Request
- func (self *Context) SetAutoSetUserFunc(fn func())
- func (self *Context) SetHandler(handler *Handler)
- func (self *Context) SetReq(req *http.Request)
- func (self *Context) SetUser(u IUser)
- func (self *Context) Store() *store
- func (self *Context) TempData() *tempData
- func (self *Context) User() IUser
- type Data
- type Handler
- type IApi
- type IApiWrapper
- type IContext
- type IUser
- type Request
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ApiWrapper ¶
type ApiWrapper struct {
// contains filtered or unexported fields
}
func NewApiWrapper ¶
func NewApiWrapper(api IApi) *ApiWrapper
func (*ApiWrapper) Api ¶
func (self *ApiWrapper) Api() IApi
func (*ApiWrapper) Create ¶
func (self *ApiWrapper) Create(ctx IContext) []error
func (*ApiWrapper) Delete ¶
func (self *ApiWrapper) Delete(ctx IContext) []error
func (*ApiWrapper) DeleteAll ¶
func (self *ApiWrapper) DeleteAll(ctx IContext) []error
func (*ApiWrapper) Fill ¶
func (self *ApiWrapper) Fill(ctx IContext, id string)
func (*ApiWrapper) Init ¶
func (self *ApiWrapper) Init()
func (*ApiWrapper) List ¶
func (self *ApiWrapper) List(ctx IContext) []error
func (*ApiWrapper) LoopWith ¶
func (self *ApiWrapper) LoopWith(ctx IContext)
func (*ApiWrapper) Update ¶
func (self *ApiWrapper) Update(ctx IContext) []error
func (*ApiWrapper) UpdateAll ¶
func (self *ApiWrapper) UpdateAll(ctx IContext) []error
func (*ApiWrapper) View ¶
func (self *ApiWrapper) View(ctx IContext) []error
func (*ApiWrapper) With ¶
func (self *ApiWrapper) With(ctx IContext, dataItem interface{})
type Context ¶
type Context struct { AutoSetUser func() // contains filtered or unexported fields }
func (*Context) SetAutoSetUserFunc ¶
func (self *Context) SetAutoSetUserFunc(fn func())
func (*Context) SetHandler ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler() *Handler
func (*Handler) Add ¶
func (self *Handler) Add(name string, api *ApiWrapper)
func (*Handler) Api ¶
func (self *Handler) Api(val interface{}) IApiWrapper
func (*Handler) Get ¶
func (self *Handler) Get(apiName string) IApiWrapper
type IApi ¶
type IApi interface { Init() DataName() string With(ctx IContext, dataItem interface{}) Fill(ctx IContext, id string) View(ctx IContext) []error List(ctx IContext) []error Create(ctx IContext) []error Update(ctx IContext) []error Delete(ctx IContext) []error UpdateAll(ctx IContext) []error DeleteAll(ctx IContext) []error }
type IApiWrapper ¶
type IApiWrapper interface { Init() Api() IApi LoopWith(ctx IContext) With(ctx IContext, dataItem interface{}) Fill(ctx IContext, id string) View(ctx IContext) []error List(ctx IContext) []error Create(ctx IContext) []error Update(ctx IContext) []error Delete(ctx IContext) []error UpdateAll(ctx IContext) []error DeleteAll(ctx IContext) []error }
type IContext ¶
type IContext interface { User() IUser Handler() *Handler SetHandler(h *Handler) SetUser(u IUser) SetAutoSetUserFunc(func()) Store() *store SetReq(req *http.Request) Req() *Request Params() *urlValues TempData() *tempData AddErr(...error) Errs() []error }
func NewContext ¶
func NewContext() IContext
Click to show internal directories.
Click to hide internal directories.