Documentation ¶
Index ¶
- func ConvertToStringMap(data map[string]interface{}) (map[string]string, error)
- func EncryptValue(pgpKey, value string) (string, string, error)
- func FormatJson(body string) string
- func GetNullProperties(propertyMap map[string]interface{}) []string
- func GetOldMapProperties(old, new map[string]interface{}) []interface{}
- func InterfaceToString(value interface{}) string
- func InterfaceToStringOrYaml(value interface{}) (string, error)
- func JsonStringToMap(dataString string) (map[string]interface{}, error)
- func MapToJsonString(data map[string]interface{}) (string, error)
- func MergeMaps(m1, m2 map[string]interface{})
- func ParseYamlString(value string) (interface{}, error)
- func PropertyMapFromJson(body string) (map[string]string, error)
- func RemoveProperties(properties []interface{}, excluded []string) []interface{}
- func RemovePropertiesFromMap(propertyMap map[string]string, excluded []string) map[string]string
- func SliceContains(s []string, searchTerm string) bool
- func YamlStringsAreEqual(yaml1, yaml2 string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToStringMap ¶
convert a map[string]interface{} to a map[string]string by json encoding any non string fields
func FormatJson ¶
apply standard formatting to a json string by unmarshalling into a map then marshalling back to JSON
func GetNullProperties ¶ added in v1.2.0
func GetOldMapProperties ¶ added in v1.4.0
func GetOldMapProperties(old, new map[string]interface{}) []interface{}
get keys from old map not in new map
func InterfaceToString ¶ added in v1.3.0
func InterfaceToString(value interface{}) string
convert value to a string.
func InterfaceToStringOrYaml ¶ added in v1.3.0
if the value is already a string return it, otherwise convert to the YAML representation
func JsonStringToMap ¶
func MapToJsonString ¶
func ParseYamlString ¶ added in v1.3.0
parse given string in YAML format
func PropertyMapFromJson ¶
given a json representation of an object, build a map of the property names: property alias -> property path
func RemoveProperties ¶
func RemoveProperties(properties []interface{}, excluded []string) []interface{}
given a list of items which may each be either a property or property map, remove the excluded properties
func RemovePropertiesFromMap ¶
given a property list, remove the excluded properties
func SliceContains ¶
no native contains in golang :/
func YamlStringsAreEqual ¶ added in v1.3.0
implements a equal operation on 2 YAML strings, ignoring formatting differences
Types ¶
This section is empty.