checker

package
v1.11.0-rc.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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, 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