rpc

package
v1.0.45 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 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 PermissionInfra

type PermissionInfra struct {
}

func NewPermissionInfra

func NewPermissionInfra() *PermissionInfra

func (*PermissionInfra) GetEnv

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

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

func (*PermissionInfra) GetPermission

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

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

func (*PermissionInfra) GetServer

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

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

func (*PermissionInfra) HasEnv

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

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

func (*PermissionInfra) HasServer

func (infra *PermissionInfra) 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