Documentation ¶
Index ¶
- func CombineMapTrees(destination map[string]interface{}, input map[string]interface{})
- func GetMapValueAsIntViaPath(m map[string]interface{}, path string) int
- func GetMapValueAsMapViaPath(m map[string]interface{}, path string) map[string]interface{}
- func GetMapValueAsStringViaPath(m map[string]interface{}, path string) string
- func GetMapValueViaPath(m map[string]interface{}, path string) interface{}
- func KeyValuesToMap(values []string) map[string]string
- func MapKeys(m map[string]string) []string
- func MapToKeyValues(values map[string]string) []string
- func MapToString(m map[string]string) string
- func MergeMaps(maps ...map[string]string) map[string]string
- func SetMapValueViaPath(m map[string]interface{}, path string, value interface{})
- func StringMapHasValue(m map[string]string, value string) bool
- func ToObjectMap(object interface{}) (map[string]interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CombineMapTrees ¶
CombineMapTrees recursively copies all the values from the input map into the destination map preserving any missing entries in the destination
func GetMapValueAsIntViaPath ¶
GetMapValueAsIntViaPath returns the int value at the given path mean `m["foo"]["bar"]["whatnot"]`
func GetMapValueAsMapViaPath ¶
GetMapValueAsMapViaPath returns the map value at the given path mean `m["foo"]["bar"]["whatnot"]`
func GetMapValueAsStringViaPath ¶
GetMapValueAsStringViaPath returns the string value at the given path mean `m["foo"]["bar"]["whatnot"]`
func GetMapValueViaPath ¶
GetMapValueViaPath returns the value at the given path mean `m["foo"]["bar"]["whatnot"]`
func KeyValuesToMap ¶
KeyValuesToMap converts the set of values of the form "foo=abc" into a map
func MapToKeyValues ¶
MapToKeyValues converts the the map into a sorted array of key/value pairs
func MapToString ¶
MapToString converts the map to a string
func MergeMaps ¶
MergeMaps merges all the maps together with the entries in the last map overwriting any earlier values
so if you want to add some annotations to a resource you can do resource.Annotations = kube.MergeMaps(resource.Annotations, myAnnotations)
func SetMapValueViaPath ¶
SetMapValueViaPath sets the map key using the given path which supports the form `foo.bar.whatnot` to mean `m["foo"]["bar"]["whatnot"]` lazily creating maps as the path is navigated
func StringMapHasValue ¶
StringMapHasValue returns true if the given map contains the given value
func ToObjectMap ¶
ToObjectMap converts the given object into a map of strings/maps using YAML marshalling
Types ¶
This section is empty.