utils

package module
v0.72.0-devel Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2025 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Overview

Package utils contains a series of helpers function for the secrets Component and its mock. Direct usage of this helpers outside of the secrets Component sphere should be avoided.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsEnc

func IsEnc(str string) (bool, string)

IsEnc returns true is the string match the 'ENC[...]' format

Types

type Walker

type Walker struct {
	// Resolver is called for eachs string type found in the data tree
	Resolver func(path []string, value string) (string, error)
}

Walker recursively explores a loaded YAML in search for string values to replace. For each string the 'Resolver' callback will be called allowing it to overwrite the string value.

func (*Walker) Walk

func (w *Walker) Walk(data *interface{}) error

Walk recursively explores a loaded YAML in search for string values to replace. For each string the 'resolver' will be called allowing it to overwrite the string value.

Jump to

Keyboard shortcuts

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