Documentation ¶
Overview ¶
*
API 权限控制中间件 表达式语法参考:https://github.com/antonmedv/expr/blob/master/docs/Language-Definition.md·
Index ¶
- Constants
- type IPermFuncWrapper
- type Middleware
- func (this *Middleware) Config() core.IEntityConf
- func (this *Middleware) EntityStub() *core.EntityStub
- func (this *Middleware) HandleIn(seq uint64, version string, api string, data htypes.Map) (bool, *herrors.Error)
- func (this *Middleware) Open(gw core.IAPIGateway, ins core.IAPIMiddleware) *herrors.Error
- type Options
- type Perm
- type PermMiddleware
Constants ¶
View Source
const (
PermFile = "perms.json"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IPermFuncWrapper ¶
type Middleware ¶
type Middleware struct { core.InMiddleware // contains filtered or unexported fields }
func New ¶
func New(funcWrapper IPermFuncWrapper) *Middleware
func (*Middleware) Config ¶
func (this *Middleware) Config() core.IEntityConf
func (*Middleware) EntityStub ¶
func (this *Middleware) EntityStub() *core.EntityStub
func (*Middleware) Open ¶
func (this *Middleware) Open(gw core.IAPIGateway, ins core.IAPIMiddleware) *herrors.Error
type Options ¶ added in v1.1.0
type Options struct {
Functions IPermFuncWrapper
}
type PermMiddleware ¶
type PermMiddleware struct {
core.EntityConfBase
}
Click to show internal directories.
Click to hide internal directories.