Documentation
¶
Index ¶
- func ParseEndpoint(displayName string, endpoint string) (net.IP, error)
- func RandomString(n int) string
- func SplitTagsByNamespace(tags []map[string]string, searchNamespace string) (map[string]string, map[string]string, error)
- func TagsListSetDefaultNamespace(tags []map[string]string, namespace string)
- func TagsListToMap(tagsMap map[string]string, tagsList *[]map[string]string, ...) map[string]string
- func TagsMapToList(tagsMap map[string]string) ([]map[string]string, error)
- func TagsMapToListNoNamespace(tagsMap map[string]string, setNamespace string) []map[string]string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseEndpoint ¶
ParseEndpoint is a helper function that reads an endpoint and returns the looked-up IP address
func RandomString ¶
RandomString generates a random string of n characters using basic characters
func SplitTagsByNamespace ¶
func SplitTagsByNamespace(tags []map[string]string, searchNamespace string) (map[string]string, map[string]string, error)
SplitTagsByNamespace searches through a list of tags and separates them by namespace. Specifically, it returns one map of all tags (key->value) that matched the given namespace, and another map of all tags (key->value) that didn't. Note that this *is* a lossy operation, since all tags that don't match the namespace won't have the namespace stored, it's just dropped.
func TagsListSetDefaultNamespace ¶
TagsListSetDefaultNamespace iterates through every tag in a list of tags, and if it doesn't have a namespace set it will set it to the provided default namespacece
func TagsListToMap ¶
func TagsListToMap(tagsMap map[string]string, tagsList *[]map[string]string, defaultNamespace string) map[string]string
TagsListToMap takes in a list of tags ({ key, namespace, value }) and converts it into a flat map of the format "key,namespace" (a single string) => value
func TagsMapToList ¶
TagsMapToList converts a flat map (usually produced by TagsListToMap) with the format "key,namespace" => value into a list of tags ({ key, namespace, value })
Types ¶
This section is empty.