checker

package
v1.15.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2025 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoServiceAccount = errors.New("no service account provided")

Functions

func Check

func Check(ctx context.Context, checker AuthChecker, group, version, resource, subresource, namespace string, verbs ...string) (bool, error)

Types

type AuthChecker

type AuthChecker interface {
	// Check checks if the caller can perform an operation
	Check(ctx context.Context, group, version, resource, subresource, namespace, name, verb string) (*AuthResult, error)
}

AuthChecker provides utility to check authorization

type AuthResult

type AuthResult struct {
	Allowed         bool
	Reason          string
	EvaluationError string
}

AuthResult contains authorization check result

Jump to

Keyboard shortcuts

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