Documentation
¶
Index ¶
- func CamelToSnake(s string) string
- func CheckPath(fieldMask *types.FieldMask, path []string) bool
- func ContainsString(list []string, a string) bool
- func GetUUIDFromInterface(rawProperties interface{}) (string, error)
- func GetValueByPath(dataSource map[string]interface{}, path string, delimiter string) (value interface{}, ok bool)
- func InterfaceToBool(i interface{}) bool
- func InterfaceToBytes(i interface{}) []byte
- func InterfaceToFloat(i interface{}) float64
- func InterfaceToInt(i interface{}) int
- func InterfaceToInt64(i interface{}) int64
- func InterfaceToInt64List(i interface{}) []int64
- func InterfaceToInterfaceList(i interface{}) []interface{}
- func InterfaceToInterfaceMap(i interface{}) map[string]interface{}
- func InterfaceToString(i interface{}) string
- func InterfaceToStringList(i interface{}) []string
- func InterfaceToStringMap(i interface{}) map[string]string
- func InterfaceToUint64(i interface{}) uint64
- func MustJSON(data interface{}) string
- func MustYAML(data interface{}) string
- func RemoveFromStringSlice(slice []string, values map[string]struct{}) []string
- func SetValueByPath(dataSource map[string]interface{}, path string, delimiter string, ...) (ok bool)
- func SnakeToCamel(s string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CamelToSnake ¶
CamelToSnake translate camel case to snake case.
func ContainsString ¶
ContainsString check if a string is in a string list.
func GetUUIDFromInterface ¶
GetUUIDFromInterface get a UUID from an interface.
func GetValueByPath ¶
func GetValueByPath(dataSource map[string]interface{}, path string, delimiter string) (value interface{}, ok bool)
GetValueByPath method returns the value for the given path form the nested map. The path currently does not support array index.
func InterfaceToBool ¶
func InterfaceToBool(i interface{}) bool
InterfaceToBool makes a bool from interface
func InterfaceToBytes ¶
func InterfaceToBytes(i interface{}) []byte
InterfaceToBytes makes a bytes from interface
func InterfaceToFloat ¶
func InterfaceToFloat(i interface{}) float64
InterfaceToFloat makes a float.
func InterfaceToInt ¶
func InterfaceToInt(i interface{}) int
InterfaceToInt makes an int from interface
func InterfaceToInt64 ¶
func InterfaceToInt64(i interface{}) int64
InterfaceToInt64 makes an int64 from interface
func InterfaceToInt64List ¶
func InterfaceToInt64List(i interface{}) []int64
InterfaceToInt64List makes a int64 list from interface
func InterfaceToInterfaceList ¶
func InterfaceToInterfaceList(i interface{}) []interface{}
InterfaceToInterfaceList makes a interface list from interface
func InterfaceToInterfaceMap ¶
func InterfaceToInterfaceMap(i interface{}) map[string]interface{}
InterfaceToInterfaceMap makes a interface map.
func InterfaceToString ¶
func InterfaceToString(i interface{}) string
InterfaceToString makes a string from interface
func InterfaceToStringList ¶
func InterfaceToStringList(i interface{}) []string
InterfaceToStringList makes a string list from interface
func InterfaceToStringMap ¶
InterfaceToStringMap makes a string map.
func InterfaceToUint64 ¶
func InterfaceToUint64(i interface{}) uint64
InterfaceToUint64 makes an uint64 from interface
func RemoveFromStringSlice ¶
RemoveFromStringSlice removes given values from slice of strings. It preserves order of values.
func SetValueByPath ¶
func SetValueByPath(dataSource map[string]interface{}, path string, delimiter string, value interface{}) (ok bool)
SetValueByPath method set the value for the given path in the nested map. The path currently does not support slice item assignment.
func SnakeToCamel ¶
SnakeToCamel translates snake case to camel case.
Types ¶
This section is empty.