Documentation ¶
Index ¶
- func Middleware(conf *config.ViperConfig) echo.MiddlewareFunc
- type AclAllows
- type Context
- func (c *Context) Acl() *db.ACL
- func (c *Context) AclAllows() AclAllows
- func (c *Context) AclFeatures() []string
- func (c *Context) AllowAdmin(code int) bool
- func (c *Context) AllowRead(code int) bool
- func (c *Context) AllowWrite(code int) bool
- func (c *Context) BadRequest(err error) error
- func (c *Context) Config() *config.ViperConfig
- func (c *Context) Download(b []byte, filename string) error
- func (c *Context) ErrLog(err error) *logrus.Entry
- func (c *Context) Log() *logrus.Entry
- func (c *Context) Node() *db.Tree
- func (c *Context) NodeEntities(tp int) ([]db.TreeBind, error)
- func (c *Context) SetAcl(a *db.ACL)
- func (c *Context) SetAclAllows(a []db.ACLAllow)
- func (c *Context) SetAclFeatures(a []string)
- func (c *Context) SetLog(l *logrus.Entry)
- func (c *Context) SetNode(n *db.Tree)
- func (c *Context) SetUser(u *db.User)
- func (c *Context) Trim(args ...*string)
- func (c *Context) User() *db.User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Middleware ¶
func Middleware(conf *config.ViperConfig) echo.MiddlewareFunc
Types ¶
type Context ¶
type Context struct { echo.Context // contains filtered or unexported fields }
func (*Context) BadRequest ¶
当请求参数不完整时,使用这个函数记录错误原因,然后返回 BadRequest 错误
func (*Context) NodeEntities ¶
通过类型查询节点(包含子节点)绑定的实体
Click to show internal directories.
Click to hide internal directories.