yamltags

package
v2.11.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetYamlKeys

func GetYamlKeys(config interface{}) []string

GetYamlKeys returns the yaml key for each non-nested field of the given non-nil config parameter For example if config is `latest.DeployType{LegacyHelmDeploy: &LegacyHelmDeploy{...}, KustomizeDeploy: &KustomizeDeploy{...}}` then it returns `["helm", "kustomize"]`

func GetYamlTag

func GetYamlTag(value interface{}) string

GetYamlTag returns the first yaml tag used in the raw yaml text of the given struct

func ValidateStruct

func ValidateStruct(s interface{}) error

ValidateStruct validates and processes the provided pointer to a struct.

func YamlName

func YamlName(field reflect.StructField) string

YamlName returns the YAML name of the given field

Types

This section is empty.

Jump to

Keyboard shortcuts

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