permissions

package
v1.0.32 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Enforce added in v1.0.6

func Enforce(ctx context.Context, param EnforceParam) (ok bool, err errors.CodeError)

func EnforceContext added in v1.0.6

func EnforceContext(ctx context.Context, serviceName string, fn string) (err errors.CodeError)

func Service

func Service(enforcer Enforcer) (v service.Service)

Types

type EnforceParam added in v1.0.6

type EnforceParam struct {
	UserId  service.RequestUserId `json:"userId"`
	Service string                `json:"service"`
	Fn      string                `json:"fn"`
}

type Enforcer added in v1.0.6

type Enforcer interface {
	service.Component
	Enforce(ctx context.Context, param EnforceParam) (ok bool, err errors.CodeError)
}

Jump to

Keyboard shortcuts

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