coreclients

package
v1.12.7 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

coreclients contains fakes for some of the types from k8s.io/client-go/kubernetes/typed/core/v1

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeSecretsGetter

type FakeSecretsGetter struct {
	// contains filtered or unexported fields
}

FakeSecretsGetter can be used to mock typedcorev1.SecretsGetter in tests.

func NewFakeSecretsGetter

func NewFakeSecretsGetter(mods ...FakeSecretsGetterModifier) *FakeSecretsGetter

func NewFakeSecretsGetterFrom

func NewFakeSecretsGetterFrom(f *FakeSecretsGetter, mods ...FakeSecretsGetterModifier) *FakeSecretsGetter

NewFakeSecretsGetterFrom can be used to create a mock typedcorev1.SecretsGetter for tests. Example: NewFakeSecretsGetterFrom(NewFakeSecretsGetter(), SetFakeSecretsGetterCreate(<secret>, <error>)).

func (*FakeSecretsGetter) Secrets

type FakeSecretsGetterModifier

type FakeSecretsGetterModifier func(*FakeSecretsGetter)

func SetFakeSecretsGetterApplyFn

func SetFakeSecretsGetterApplyFn(fn ApplyFn) FakeSecretsGetterModifier

SetFakeSecretsGetterApplyFn is a function that can be used to inject code when the FakeSecretsGetter is Applied.

func SetFakeSecretsGetterCreate

func SetFakeSecretsGetterCreate(s *corev1.Secret, err error) FakeSecretsGetterModifier

SetFakeSecretsGetterCreate is a modifier that can be used to set secret and error that will be returned when FakeSecretsGetter(<namespace>).Create(<secret>, <opts>) is called.

func SetFakeSecretsGetterGet

func SetFakeSecretsGetterGet(s *corev1.Secret, err error) FakeSecretsGetterModifier

SetFakeSecretsGetterGet is a modifier that can be used to set secret and error that will be returned when FakeSecretsGetter(<namespace>).Get(<context>,<uid>,<opts>) is called.

Jump to

Keyboard shortcuts

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