generate

package
v1.1.12 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2020 License: Apache-2.0 Imports: 11 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.Client, log logr.Logger) *Auth

NewAuth returns a new instance of Auth for operations

func (*Auth) CanICreate

func (a *Auth) CanICreate(kind, namespace string) (bool, error)

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

func (*Auth) CanIDelete

func (a *Auth) CanIDelete(kind, namespace string) (bool, error)

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

func (*Auth) CanIGet

func (a *Auth) CanIGet(kind, namespace string) (bool, error)

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

func (*Auth) CanIUpdate

func (a *Auth) CanIUpdate(kind, namespace string) (bool, error)

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

type FakeGenerate

type FakeGenerate struct {
	Generate
}

FakeGenerate provides implementation for generate rule processing with mocks/fakes for cluster interactions

func NewFakeGenerate

func NewFakeGenerate(rule kyverno.Generation) *FakeGenerate

NewFakeGenerate returns a new instance of generatecheck that uses fake/mock implementation for operation access(always returns true)

type Generate

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

Generate provides implementation to validate 'generate' rule

func NewGenerateFactory

func NewGenerateFactory(client *dclient.Client, rule kyverno.Generation, log logr.Logger) *Generate

NewGenerateFactory returns a new instance of Generate validation checker

func (*Generate) Validate

func (g *Generate) Validate() (string, error)

Validate validates the 'generate' rule

type Operations

type Operations interface {
	// CanICreate returns 'true' if self can 'create' resource
	CanICreate(kind, namespace string) (bool, error)
	// CanIUpdate returns 'true' if self can 'update' resource
	CanIUpdate(kind, namespace string) (bool, error)
	// CanIDelete returns 'true' if self can 'delete' resource
	CanIDelete(kind, namespace string) (bool, error)
	// CanIGet returns 'true' if self can 'get' resource
	CanIGet(kind, namespace 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