Documentation ¶
Index ¶
- func Bind(path string, f AC)
- func CheckForController(ctx context.Context, acs ...AC) (pass bool, err error)
- func CheckForModel(ctx context.Context, acmap map[string]AC, action string, fields ...string) (removes []string, err error)
- func CheckForView(ctx context.Context, paths ...string) (removes []string, err error)
- func GetAll() map[string]AC
- type AC
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckForController ¶
CheckForController 接口访问的鉴权,有一个通过即可
func CheckForModel ¶
func CheckForModel(ctx context.Context, acmap map[string]AC, action string, fields ...string) (removes []string, err error)
CheckForModel 数据层的鉴权,执行全部并返需要移除的无权限的字段
func CheckForView ¶
CheckForView 视图访问的鉴权,执行全部并返回需要移除的无权限的路径
Types ¶
Click to show internal directories.
Click to hide internal directories.