validator

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 17 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 AdmissionResponse

func DeniedResponse

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

DeniedResponse constructs a denied AdmissionResponse

Types

type MockInterStepBufferServices added in v0.11.0

type MockInterStepBufferServices struct {
	Fake *fake.FakeNumaflowV1alpha1
}

MockInterStepBufferServices implements InterStepBufferServiceInterface NOTE: This is used as a mock for testing purposes only

func (*MockInterStepBufferServices) Create added in v0.11.0

Create takes the representation of a interStepBufferService and creates it. Returns the server's representation of the interStepBufferService, and an error, if there is any.

func (*MockInterStepBufferServices) Delete added in v0.11.0

Delete takes name of the interStepBufferService and deletes it. Returns an error if one occurs.

func (*MockInterStepBufferServices) DeleteCollection added in v0.11.0

func (c *MockInterStepBufferServices) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error

DeleteCollection deletes a collection of objects.

func (*MockInterStepBufferServices) Get added in v0.11.0

Get takes name of the interStepBufferService, and returns the corresponding interStepBufferService object, and an error if there is any.

func (*MockInterStepBufferServices) List added in v0.11.0

List takes label and field selectors, and returns the list of InterStepBufferServices that match those selectors.

func (*MockInterStepBufferServices) Patch added in v0.11.0

func (c *MockInterStepBufferServices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.InterStepBufferService, err error)

Patch applies the patch and returns the patched interStepBufferService.

func (*MockInterStepBufferServices) Update added in v0.11.0

Update takes the representation of a interStepBufferService and updates it. Returns the server's representation of the interStepBufferService, and an error, if there is any.

func (*MockInterStepBufferServices) UpdateStatus added in v0.11.0

UpdateStatus was generated because the type contains a Status member. Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().

func (*MockInterStepBufferServices) Watch added in v0.11.0

Watch returns a watch.Interface that watches the requested interStepBufferServices.

type Validator

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

func GetValidator

func GetValidator(ctx context.Context, NumaClient v1alpha1.NumaflowV1alpha1Interface, kind metav1.GroupVersionKind, oldBytes []byte, newBytes []byte) (Validator, error)

GetValidator returns a Validator instance

func NewISBServiceValidator

func NewISBServiceValidator(old, new *dfv1.InterStepBufferService) Validator

func NewPipelineValidator

func NewPipelineValidator(isbClient v1alpha1.InterStepBufferServiceInterface, old, new *dfv1.Pipeline) Validator

NewPipelineValidator returns a new PipelineValidator

Jump to

Keyboard shortcuts

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