remote

package
v1.8.6 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyYAML

func ApplyYAML(ctx context.Context, c client.Client, data []byte) error

ApplyYAML calls ApplyYAMLWithNamespace with an empty namespace.

func ApplyYAMLWithNamespace

func ApplyYAMLWithNamespace(ctx context.Context, c client.Client, data []byte, namespace string) error

ApplyYAMLWithNamespace applies the provided YAML as unstructured data with the given client. The data may be a single YAML document or multidoc YAML This function is idempotent. When a non-empty namespace is provided then all objects are assigned the the namespace prior to being created.

func DeleteYAML

func DeleteYAML(ctx context.Context, c client.Client, data []byte) error

DeleteYAML calls DeleteYAMLWithNamespace with an empty namespace.

func DeleteYAMLWithNamespace

func DeleteYAMLWithNamespace(ctx context.Context, c client.Client, data []byte, namespace string) error

DeleteYAMLWithNamespace deletes the provided YAML as unstructured data with the given client. The data may be a single YAML document or multidoc YAML. When a non-empty namespace is provided then all objects are assigned the the namespace prior to any other actions being performed with or to the object.

func DoesNotExistYAML

func DoesNotExistYAML(ctx context.Context, c client.Client, data []byte) (bool, error)

DoesNotExistYAML calls DoesNotExistYAMLWithNamespace with an empty namespace.

func DoesNotExistYAMLWithNamespace

func DoesNotExistYAMLWithNamespace(ctx context.Context, c client.Client, data []byte, namespace string) (bool, error)

DoesNotExistYAMLWithNamespace verifies each object in the provided YAML no longer exists on the API server. The data may be a single YAML document or multidoc YAML. When a non-empty namespace is provided then all objects are assigned the the namespace prior to any other actions being performed with or to the object. A boolean true is returned if none of the objects exist. An error is returned if the Get call returns an error other than 404 NotFound.

func ExistsYAML

func ExistsYAML(ctx context.Context, c client.Client, data []byte) error

ExistsYAML calls ExistsYAMLWithNamespace with an empty namespace.

func ExistsYAMLWithNamespace

func ExistsYAMLWithNamespace(ctx context.Context, c client.Client, data []byte, namespace string) error

ExistsYAMLWithNamespace verifies each object in the provided YAML exists on the API server. The data may be a single YAML document or multidoc YAML. When a non-empty namespace is provided then all objects are assigned the the namespace prior to any other actions being performed with or to the object. A nil error is returned if all objects exist.

func ForEachObjectInYAML

func ForEachObjectInYAML(
	ctx context.Context,
	c client.Client,
	data []byte,
	namespace string,
	actionFn ForEachObjectInYAMLActionFunc) error

ForEachObjectInYAML excutes actionFn for each object in the provided YAML. If an error is returned then no further objects are processed. The data may be a single YAML document or multidoc YAML. When a non-empty namespace is provided then all objects are assigned the the namespace prior to any other actions being performed with or to the object.

Types

type ForEachObjectInYAMLActionFunc

type ForEachObjectInYAMLActionFunc func(context.Context, client.Client, *unstructured.Unstructured) error

ForEachObjectInYAMLActionFunc is a function that is executed against each object found in a YAML document. When a non-empty namespace is provided then the object is assigned the namespace prior to any other actions being performed with or to the object.

Jump to

Keyboard shortcuts

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