external

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package external implements mocks that implement 3rd party interfaces, t. i. interfaces which we do not control. In order to avoid package dependency cycles these mock implementations reside in this package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	mock.Mock
}

Client is an autogenerated mock type for the Client type

func NewClient

func NewClient(t mockConstructorTestingTNewClient) *Client

NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*Client) Create

func (_m *Client) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error

Create provides a mock function with given fields: ctx, obj, opts

func (*Client) Delete

func (_m *Client) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error

Delete provides a mock function with given fields: ctx, obj, opts

func (*Client) DeleteAllOf

func (_m *Client) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error

DeleteAllOf provides a mock function with given fields: ctx, obj, opts

func (*Client) Get

func (_m *Client) Get(ctx context.Context, key types.NamespacedName, obj client.Object) error

Get provides a mock function with given fields: ctx, key, obj

func (*Client) List

func (_m *Client) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error

List provides a mock function with given fields: ctx, list, opts

func (*Client) Patch

func (_m *Client) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error

Patch provides a mock function with given fields: ctx, obj, patch, opts

func (*Client) RESTMapper

func (_m *Client) RESTMapper() meta.RESTMapper

RESTMapper provides a mock function with given fields:

func (*Client) Scheme

func (_m *Client) Scheme() *runtime.Scheme

Scheme provides a mock function with given fields:

func (*Client) Status

func (_m *Client) Status() client.StatusWriter

Status provides a mock function with given fields:

func (*Client) Update

func (_m *Client) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error

Update provides a mock function with given fields: ctx, obj, opts

type EventRecorder

type EventRecorder struct {
	mock.Mock
}

EventRecorder is an autogenerated mock type for the EventRecorder type

func NewEventRecorder

func NewEventRecorder(t mockConstructorTestingTNewEventRecorder) *EventRecorder

NewEventRecorder creates a new instance of EventRecorder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*EventRecorder) AnnotatedEventf

func (_m *EventRecorder) AnnotatedEventf(object runtime.Object, annotations map[string]string, eventtype string, reason string, messageFmt string, args ...interface{})

AnnotatedEventf provides a mock function with given fields: object, annotations, eventtype, reason, messageFmt, args

func (*EventRecorder) Event

func (_m *EventRecorder) Event(object runtime.Object, eventtype string, reason string, message string)

Event provides a mock function with given fields: object, eventtype, reason, message

func (*EventRecorder) Eventf

func (_m *EventRecorder) Eventf(object runtime.Object, eventtype string, reason string, messageFmt string, args ...interface{})

Eventf provides a mock function with given fields: object, eventtype, reason, messageFmt, args

type LogSink

type LogSink struct {
	mock.Mock
}

LogSink is an autogenerated mock type for the LogSink type

func NewLogSink

func NewLogSink(t mockConstructorTestingTNewLogSink) *LogSink

NewLogSink creates a new instance of LogSink. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*LogSink) Enabled

func (_m *LogSink) Enabled(level int) bool

Enabled provides a mock function with given fields: level

func (*LogSink) Error

func (_m *LogSink) Error(err error, msg string, keysAndValues ...interface{})

Error provides a mock function with given fields: err, msg, keysAndValues

func (*LogSink) Info

func (_m *LogSink) Info(level int, msg string, keysAndValues ...interface{})

Info provides a mock function with given fields: level, msg, keysAndValues

func (*LogSink) Init

func (_m *LogSink) Init(info logr.RuntimeInfo)

Init provides a mock function with given fields: info

func (*LogSink) WithName

func (_m *LogSink) WithName(name string) logr.LogSink

WithName provides a mock function with given fields: name

func (*LogSink) WithValues

func (_m *LogSink) WithValues(keysAndValues ...interface{}) logr.LogSink

WithValues provides a mock function with given fields: keysAndValues

type Manager

type Manager struct {
	mock.Mock
}

Manager was an autogenerated mock type for the Manager type but must somehow maintained manually.

func NewManager

func NewManager(t mockConstructorTestingTNewManager) *Manager

NewManager creates a new instance of Manager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*Manager) Add

func (_m *Manager) Add(_a0 manager.Runnable) error

Add provides a mock function with given fields: _a0

func (*Manager) AddHealthzCheck

func (_m *Manager) AddHealthzCheck(name string, check healthz.Checker) error

AddHealthzCheck provides a mock function with given fields: name, check

func (*Manager) AddMetricsExtraHandler

func (_m *Manager) AddMetricsExtraHandler(path string, handler http.Handler) error

AddMetricsExtraHandler provides a mock function with given fields: path, handler

func (*Manager) AddReadyzCheck

func (_m *Manager) AddReadyzCheck(name string, check healthz.Checker) error

AddReadyzCheck provides a mock function with given fields: name, check

func (*Manager) Elected

func (_m *Manager) Elected() <-chan struct{}

Elected provides a mock function with given fields:

func (*Manager) GetAPIReader

func (_m *Manager) GetAPIReader() client.Reader

GetAPIReader provides a mock function with given fields:

func (*Manager) GetCache

func (_m *Manager) GetCache() cache.Cache

GetCache provides a mock function with given fields:

func (*Manager) GetClient

func (_m *Manager) GetClient() client.Client

GetClient provides a mock function with given fields:

func (*Manager) GetConfig

func (_m *Manager) GetConfig() *rest.Config

GetConfig provides a mock function with given fields:

func (*Manager) GetControllerOptions

func (_m *Manager) GetControllerOptions() config.Controller

GetControllerOptions provides a mock function with given fields:

func (*Manager) GetEventRecorderFor

func (_m *Manager) GetEventRecorderFor(name string) record.EventRecorder

GetEventRecorderFor provides a mock function with given fields: name

func (*Manager) GetFieldIndexer

func (_m *Manager) GetFieldIndexer() client.FieldIndexer

GetFieldIndexer provides a mock function with given fields:

func (*Manager) GetHTTPClient added in v0.1.0

func (_m *Manager) GetHTTPClient() *http.Client

func (*Manager) GetLogger

func (_m *Manager) GetLogger() logr.Logger

GetLogger provides a mock function with given fields:

func (*Manager) GetRESTMapper

func (_m *Manager) GetRESTMapper() meta.RESTMapper

GetRESTMapper provides a mock function with given fields:

func (*Manager) GetScheme

func (_m *Manager) GetScheme() *runtime.Scheme

GetScheme provides a mock function with given fields:

func (*Manager) GetWebhookServer

func (_m *Manager) GetWebhookServer() webhook.Server

GetWebhookServer provides a mock function with given fields:

func (*Manager) SetFields

func (_m *Manager) SetFields(_a0 interface{}) error

SetFields provides a mock function with given fields: _a0

func (*Manager) Start

func (_m *Manager) Start(ctx context.Context) error

Start provides a mock function with given fields: ctx

type SecretInterface

type SecretInterface struct {
	mock.Mock
}

SecretInterface is an autogenerated mock type for the SecretInterface type

func NewSecretInterface

func NewSecretInterface(t mockConstructorTestingTNewSecretInterface) *SecretInterface

NewSecretInterface creates a new instance of SecretInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*SecretInterface) Apply

Apply provides a mock function with given fields: ctx, secret, opts

func (*SecretInterface) Create

func (_m *SecretInterface) Create(ctx context.Context, secret *corev1.Secret, opts metav1.CreateOptions) (*corev1.Secret, error)

Create provides a mock function with given fields: ctx, secret, opts

func (*SecretInterface) Delete

func (_m *SecretInterface) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error

Delete provides a mock function with given fields: ctx, name, opts

func (*SecretInterface) DeleteCollection

func (_m *SecretInterface) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error

DeleteCollection provides a mock function with given fields: ctx, opts, listOpts

func (*SecretInterface) Get

func (_m *SecretInterface) Get(ctx context.Context, name string, opts metav1.GetOptions) (*corev1.Secret, error)

Get provides a mock function with given fields: ctx, name, opts

func (*SecretInterface) List

List provides a mock function with given fields: ctx, opts

func (*SecretInterface) Patch

func (_m *SecretInterface) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*corev1.Secret, error)

Patch provides a mock function with given fields: ctx, name, pt, data, opts, subresources

func (*SecretInterface) Update

func (_m *SecretInterface) Update(ctx context.Context, secret *corev1.Secret, opts metav1.UpdateOptions) (*corev1.Secret, error)

Update provides a mock function with given fields: ctx, secret, opts

func (*SecretInterface) Watch

Watch provides a mock function with given fields: ctx, opts

type StatusWriter

type StatusWriter struct {
	mock.Mock
}

StatusWriter is an autogenerated mock type for the StatusWriter type

func NewStatusWriter

func NewStatusWriter(t mockConstructorTestingTNewStatusWriter) *StatusWriter

NewStatusWriter creates a new instance of StatusWriter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*StatusWriter) Patch

func (_m *StatusWriter) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error

Patch provides a mock function with given fields: ctx, obj, patch, opts

func (*StatusWriter) Update

func (_m *StatusWriter) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error

Update provides a mock function with given fields: ctx, obj, opts

Jump to

Keyboard shortcuts

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