auth

package
v1.12.5-rc.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

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

Auth provides implementation to check if caller/self/kyverno has access to perofrm operations

func NewAuth

func NewAuth(client dclient.Interface, user string, log logr.Logger) *Auth

NewAuth returns a new instance of Auth for operations

func (*Auth) CanICreate

func (a *Auth) CanICreate(ctx context.Context, gvk, namespace, subresource string) (bool, error)

CanICreate returns 'true' if self can 'create' resource

func (*Auth) CanIDelete

func (a *Auth) CanIDelete(ctx context.Context, gvk, namespace, subresource string) (bool, error)

CanIDelete returns 'true' if self can 'delete' resource

func (*Auth) CanIGet

func (a *Auth) CanIGet(ctx context.Context, gvk, namespace, subresource string) (bool, error)

CanIGet returns 'true' if self can 'get' resource

func (*Auth) CanIUpdate

func (a *Auth) CanIUpdate(ctx context.Context, gvk, namespace, subresource string) (bool, error)

CanIUpdate returns 'true' if self can 'update' resource

type Operations

type Operations interface {
	// CanICreate returns 'true' if self can 'create' resource
	CanICreate(ctx context.Context, gvk, namespace, subresource string) (bool, error)
	// CanIUpdate returns 'true' if self can 'update' resource
	CanIUpdate(ctx context.Context, gvk, namespace, subresource string) (bool, error)
	// CanIDelete returns 'true' if self can 'delete' resource
	CanIDelete(ctx context.Context, gvk, namespace, subresource string) (bool, error)
	// CanIGet returns 'true' if self can 'get' resource
	CanIGet(ctx context.Context, gvk, namespace, subresource string) (bool, error)
}

Operations provides methods to performing operations on resource

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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