Documentation
¶
Index ¶
- Constants
- func KubeControllerSpecHelper[T any](inputType T, cm ConfigManageriface, config generator.GenVarsConfig) (*T, error)
- func RetrieveMarshalledJson[T any](input *T, cm ConfigManageriface, config generator.GenVarsConfig) (*T, error)
- func RetrieveMarshalledYaml[T any](input *T, cm ConfigManageriface, config generator.GenVarsConfig) (*T, error)
- func RetrieveUnmarshalledFromJson[T any](input []byte, output *T, cm ConfigManageriface, config generator.GenVarsConfig) (*T, error)
- func RetrieveUnmarshalledFromYaml[T any](input []byte, output *T, cm ConfigManageriface, config generator.GenVarsConfig) (*T, error)
- type ConfigManager
- type ConfigManageriface
Constants ¶
const (
TERMINATING_CHAR string = `[^\'\"\s\n]`
)
Variables ¶
This section is empty.
Functions ¶
func KubeControllerSpecHelper ¶ added in v1.8.0
func KubeControllerSpecHelper[T any](inputType T, cm ConfigManageriface, config generator.GenVarsConfig) (*T, error)
@deprecated left for compatibility KubeControllerSpecHelper is a helper method, it marshalls an input value of that type into a string and passes it into the relevant configmanger retrieve method and returns the unmarshalled object back
It accepts a DI of configmanager and the config (for testability) to replace all occurences of replaceable tokens inside a Marshalled string of that type
func RetrieveMarshalledJson ¶ added in v1.9.0
func RetrieveMarshalledJson[T any](input *T, cm ConfigManageriface, config generator.GenVarsConfig) (*T, error)
RetrieveMarshalledJson is a helper method.
It marshalls an input value of that type into a []byte and passes it into the relevant configmanger retrieve method returns the unmarshalled object back with all tokens replaced IF found for their specific vault implementation values. Type must contain all public members with a JSON tag on the struct
func RetrieveMarshalledYaml ¶ added in v1.9.0
func RetrieveMarshalledYaml[T any](input *T, cm ConfigManageriface, config generator.GenVarsConfig) (*T, error)
RetrieveMarshalledYaml is a helper method.
It marshalls an input value of that type into a []byte and passes it into the relevant configmanger retrieve method returns the unmarshalled object back with all tokens replaced IF found for their specific vault implementation values. Type must contain all public members with a YAML tag on the struct
func RetrieveUnmarshalledFromJson ¶ added in v1.9.0
func RetrieveUnmarshalledFromJson[T any](input []byte, output *T, cm ConfigManageriface, config generator.GenVarsConfig) (*T, error)
RetrieveUnmarshalledFromJson is a helper method. Same as RetrieveMarshalledJson but it accepts an already marshalled byte slice
func RetrieveUnmarshalledFromYaml ¶ added in v1.9.0
func RetrieveUnmarshalledFromYaml[T any](input []byte, output *T, cm ConfigManageriface, config generator.GenVarsConfig) (*T, error)
RetrieveUnmarshalledFromYaml is a helper method.
Same as RetrieveMarshalledYaml but it accepts an already marshalled byte slice
Types ¶
type ConfigManager ¶
type ConfigManager struct{}
func (*ConfigManager) Retrieve ¶
func (c *ConfigManager) Retrieve(tokens []string, config generator.GenVarsConfig) (generator.ParsedMap, error)
Retrieve gets a rawMap from a set implementation will be empty if no matches found
func (*ConfigManager) RetrieveWithInputReplaced ¶ added in v1.0.1
func (c *ConfigManager) RetrieveWithInputReplaced(input string, config generator.GenVarsConfig) (string, error)
RetrieveWithInputReplaced parses given input against all possible token strings using regex to grab a list of found tokens in the given string and return the replaced string