permissions

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrForbidden = errors.Forbidden("forbidden")
)

Functions

func Enforce

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

func EnforceContext

func EnforceContext(ctx context.Context) (err error)

func Service

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

Types

type EnforceParam

type EnforceParam struct {
	Account  authorizations.Id `json:"account"`
	Endpoint []byte            `json:"endpoint"`
	Fn       []byte            `json:"fn"`
}

type Enforcer

type Enforcer interface {
	services.Component
	Enforce(ctx context.Context, param EnforceParam) (ok bool, err error)
}

Jump to

Keyboard shortcuts

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