datapatcher

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyResponseDataToSecrets added in v1.0.6

func ApplyResponseDataToSecrets(ctx context.Context, localKube client.Client, logger logging.Logger, response *httpClient.HttpResponse, secretConfigs []common.SecretInjectionConfig, cr metav1.Object)

ApplyResponseDataToSecrets applies response data to Kubernetes Secrets as specified in the resource's SecretInjectionConfigs. For each SecretInjectionConfig, it extracts a value from the HTTP response and patches it into the referenced Secret. Ownership of the Secret is optionally set based on the configuration.

func PatchSecretsIntoHeaders

func PatchSecretsIntoHeaders(ctx context.Context, localKube client.Client, headers map[string][]string, logger logging.Logger) (map[string][]string, error)

PatchSecretsIntoHeaders takes a map of headers and applies security measures to sensitive values within the headers. It creates a copy of the input map to avoid modifying the original map and iterates over the copied map to process each list of headers. It then applies the necessary modifications to each header using patchSecretsToValue function.

func PatchSecretsIntoMap added in v1.0.5

func PatchSecretsIntoMap(ctx context.Context, localKube client.Client, data map[string]interface{}, logger logging.Logger) (map[string]interface{}, error)

PatchSecretsIntoMap takes a map of string to interface{} and patches secrets into any string values within the map, including nested maps and slices.

func PatchSecretsIntoResponse added in v1.0.10

func PatchSecretsIntoResponse(ctx context.Context, localKube client.Client, response interfaces.HTTPResponse, logger logging.Logger) (interfaces.HTTPResponse, error)

PatchSecretsIntoResponse patches secrets into the provided response.

func PatchSecretsIntoString added in v1.0.5

func PatchSecretsIntoString(ctx context.Context, localKube client.Client, str string, logger logging.Logger) (string, error)

PatchSecretsIntoString patches secrets into the provided string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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