xmap

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clone

func Clone(m map[string]interface{}, fields ...interface{}) map[string]interface{}

拷贝map fields 可传字段列表字符串,字符串数组,或map,如果为map可设置默认值

func GetArray

func GetArray(m map[string]interface{}, key string, def ...[]interface{}) []interface{}

func GetBool

func GetBool(m map[string]interface{}, key string, def ...bool) bool

func GetFloat32

func GetFloat32(m map[string]interface{}, key string, def ...float32) float32

func GetFloat64

func GetFloat64(m map[string]interface{}, key string, def ...float64) float64

func GetInt

func GetInt(m map[string]interface{}, key string, def ...int) int

func GetInt16

func GetInt16(m map[string]interface{}, key string, def ...int16) int16

func GetInt32

func GetInt32(m map[string]interface{}, key string, def ...int32) int32

func GetInt64

func GetInt64(m map[string]interface{}, key string, def ...int64) int64

func GetInt8

func GetInt8(m map[string]interface{}, key string, def ...int8) int8

func GetInterface

func GetInterface(m map[string]interface{}, key string, def ...interface{}) interface{}

func GetMap

func GetMap(m map[string]interface{}, key string, def ...map[string]interface{}) map[string]interface{}

func GetPathArray

func GetPathArray(m map[string]interface{}, path string, def ...[]interface{}) []interface{}

func GetPathBool

func GetPathBool(m map[string]interface{}, path string, def ...bool) bool

func GetPathFloat

func GetPathFloat(m map[string]interface{}, path string, def ...float32) float32

func GetPathFloat64

func GetPathFloat64(m map[string]interface{}, path string, def ...float64) float64

func GetPathInt

func GetPathInt(m map[string]interface{}, path string, def ...int) int

func GetPathInt16

func GetPathInt16(m map[string]interface{}, path string, def ...int16) int16

func GetPathInt32

func GetPathInt32(m map[string]interface{}, path string, def ...int32) int32

func GetPathInt64

func GetPathInt64(m map[string]interface{}, path string, def ...int64) int64

func GetPathInt8

func GetPathInt8(m map[string]interface{}, path string, def ...int8) int8

func GetPathInterface

func GetPathInterface(m map[string]interface{}, path string, def ...interface{}) interface{}

func GetPathMap

func GetPathMap(m map[string]interface{}, path string, def ...map[string]interface{}) map[string]interface{}

func GetPathString

func GetPathString(m map[string]interface{}, path string, def ...string) string

func GetPathTime

func GetPathTime(m map[string]interface{}, path string, def ...time.Time) time.Time

func GetPathUint

func GetPathUint(m map[string]interface{}, path string, def ...uint) uint

func GetPathUint16

func GetPathUint16(m map[string]interface{}, path string, def ...uint16) uint16

func GetPathUint32

func GetPathUint32(m map[string]interface{}, path string, def ...uint32) uint32

func GetPathUint64

func GetPathUint64(m map[string]interface{}, path string, def ...uint64) uint64

func GetPathUint8

func GetPathUint8(m map[string]interface{}, path string, def ...uint8) uint8

func GetString

func GetString(m map[string]interface{}, key string, def ...string) string

func GetTime

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

func GetUint

func GetUint(m map[string]interface{}, key string, def ...uint) uint

func GetUint16

func GetUint16(m map[string]interface{}, key string, def ...uint16) uint16

func GetUint32

func GetUint32(m map[string]interface{}, key string, def ...uint32) uint32

func GetUint64

func GetUint64(m map[string]interface{}, key string, def ...uint64) uint64

func GetUint8

func GetUint8(m map[string]interface{}, key string, def ...uint8) uint8

func ToKeyString

func ToKeyString(m map[string]interface{}) string

map转换成可作为键名的字符串

Types

type TAnyAnyMap

type TAnyAnyMap map[interface{}]interface{}

func NewAnyAnyMap

func NewAnyAnyMap(mp ...map[interface{}]interface{}) TAnyAnyMap

func (TAnyAnyMap) Flip

func (mp TAnyAnyMap) Flip() TAnyAnyMap

交换键值

func (TAnyAnyMap) GetArray

func (mp TAnyAnyMap) GetArray(key interface{}, def ...[]interface{}) []interface{}

func (TAnyAnyMap) GetBool

func (mp TAnyAnyMap) GetBool(key interface{}, def ...bool) bool

func (TAnyAnyMap) GetFloat32

func (mp TAnyAnyMap) GetFloat32(key interface{}, def ...float32) float32

func (TAnyAnyMap) GetFloat64

func (mp TAnyAnyMap) GetFloat64(key interface{}, def ...float64) float64

func (TAnyAnyMap) GetInt

func (mp TAnyAnyMap) GetInt(key interface{}, def ...int) int

func (TAnyAnyMap) GetInt16

func (mp TAnyAnyMap) GetInt16(key interface{}, def ...int16) int16

func (TAnyAnyMap) GetInt32

func (mp TAnyAnyMap) GetInt32(key interface{}, def ...int32) int32

func (TAnyAnyMap) GetInt64

func (mp TAnyAnyMap) GetInt64(key interface{}, def ...int64) int64

func (TAnyAnyMap) GetInt8

func (mp TAnyAnyMap) GetInt8(key interface{}, def ...int8) int8

func (TAnyAnyMap) GetInterface

func (mp TAnyAnyMap) GetInterface(key interface{}, def ...interface{}) interface{}

func (TAnyAnyMap) GetMap

func (mp TAnyAnyMap) GetMap(key interface{}, def ...map[string]interface{}) interface{}

func (TAnyAnyMap) GetString

func (mp TAnyAnyMap) GetString(key interface{}, def ...string) string

func (TAnyAnyMap) GetTime

func (mp TAnyAnyMap) GetTime(key interface{}, def ...time.Time) time.Time

func (TAnyAnyMap) GetUint

func (mp TAnyAnyMap) GetUint(key interface{}, def ...uint) uint

func (TAnyAnyMap) GetUint16

func (mp TAnyAnyMap) GetUint16(key interface{}, def ...uint16) uint16

func (TAnyAnyMap) GetUint32

func (mp TAnyAnyMap) GetUint32(key interface{}, def ...uint32) uint32

func (TAnyAnyMap) GetUint64

func (mp TAnyAnyMap) GetUint64(key interface{}, def ...uint64) uint64

func (TAnyAnyMap) GetUint8

func (mp TAnyAnyMap) GetUint8(key interface{}, def ...uint8) uint8

func (TAnyAnyMap) Map

func (mp TAnyAnyMap) Map() map[interface{}]interface{}

func (TAnyAnyMap) ToArray

func (mp TAnyAnyMap) ToArray() [][]interface{}

type TIntAnyMap

type TIntAnyMap map[int]interface{}

func NewIntAnyMap

func NewIntAnyMap(mp ...map[int]interface{}) TIntAnyMap

func (TIntAnyMap) GetArray

func (mp TIntAnyMap) GetArray(key int, def ...[]interface{}) []interface{}

func (TIntAnyMap) GetBool

func (mp TIntAnyMap) GetBool(key int, def ...bool) bool

func (TIntAnyMap) GetFloat32

func (mp TIntAnyMap) GetFloat32(key int, def ...float32) float32

func (TIntAnyMap) GetFloat64

func (mp TIntAnyMap) GetFloat64(key int, def ...float64) float64

func (TIntAnyMap) GetInt

func (mp TIntAnyMap) GetInt(key int, def ...int) int

func (TIntAnyMap) GetInt16

func (mp TIntAnyMap) GetInt16(key int, def ...int16) int16

func (TIntAnyMap) GetInt32

func (mp TIntAnyMap) GetInt32(key int, def ...int32) int32

func (TIntAnyMap) GetInt64

func (mp TIntAnyMap) GetInt64(key int, def ...int64) int64

func (TIntAnyMap) GetInt8

func (mp TIntAnyMap) GetInt8(key int, def ...int8) int8

func (TIntAnyMap) GetInterface

func (mp TIntAnyMap) GetInterface(key int, def ...interface{}) interface{}

func (TIntAnyMap) GetMap

func (mp TIntAnyMap) GetMap(key int, def ...map[string]interface{}) interface{}

func (TIntAnyMap) GetString

func (mp TIntAnyMap) GetString(key int, def ...string) string

func (TIntAnyMap) GetTime

func (mp TIntAnyMap) GetTime(key int, def ...time.Time) time.Time

func (TIntAnyMap) GetUint

func (mp TIntAnyMap) GetUint(key int, def ...uint) uint

func (TIntAnyMap) GetUint16

func (mp TIntAnyMap) GetUint16(key int, def ...uint16) uint16

func (TIntAnyMap) GetUint32

func (mp TIntAnyMap) GetUint32(key int, def ...uint32) uint32

func (TIntAnyMap) GetUint64

func (mp TIntAnyMap) GetUint64(key int, def ...uint64) uint64

func (TIntAnyMap) GetUint8

func (mp TIntAnyMap) GetUint8(key int, def ...uint8) uint8

func (TIntAnyMap) Map

func (mp TIntAnyMap) Map() map[int]interface{}

func (TIntAnyMap) ToArray

func (mp TIntAnyMap) ToArray() [][]interface{}

type TIntStrMap

type TIntStrMap map[int]string

func NewIntStrMap

func NewIntStrMap(mp ...map[int]string) TIntStrMap

func (TIntStrMap) GetString

func (mp TIntStrMap) GetString(key int, def ...string) string

func (TIntStrMap) Map

func (mp TIntStrMap) Map() map[int]string

func (TIntStrMap) ToArray

func (mp TIntStrMap) ToArray() [][]interface{}

type TStrIntMap

type TStrIntMap map[string]int

func NewStrIntMap

func NewStrIntMap(mp ...map[string]int) TStrIntMap

func (TStrIntMap) GetBool

func (mp TStrIntMap) GetBool(key string, def ...bool) bool

func (TStrIntMap) GetFloat32

func (mp TStrIntMap) GetFloat32(key string, def ...float32) float32

func (TStrIntMap) GetFloat64

func (mp TStrIntMap) GetFloat64(key string, def ...float64) float64

func (TStrIntMap) GetInt

func (mp TStrIntMap) GetInt(key string, def ...int) int

func (TStrIntMap) GetInt16

func (mp TStrIntMap) GetInt16(key string, def ...int16) int16

func (TStrIntMap) GetInt32

func (mp TStrIntMap) GetInt32(key string, def ...int32) int32

func (TStrIntMap) GetInt64

func (mp TStrIntMap) GetInt64(key string, def ...int64) int64

func (TStrIntMap) GetInt8

func (mp TStrIntMap) GetInt8(key string, def ...int8) int8

func (TStrIntMap) GetString

func (mp TStrIntMap) GetString(key string, def ...int) int

func (TStrIntMap) GetUint

func (mp TStrIntMap) GetUint(key string, def ...uint) uint

func (TStrIntMap) GetUint16

func (mp TStrIntMap) GetUint16(key string, def ...uint16) uint16

func (TStrIntMap) GetUint32

func (mp TStrIntMap) GetUint32(key string, def ...uint32) uint32

func (TStrIntMap) GetUint64

func (mp TStrIntMap) GetUint64(key string, def ...uint64) uint64

func (TStrIntMap) GetUint8

func (mp TStrIntMap) GetUint8(key string, def ...uint8) uint8

func (TStrIntMap) Map

func (mp TStrIntMap) Map() map[string]int

func (TStrIntMap) ToArray

func (mp TStrIntMap) ToArray() [][]interface{}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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