convert

package
v0.0.0-...-0662ccb Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2019 License: Apache-2.0 Imports: 8 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ERR_CONVERT_INVALID = errors.New("value convert invalid.")
)

Functions

func CleanupInterfaceArray

func CleanupInterfaceArray(in []interface{}) []interface{}

func CleanupInterfaceMap

func CleanupInterfaceMap(in map[interface{}]interface{}) map[string]interface{}

func CleanupMapValue

func CleanupMapValue(v interface{}) interface{}

func ConvertKVStringSliceToMap

func ConvertKVStringSliceToMap(values []string) map[string]string

func ConvertMapToKVStringSlice

func ConvertMapToKVStringSlice(values map[string]string) []string

func ConvertMapValueToBool

func ConvertMapValueToBool(m map[string]interface{}, key string) (bool, error)

func ConvertMapValueToFloat64

func ConvertMapValueToFloat64(m map[string]interface{}, key string) (float64, error)

func ConvertMapValueToFloat64Slice

func ConvertMapValueToFloat64Slice(m map[string]interface{}, key string) ([]float64, error)

func ConvertMapValueToInt

func ConvertMapValueToInt(m map[string]interface{}, key string) (int, error)

func ConvertMapValueToInt64

func ConvertMapValueToInt64(m map[string]interface{}, key string) (int64, error)

func ConvertMapValueToInt64Slice

func ConvertMapValueToInt64Slice(m map[string]interface{}, key string) ([]int64, error)

func ConvertMapValueToIntSlice

func ConvertMapValueToIntSlice(m map[string]interface{}, key string) ([]int, error)

func ConvertMapValueToJSONObject

func ConvertMapValueToJSONObject(m map[string]interface{}, key string, v interface{}) error

func ConvertMapValueToObjectSlice

func ConvertMapValueToObjectSlice(m map[string]interface{}, key string) ([]interface{}, error)

func ConvertMapValueToString

func ConvertMapValueToString(m map[string]interface{}, key string) (string, error)

func ConvertMapValueToStringSlice

func ConvertMapValueToStringSlice(m map[string]interface{}, key string) ([]string, error)

func ConvertMapValueToTime

func ConvertMapValueToTime(m map[string]interface{}, key string) (time.Time, error)

func ConvertToString

func ConvertToString(v interface{}) (string, error)

func InterfaceToMap

func InterfaceToMap(obj interface{}) map[string]interface{}

Types

This section is empty.

Jump to

Keyboard shortcuts

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