Documentation
¶
Index ¶
- Constants
- Variables
- func Action(v string) (string, string)
- func Audit(v bool) (string, bool)
- func Auth(v bool) (string, bool)
- func GetCheckerPriority() int
- func Permission(v bool) (string, bool)
- func Required(roles ...string) (string, []string)
- func Resource(v string) (string, string)
- type ApiRegister
- type Checker
- func (c *Checker) Check(r *restful.Request, w *restful.Response, next *restful.FilterChain)
- func (c *Checker) CheckPolicy(r *restful.Request, tk *token.Token, route *endpoint.RouteEntry) error
- func (c *Checker) CheckToken(r *restful.Request) (*token.Token, error)
- func (c *Checker) Init() error
- func (c *Checker) Name() string
- func (c *Checker) Priority() int
- type MetaData
Constants ¶
View Source
const (
CHECKER_APP_NAME = "permission"
)
Variables ¶
View Source
var (
)
Functions ¶
func GetCheckerPriority ¶
func GetCheckerPriority() int
func Permission ¶
Types ¶
type ApiRegister ¶
type ApiRegister struct {
ioc.ObjectImpl
// contains filtered or unexported fields
}
func GetApiRegister ¶
func GetApiRegister() *ApiRegister
func (*ApiRegister) Init ¶
func (a *ApiRegister) Init() error
func (*ApiRegister) Name ¶
func (c *ApiRegister) Name() string
func (*ApiRegister) Priority ¶
func (i *ApiRegister) Priority() int
type Checker ¶
type Checker struct {
ioc.ObjectImpl
// contains filtered or unexported fields
}
func (*Checker) CheckPolicy ¶
Click to show internal directories.
Click to hide internal directories.