Documentation ¶
Index ¶
- Variables
- func Array(t map[string]interface{}, key string) (r []interface{})
- func ArrayByMap(val interface{}, handler func(length int, keys []int, items []interface{})) (r []interface{})
- func Bool(t map[string]interface{}, key string) (r bool)
- func BoolDefault(t map[string]interface{}, key string, dflt bool) (r bool)
- func CloneAny(a interface{}) (r interface{})
- func CloneArray(a []interface{}) (r []interface{})
- func CloneMap(a map[string]interface{}) (r map[string]interface{})
- func Copy(from, to map[string]interface{})
- func CopyNoCover(from, to map[string]interface{})
- func CreateByPath(path string) map[string]interface{}
- func CreateConfigMap2(keys []string, r map[string]interface{}, val interface{})
- func CreateConfigMap3(keys string, r map[string]interface{}, val interface{})
- func DeleteByKeyMap(a, keyMap map[string]interface{}, isDeleteKeyMap bool) (deleteMap map[string]interface{})
- func DeleteByPath(t map[string]interface{}, path string)
- func ExportField(source, fieldMap datax.M) (r datax.M)
- func FilterMap(a map[string]interface{}, ...) map[string]interface{}
- func FilterMapNotDefault(a map[string]interface{}) map[string]interface{}
- func FilterMapNotNil(a map[string]interface{}) map[string]interface{}
- func Flat(t map[string]interface{}, detail bool) map[string]interface{}
- func Float64(t map[string]interface{}, key string) (r float64)
- func Float64Default(t map[string]interface{}, key string, dflt float64) (r float64)
- func GetByPath(t map[string]interface{}, path string) (value interface{}, has bool)
- func Has(t map[string]interface{}, key string) bool
- func HasByPath(t map[string]interface{}, path string) bool
- func HasKeys(t map[string]interface{}, keys ...string) bool
- func Int(t map[string]interface{}, key string) (r int)
- func IntDefault(t map[string]interface{}, key string, dflt int) (r int)
- func Interface(t map[string]interface{}, key string) (r interface{})
- func Keys(t map[string]interface{}) (r []string)
- func Map(t map[string]interface{}, key string) (r map[string]interface{})
- func MapByPath(t map[string]interface{}, path string, autoCreate bool) (r map[string]interface{})
- func Set(t map[string]interface{}, key string, val interface{})
- func SetByPath(t map[string]interface{}, path string, value interface{})
- func String(t map[string]interface{}, key string) (r string)
- func StringDefault(t map[string]interface{}, key string, dflt string) (r string)
- func StructFromByInterface(target, val interface{}, args ...interface{}) (r interface{})
- func StructFromByType(val interface{}, args ...interface{}) (r interface{})
- func StructToByType(val interface{}, args ...interface{}) (r interface{})
- func StructToValue(st IToMap, val interface{}, name string, args ...interface{})
- func StructToValueNotNull(st IToMap, args ...interface{}) (r interface{})
- func ToMapAllStruct(st IToMapAll, val interface{}, args ...interface{})
- func ToMapInterface(st interface{}, val interface{}, args ...interface{}) (r interface{})
- func ToMapStruct(st IToMap, val interface{}, args ...interface{})
- func ToMapStructByType(val interface{}, args ...interface{}) (r interface{})
- func WalkMap(a map[string]interface{}, ...) error
- type IFromMap
- type IStructName
- type IToMap
- type IToMapAll
Constants ¶
This section is empty.
Variables ¶
View Source
var NewMap = map[string]func(args ...interface{}) interface{}{}
Functions ¶
func ArrayByMap ¶
func CloneArray ¶
func CloneArray(a []interface{}) (r []interface{})
func CopyNoCover ¶
func CopyNoCover(from, to map[string]interface{})
func CreateByPath ¶
func CreateConfigMap2 ¶
func CreateConfigMap3 ¶
func DeleteByKeyMap ¶
func DeleteByKeyMap(a, keyMap map[string]interface{}, isDeleteKeyMap bool) (deleteMap map[string]interface{})
根据提供的keyMap,删除a的键值 只要存在对应的键,不管是什么值都删除 isDeleteKeyMap 会同时删除keyMap中的键
func FilterMap ¶
func FilterMap(a map[string]interface{}, f func(parent map[string]interface{}, key string, val interface{}) bool) map[string]interface{}
f 返回true表示需要过滤掉
func FilterMapNotDefault ¶
过滤掉default值的字段
func FilterMapNotNil ¶
过滤掉nil值的字段
func Float64Default ¶
func StringDefault ¶
func StructFromByInterface ¶
func StructFromByInterface(target, val interface{}, args ...interface{}) (r interface{})
func StructFromByType ¶
func StructFromByType(val interface{}, args ...interface{}) (r interface{})
func StructToByType ¶
func StructToByType(val interface{}, args ...interface{}) (r interface{})
func StructToValue ¶
func StructToValueNotNull ¶
func StructToValueNotNull(st IToMap, args ...interface{}) (r interface{})
func ToMapAllStruct ¶
func ToMapAllStruct(st IToMapAll, val interface{}, args ...interface{})
func ToMapInterface ¶
func ToMapInterface(st interface{}, val interface{}, args ...interface{}) (r interface{})
func ToMapStruct ¶
func ToMapStruct(st IToMap, val interface{}, args ...interface{})
func ToMapStructByType ¶
func ToMapStructByType(val interface{}, args ...interface{}) (r interface{})
Types ¶
type IFromMap ¶
type IFromMap interface {
FromMap(m map[string]interface{}, args ...interface{})
}
func StructFromValue ¶
type IStructName ¶
type IStructName interface {
StructName() string
}
Click to show internal directories.
Click to hide internal directories.