access

package
v0.0.0-...-4d495be Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NewNoopAccessChecker = func() (Checker, error) {
	return &noopAccessChecker{}, nil
}

NewNoopAccessChecker serves as a no-op access checker.

Functions

This section is empty.

Types

type Checker

type Checker interface {
	CheckAccess(ctx context.Context, input *Input) (*Output, error)
}

Checker serves as an access checker interface.

type Input

type Input struct {
	UserRoles models.Roles
	Resources []*models.Resource
}

type Output

type Output struct {
	Allow            bool
	DenyError        error
	AllowWithFilters models.AccessDataFilters
}

func (*Output) Denied

func (o *Output) Denied() bool

func (*Output) Deny

func (o *Output) Deny(err error) *Output

Jump to

Keyboard shortcuts

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