permission

package
v0.0.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Action added in v0.0.10

func Action(v string) (string, string)

func Auth

func Auth(v bool) (string, bool)

func Permission

func Permission(v bool) (string, bool)

func Required

func Required(roles ...string) (string, []string)

func Resource added in v0.0.10

func Resource(v string) (string, string)

Types

type ApiRegister added in v0.0.10

type ApiRegister struct {
	ioc.ObjectImpl
	// contains filtered or unexported fields
}

func GetApiRegister added in v0.0.10

func GetApiRegister() *ApiRegister

func (*ApiRegister) Init added in v0.0.10

func (a *ApiRegister) Init() error

func (*ApiRegister) Name added in v0.0.10

func (c *ApiRegister) Name() string

func (*ApiRegister) Priority added in v0.0.10

func (i *ApiRegister) Priority() int

type Checker

type Checker struct {
	ioc.ObjectImpl
	// contains filtered or unexported fields
}

func (*Checker) Check

func (c *Checker) Check(r *restful.Request, w *restful.Response, next *restful.FilterChain)

func (*Checker) CheckPolicy

func (c *Checker) CheckPolicy(r *restful.Request, tk *token.Token, route *endpoint.RouteEntry) error

func (*Checker) CheckToken

func (c *Checker) CheckToken(r *restful.Request) (*token.Token, error)

func (*Checker) Init

func (c *Checker) Init() error

func (*Checker) Name

func (c *Checker) Name() string

func (*Checker) Priority

func (c *Checker) Priority() int

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL