query

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generic

type Generic[T client.Object, L client.ObjectList] struct {
	Target       T
	ListTarget   L
	ToList       func(L) []T
	IsEqual      func(T, T) bool
	MustRecreate func(T, T) bool

	Owner      client.Object
	KubeClient client.Client
	KubeReader client.Reader
	Log        logd.Logger
}

func (Generic[T, L]) Create

func (c Generic[T, L]) Create(ctx context.Context, object T) error

func (Generic[T, L]) CreateOrUpdate

func (c Generic[T, L]) CreateOrUpdate(ctx context.Context, newObject T) (bool, error)

func (Generic[T, L]) CreateOrUpdateForNamespaces

func (c Generic[T, L]) CreateOrUpdateForNamespaces(ctx context.Context, object T, namespaces []corev1.Namespace) error

func (Generic[T, L]) Delete

func (c Generic[T, L]) Delete(ctx context.Context, object T) error

func (Generic[T, L]) DeleteForNamespaces

func (c Generic[T, L]) DeleteForNamespaces(ctx context.Context, objectName string, namespaces []string) error

func (Generic[T, L]) Get

func (c Generic[T, L]) Get(ctx context.Context, objectKey client.ObjectKey) (T, error)

func (Generic[T, L]) GetAllFromNamespaces

func (c Generic[T, L]) GetAllFromNamespaces(ctx context.Context, objectName string) ([]T, error)

func (Generic[T, L]) Recreate

func (c Generic[T, L]) Recreate(ctx context.Context, object T) error

func (Generic[T, L]) Update

func (c Generic[T, L]) Update(ctx context.Context, object T) error

func (Generic[T, L]) WithOwner

func (c Generic[T, L]) WithOwner(owner client.Object) Generic[T, L]

Jump to

Keyboard shortcuts

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