namespace

package
v0.0.0-...-f86f1ce Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Evaluator

type Evaluator struct {
	// contains filtered or unexported fields
}

Evaluator evaluator for the namespace

func New

func New(namespaceKind string, factory EvaluatorFactory) *Evaluator

New returns permission evaluator for which support namespace

func (*Evaluator) HasPermission

func (e *Evaluator) HasPermission(ctx context.Context, resource types.Resource, action types.Action) bool

HasPermission returns true when user has action permission for the resource

type EvaluatorFactory

type EvaluatorFactory func(context.Context, types.Namespace) evaluator.Evaluator

EvaluatorFactory returns the evaluator.Evaluator of the namespace

Jump to

Keyboard shortcuts

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