permissions

package
v1.2.80 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 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 New added in v1.2.0

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

Types

type EnforceParam

type EnforceParam struct {
	Account  authorizations.Id `json:"account" avro:"account"`
	Endpoint string            `json:"endpoint" avro:"endpoint"`
	Fn       string            `json:"fn" avro:"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