Documentation ¶
Overview ¶
Package webhook is a generated GoMock package.
Package webhook is a generated GoMock package.
Index ¶
- func ContextGetAdmissionRequest(ctx context.Context) *admission.Request
- func ContextWithAdmissionRequest(ctx context.Context, req admission.Request) context.Context
- func MutatingWebhookForMutator(mutator Mutator) *admission.Webhook
- func ValidatingWebhookForValidator(validator Validator) *admission.Webhook
- type MockMutator
- func (m *MockMutator) EXPECT() *MockMutatorMockRecorder
- func (m *MockMutator) MutateCreate(arg0 context.Context, arg1 runtime.Object) (runtime.Object, error)
- func (m *MockMutator) MutateUpdate(arg0 context.Context, arg1, arg2 runtime.Object) (runtime.Object, error)
- func (m *MockMutator) Prototype(arg0 admission.Request) (runtime.Object, error)
- type MockMutatorMockRecorder
- type MockValidator
- func (m *MockValidator) EXPECT() *MockValidatorMockRecorder
- func (m *MockValidator) Prototype(arg0 admission.Request) (runtime.Object, error)
- func (m *MockValidator) ValidateCreate(arg0 context.Context, arg1 runtime.Object) error
- func (m *MockValidator) ValidateDelete(arg0 context.Context, arg1 runtime.Object) error
- func (m *MockValidator) ValidateUpdate(arg0 context.Context, arg1, arg2 runtime.Object) error
- type MockValidatorMockRecorder
- func (mr *MockValidatorMockRecorder) Prototype(arg0 interface{}) *gomock.Call
- func (mr *MockValidatorMockRecorder) ValidateCreate(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockValidatorMockRecorder) ValidateDelete(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockValidatorMockRecorder) ValidateUpdate(arg0, arg1, arg2 interface{}) *gomock.Call
- type Mutator
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MutatingWebhookForMutator ¶
MutatingWebhookForMutator creates a new mutating Webhook.
func ValidatingWebhookForValidator ¶
ValidatingWebhookForValidator creates a new validating Webhook.
Types ¶
type MockMutator ¶
type MockMutator struct {
// contains filtered or unexported fields
}
MockMutator is a mock of Mutator interface.
func NewMockMutator ¶
func NewMockMutator(ctrl *gomock.Controller) *MockMutator
NewMockMutator creates a new mock instance.
func (*MockMutator) EXPECT ¶
func (m *MockMutator) EXPECT() *MockMutatorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockMutator) MutateCreate ¶
func (m *MockMutator) MutateCreate(arg0 context.Context, arg1 runtime.Object) (runtime.Object, error)
MutateCreate mocks base method.
func (*MockMutator) MutateUpdate ¶
func (m *MockMutator) MutateUpdate(arg0 context.Context, arg1, arg2 runtime.Object) (runtime.Object, error)
MutateUpdate mocks base method.
type MockMutatorMockRecorder ¶
type MockMutatorMockRecorder struct {
// contains filtered or unexported fields
}
MockMutatorMockRecorder is the mock recorder for MockMutator.
func (*MockMutatorMockRecorder) MutateCreate ¶
func (mr *MockMutatorMockRecorder) MutateCreate(arg0, arg1 interface{}) *gomock.Call
MutateCreate indicates an expected call of MutateCreate.
func (*MockMutatorMockRecorder) MutateUpdate ¶
func (mr *MockMutatorMockRecorder) MutateUpdate(arg0, arg1, arg2 interface{}) *gomock.Call
MutateUpdate indicates an expected call of MutateUpdate.
func (*MockMutatorMockRecorder) Prototype ¶
func (mr *MockMutatorMockRecorder) Prototype(arg0 interface{}) *gomock.Call
Prototype indicates an expected call of Prototype.
type MockValidator ¶
type MockValidator struct {
// contains filtered or unexported fields
}
MockValidator is a mock of Validator interface.
func NewMockValidator ¶
func NewMockValidator(ctrl *gomock.Controller) *MockValidator
NewMockValidator creates a new mock instance.
func (*MockValidator) EXPECT ¶
func (m *MockValidator) EXPECT() *MockValidatorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockValidator) ValidateCreate ¶
ValidateCreate mocks base method.
func (*MockValidator) ValidateDelete ¶
ValidateDelete mocks base method.
func (*MockValidator) ValidateUpdate ¶
ValidateUpdate mocks base method.
type MockValidatorMockRecorder ¶
type MockValidatorMockRecorder struct {
// contains filtered or unexported fields
}
MockValidatorMockRecorder is the mock recorder for MockValidator.
func (*MockValidatorMockRecorder) Prototype ¶
func (mr *MockValidatorMockRecorder) Prototype(arg0 interface{}) *gomock.Call
Prototype indicates an expected call of Prototype.
func (*MockValidatorMockRecorder) ValidateCreate ¶
func (mr *MockValidatorMockRecorder) ValidateCreate(arg0, arg1 interface{}) *gomock.Call
ValidateCreate indicates an expected call of ValidateCreate.
func (*MockValidatorMockRecorder) ValidateDelete ¶
func (mr *MockValidatorMockRecorder) ValidateDelete(arg0, arg1 interface{}) *gomock.Call
ValidateDelete indicates an expected call of ValidateDelete.
func (*MockValidatorMockRecorder) ValidateUpdate ¶
func (mr *MockValidatorMockRecorder) ValidateUpdate(arg0, arg1, arg2 interface{}) *gomock.Call
ValidateUpdate indicates an expected call of ValidateUpdate.
type Mutator ¶
type Mutator interface { // Prototype returns a prototype of Object for this admission request. Prototype(req admission.Request) (runtime.Object, error) // MutateCreate handles Object creation and returns the object after mutation and error if any. MutateCreate(ctx context.Context, obj runtime.Object) (runtime.Object, error) // MutateUpdate handles Object update and returns the object after mutation and error if any. MutateUpdate(ctx context.Context, obj runtime.Object, oldObj runtime.Object) (runtime.Object, error) }
Mutator defines interface for a mutation webHook
type Validator ¶
type Validator interface { // Prototype returns a prototype of Object for this admission request. Prototype(req admission.Request) (runtime.Object, error) // ValidateCreate handles Object creation and returns error if any. ValidateCreate(ctx context.Context, obj runtime.Object) error // ValidateUpdate handles Object update and returns error if any. ValidateUpdate(ctx context.Context, obj runtime.Object, oldObj runtime.Object) error // ValidateDelete handles Object deletion and returns error if any. ValidateDelete(ctx context.Context, obj runtime.Object) error }
Validator defines interface for a validation webHook