validator

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 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

type MockInterStepBufferServices struct {
	Fake *fake.FakeNumaflowV1alpha1
}

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

func (*MockInterStepBufferServices) Create

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

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

func (*MockInterStepBufferServices) DeleteCollection

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

DeleteCollection deletes a collection of objects.

func (*MockInterStepBufferServices) Get

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

func (*MockInterStepBufferServices) List

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

func (*MockInterStepBufferServices) Patch

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

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

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

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