rpc

package
v1.0.49 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Manager = "Manager"
	Env     = "cfg_env"
	Server  = "cfg_server"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Permission added in v1.0.48

type Permission struct {
}

func NewPermission added in v1.0.48

func NewPermission() *Permission

func (*Permission) GetEnv added in v1.0.48

func (infra *Permission) GetEnv(ctx kratosx.Context) (bool, []uint32, error)

GetEnv 获取当前用户对于env的权限

func (*Permission) GetPermission added in v1.0.48

func (infra *Permission) GetPermission(ctx kratosx.Context, keyword string) (bool, []uint32, error)

GetPermission 获取当前用户,指定key的权限

func (*Permission) GetServer added in v1.0.48

func (infra *Permission) GetServer(ctx kratosx.Context) (bool, []uint32, error)

GetServer 获取当前用户是对于server的权限

func (*Permission) HasEnv added in v1.0.48

func (infra *Permission) HasEnv(ctx kratosx.Context, id uint32) bool

HasEnv 获取当前用户是否具有指定env的权限

func (*Permission) HasServer added in v1.0.48

func (infra *Permission) HasServer(ctx kratosx.Context, id uint32) bool

HasServer 获取当前用户是具有指定server的权限

Jump to

Keyboard shortcuts

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