permission

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2025 License: MIT Imports: 14 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

type ApiRegister struct {
	ioc.ObjectImpl
}

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

func (*ApiRegister) RegistryEndpoint

注册API接口(RPC --> REST SDK) 自己的 注册API接口 restful client: github.com/go-resty/resty/v2 http://127.0.0.1:8020/api/mcenter/v1/endpoint

type Checker

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

func GetPermissionChecker

func GetPermissionChecker() *Checker

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

func (*Checker) ValidateEndpointPermission

查询策略列表 /api/mcenter/v1/permission/check

Jump to

Keyboard shortcuts

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