mocks

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: AGPL-3.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Calls              map[string][]ClientCallerInfo
	MockApplyYAML      func(ctx context.Context, yamls ...[]byte) error
	MockCreate         func(ctx context.Context, obj client.Object) error
	MockDelete         func(ctx context.Context, obj client.Object) error
	MockDeleteYAML     func(ctx context.Context, yamls ...[]byte) error
	MockGet            func(ctx context.Context, nn types.NamespacedName, obj client.Object) error
	MockList           func(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
	MockListSecrets    func(ctx context.Context, namespace string, secretType corev1.SecretType) ([]corev1.Secret, error)
	MockReadLogs       func(ctx context.Context, namespace string, name string, writer io.WriteCloser, opts *k8s.ReadLogsOptions) error
	MockUpdate         func(ctx context.Context, obj client.Object) error
	MockValidateObject func(ctx context.Context, obj client.Object) error
}

func NewClient

func NewClient() *Client

func (*Client) ApplyYAML

func (cMock *Client) ApplyYAML(ctx context.Context, yamls ...[]byte) error

func (*Client) Create

func (cMock *Client) Create(ctx context.Context, obj client.Object) error

func (*Client) Delete

func (cMock *Client) Delete(ctx context.Context, obj client.Object) error

func (*Client) DeleteYAML

func (cMock *Client) DeleteYAML(ctx context.Context, yamls ...[]byte) error

func (*Client) Get

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

func (*Client) List

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

func (*Client) ListSecrets

func (cMock *Client) ListSecrets(ctx context.Context, namespace string, secretType corev1.SecretType) ([]corev1.Secret, error)

func (*Client) ReadLogs

func (cMock *Client) ReadLogs(ctx context.Context, namespace string, name string, writer io.WriteCloser, opts *k8s.ReadLogsOptions) error

func (*Client) Update

func (cMock *Client) Update(ctx context.Context, obj client.Object) error

func (*Client) ValidateObject

func (cMock *Client) ValidateObject(ctx context.Context, obj client.Object) error

type ClientCallerInfo

type ClientCallerInfo struct {
	Args []any
}

Jump to

Keyboard shortcuts

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