validator

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllowedResponse

func AllowedResponse() *admissionv1.AdmissionResponse

AllowedResponse constructs an allowed AdmissionResonse

func DeniedResponse

func DeniedResponse(reason string, args ...interface{}) *admissionv1.AdmissionResponse

DeniedResponse constructs a denied AdmissionResonse

Types

type Validator

type Validator interface {
	ValidateCreate(context.Context) *admissionv1.AdmissionResponse
	ValidateUpdate(context.Context) *admissionv1.AdmissionResponse
}

Validator is an interface for CRD objects

func GetValidator

func GetValidator(ctx context.Context, client kubernetes.Interface, ebClient eventbusclient.Interface,
	esClient eventsourceclient.Interface, sensorClient sensorclient.Interface,
	kind metav1.GroupVersionKind, oldBytes []byte, newBytes []byte) (Validator, error)

GetValidator returns a Validator instance

func NewEventBusValidator

func NewEventBusValidator(client kubernetes.Interface, ebClient eventbusclient.Interface,
	esClient eventsourceclient.Interface, sClient sensorclient.Interface, old, new *eventbusv1alpha1.EventBus) Validator

NewEventBusValidator returns a validator for EventBus

func NewEventSourceValidator

func NewEventSourceValidator(client kubernetes.Interface, ebClient eventbusclient.Interface,
	esClient eventsourceclient.Interface, sClient sensorclient.Interface, old, new *eventsourcev1alpha1.EventSource) Validator

NewEventSourceValidator returns a validator for EventSource

func NewSensorValidator

func NewSensorValidator(client kubernetes.Interface, ebClient eventbusclient.Interface,
	esClient eventsourceclient.Interface, sClient sensorclient.Interface, old, new *sensorv1alpha1.Sensor) Validator

NewSensorValidator returns a validator for Sensor

Jump to

Keyboard shortcuts

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