const ( URLValuesSliceKeySuffixEmpty = "" URLValuesSliceKeySuffixArray = "[]" URLValuesSliceKeySuffixIndex = "[i]" )
const ( // PathSeparator is the character used to separate the elements // of the keypath. // // For example, `location.address.city` PathSeparator string = "." )
SignatureSeparator is the character that is used to separate the Base64 string from the security signature.
const SignatureSeparator = "_"
Nil represents a nil Map.
var Nil = New(nil)
func HashWithKey(data, key string) string
HashWithKey hashes the specified string using the security key
func SetURLValuesSliceKeySuffix(s string) error
SetURLValuesSliceKeySuffix sets the character that is used to specify a suffix for slices parsed by URLValues. If the suffix is set to "[i]", then the index of the slice is used in place of i Ex: Suffix "[]" would have the form a[]=b&a[]=c OR Suffix "[i]" would have the form a[0]=b&a[1]=c OR Suffix "" would have the form a=b&a=c
MSIConvertable is an interface that defines methods for converting your custom types to a map[string]interface{} representation.
type MSIConvertable interface { // MSI gets a map[string]interface{} (msi) representing the // object. MSI() map[string]interface{} }
Map provides extended functionality for working with untyped data, in particular map[string]interface (msi).
type Map map[string]interface{}
func FromBase64(base64String string) (Map, error)
FromBase64 creates a new Obj containing the data specified in the Base64 string.
The string is an encoded JSON string returned by Base64
func FromJSON(jsonString string) (Map, error)
FromJSON creates a new Map containing the data specified in the jsonString.
Returns an error if the JSON is invalid.
func FromJSONSlice(jsonString string) ([]Map, error)
FromJSONSlice creates a new slice of Map containing the data specified in the jsonString. Works with jsons with a top level array
Returns an error if the JSON is invalid.
func FromSignedBase64(base64String, key string) (Map, error)
FromSignedBase64 creates a new Obj containing the data specified in the Base64 string.
The string is an encoded JSON string returned by SignedBase64
func FromURLQuery(query string) (Map, error)
FromURLQuery generates a new Obj by parsing the specified query.
For queries with multiple values, the first value is selected.
func MSI(keyAndValuePairs ...interface{}) Map
MSI creates a map[string]interface{} and puts it inside a new Map.
The arguments follow a key, value pattern.
Returns nil if any key argument is non-string or if there are an odd number of arguments.
To easily create Maps:
m := objx.MSI("name", "Mat", "age", 29, "subobj", objx.MSI("active", true)) // creates an Map equivalent to m := objx.Map{"name": "Mat", "age": 29, "subobj": objx.Map{"active": true}}
func MustFromBase64(base64String string) Map
MustFromBase64 creates a new Obj containing the data specified in the Base64 string and panics if there is an error.
The string is an encoded JSON string returned by Base64
func MustFromJSON(jsonString string) Map
MustFromJSON creates a new Map containing the data specified in the jsonString.
Panics if the JSON is invalid.
func MustFromJSONSlice(jsonString string) []Map
MustFromJSONSlice creates a new slice of Map containing the data specified in the jsonString. Works with jsons with a top level array
Panics if the JSON is invalid.
func MustFromSignedBase64(base64String, key string) Map
MustFromSignedBase64 creates a new Obj containing the data specified in the Base64 string and panics if there is an error.
The string is an encoded JSON string returned by Base64
func MustFromURLQuery(query string) Map
MustFromURLQuery generates a new Obj by parsing the specified query.
For queries with multiple values, the first value is selected.
Panics if it encounters an error
func New(data interface{}) Map
New creates a new Map containing the map[string]interface{} in the data argument. If the data argument is not a map[string]interface, New attempts to call the MSI() method on the MSIConvertable interface to create one.
func (m Map) Base64() (string, error)
Base64 converts the contained object to a Base64 string representation of the JSON string representation
func (m Map) Copy() Map
Copy creates a shallow copy of the Obj.
func (m Map) Exclude(exclude []string) Map
Exclude returns a new Map with the keys in the specified []string excluded.
func (m Map) Get(selector string) *Value
Get gets the value using the specified selector and returns it inside a new Obj object.
If it cannot find the value, Get will return a nil value inside an instance of Obj.
Get can only operate directly on map[string]interface{} and []interface.
To access the title of the third chapter of the second book, do:
o.Get("books[1].chapters[2].title")
func (m Map) Has(selector string) bool
Has gets whether there is something at the specified selector or not.
If m is nil, Has will always return false.
func (m Map) JSON() (string, error)
JSON converts the contained object to a JSON string representation
func (m Map) Merge(merge Map) Map
Merge blends the specified map with a copy of this map and returns the result.
Keys that appear in both will be selected from the specified map. This method requires that the wrapped object be a map[string]interface{}
func (m Map) MergeHere(merge Map) Map
MergeHere blends the specified map with this map and returns the current map.
Keys that appear in both will be selected from the specified map. The original map will be modified. This method requires that the wrapped object be a map[string]interface{}
func (m Map) MustBase64() string
MustBase64 converts the contained object to a Base64 string representation of the JSON string representation and panics if there is an error
func (m Map) MustJSON() string
MustJSON converts the contained object to a JSON string representation and panics if there is an error
func (m Map) MustSignedBase64(key string) string
MustSignedBase64 converts the contained object to a Base64 string representation of the JSON string representation and signs it using the provided key and panics if there is an error
func (m Map) Set(selector string, value interface{}) Map
Set sets the value using the specified selector and returns the object on which Set was called.
Set can only operate directly on map[string]interface{} and []interface
To set the title of the third chapter of the second book, do:
o.Set("books[1].chapters[2].title","Time to Go")
func (m Map) SignedBase64(key string) (string, error)
SignedBase64 converts the contained object to a Base64 string representation of the JSON string representation and signs it using the provided key.
func (m Map) Transform(transformer func(key string, value interface{}) (string, interface{})) Map
Transform builds a new Obj giving the transformer a chance to change the keys and values as it goes. This method requires that the wrapped object be a map[string]interface{}
func (m Map) TransformKeys(mapping map[string]string) Map
TransformKeys builds a new map using the specified key mapping.
Unspecified keys will be unaltered. This method requires that the wrapped object be a map[string]interface{}
func (m Map) URLQuery() (string, error)
URLQuery gets an encoded URL query representing the given Obj. This function requires that the wrapped object be a map[string]interface{}
func (m Map) URLValues() url.Values
URLValues creates a url.Values object from an Obj. This function requires that the wrapped object be a map[string]interface{}
func (m Map) Value() *Value
Value returns the internal value instance
Value provides methods for extracting interface{} data in various types.
type Value struct {
// contains filtered or unexported fields
}
func (v *Value) Bool(optionalDefault ...bool) bool
Bool gets the value as a bool, returns the optionalDefault value or a system default object if the value is the wrong type.
func (v *Value) BoolSlice(optionalDefault ...[]bool) []bool
BoolSlice gets the value as a []bool, returns the optionalDefault value or nil if the value is not a []bool.
func (v *Value) CollectBool(collector func(int, bool) interface{}) *Value
CollectBool uses the specified collector function to collect a value for each of the bools in the slice. The data returned will be a []interface{}.
func (v *Value) CollectComplex128(collector func(int, complex128) interface{}) *Value
CollectComplex128 uses the specified collector function to collect a value for each of the complex128s in the slice. The data returned will be a []interface{}.
func (v *Value) CollectComplex64(collector func(int, complex64) interface{}) *Value
CollectComplex64 uses the specified collector function to collect a value for each of the complex64s in the slice. The data returned will be a []interface{}.
func (v *Value) CollectFloat32(collector func(int, float32) interface{}) *Value
CollectFloat32 uses the specified collector function to collect a value for each of the float32s in the slice. The data returned will be a []interface{}.
func (v *Value) CollectFloat64(collector func(int, float64) interface{}) *Value
CollectFloat64 uses the specified collector function to collect a value for each of the float64s in the slice. The data returned will be a []interface{}.
func (v *Value) CollectInt(collector func(int, int) interface{}) *Value
CollectInt uses the specified collector function to collect a value for each of the ints in the slice. The data returned will be a []interface{}.
func (v *Value) CollectInt16(collector func(int, int16) interface{}) *Value
CollectInt16 uses the specified collector function to collect a value for each of the int16s in the slice. The data returned will be a []interface{}.
func (v *Value) CollectInt32(collector func(int, int32) interface{}) *Value
CollectInt32 uses the specified collector function to collect a value for each of the int32s in the slice. The data returned will be a []interface{}.
func (v *Value) CollectInt64(collector func(int, int64) interface{}) *Value
CollectInt64 uses the specified collector function to collect a value for each of the int64s in the slice. The data returned will be a []interface{}.
func (v *Value) CollectInt8(collector func(int, int8) interface{}) *Value
CollectInt8 uses the specified collector function to collect a value for each of the int8s in the slice. The data returned will be a []interface{}.
func (v *Value) CollectInter(collector func(int, interface{}) interface{}) *Value
CollectInter uses the specified collector function to collect a value for each of the interface{}s in the slice. The data returned will be a []interface{}.
func (v *Value) CollectMSI(collector func(int, map[string]interface{}) interface{}) *Value
CollectMSI uses the specified collector function to collect a value for each of the map[string]interface{}s in the slice. The data returned will be a []interface{}.
func (v *Value) CollectObjxMap(collector func(int, Map) interface{}) *Value
CollectObjxMap uses the specified collector function to collect a value for each of the (Map)s in the slice. The data returned will be a []interface{}.
func (v *Value) CollectStr(collector func(int, string) interface{}) *Value
CollectStr uses the specified collector function to collect a value for each of the strings in the slice. The data returned will be a []interface{}.
func (v *Value) CollectUint(collector func(int, uint) interface{}) *Value
CollectUint uses the specified collector function to collect a value for each of the uints in the slice. The data returned will be a []interface{}.
func (v *Value) CollectUint16(collector func(int, uint16) interface{}) *Value
CollectUint16 uses the specified collector function to collect a value for each of the uint16s in the slice. The data returned will be a []interface{}.
func (v *Value) CollectUint32(collector func(int, uint32) interface{}) *Value
CollectUint32 uses the specified collector function to collect a value for each of the uint32s in the slice. The data returned will be a []interface{}.
func (v *Value) CollectUint64(collector func(int, uint64) interface{}) *Value
CollectUint64 uses the specified collector function to collect a value for each of the uint64s in the slice. The data returned will be a []interface{}.
func (v *Value) CollectUint8(collector func(int, uint8) interface{}) *Value
CollectUint8 uses the specified collector function to collect a value for each of the uint8s in the slice. The data returned will be a []interface{}.
func (v *Value) CollectUintptr(collector func(int, uintptr) interface{}) *Value
CollectUintptr uses the specified collector function to collect a value for each of the uintptrs in the slice. The data returned will be a []interface{}.
func (v *Value) Complex128(optionalDefault ...complex128) complex128
Complex128 gets the value as a complex128, returns the optionalDefault value or a system default object if the value is the wrong type.
func (v *Value) Complex128Slice(optionalDefault ...[]complex128) []complex128
Complex128Slice gets the value as a []complex128, returns the optionalDefault value or nil if the value is not a []complex128.
func (v *Value) Complex64(optionalDefault ...complex64) complex64
Complex64 gets the value as a complex64, returns the optionalDefault value or a system default object if the value is the wrong type.
func (v *Value) Complex64Slice(optionalDefault ...[]complex64) []complex64
Complex64Slice gets the value as a []complex64, returns the optionalDefault value or nil if the value is not a []complex64.
func (v *Value) Data() interface{}
Data returns the raw data contained by this Value
func (v *Value) EachBool(callback func(int, bool) bool) *Value
EachBool calls the specified callback for each object in the []bool.
Panics if the object is the wrong type.
func (v *Value) EachComplex128(callback func(int, complex128) bool) *Value
EachComplex128 calls the specified callback for each object in the []complex128.
Panics if the object is the wrong type.
func (v *Value) EachComplex64(callback func(int, complex64) bool) *Value
EachComplex64 calls the specified callback for each object in the []complex64.
Panics if the object is the wrong type.
func (v *Value) EachFloat32(callback func(int, float32) bool) *Value
EachFloat32 calls the specified callback for each object in the []float32.
Panics if the object is the wrong type.
func (v *Value) EachFloat64(callback func(int, float64) bool) *Value
EachFloat64 calls the specified callback for each object in the []float64.
Panics if the object is the wrong type.
func (v *Value) EachInt(callback func(int, int) bool) *Value
EachInt calls the specified callback for each object in the []int.
Panics if the object is the wrong type.
func (v *Value) EachInt16(callback func(int, int16) bool) *Value
EachInt16 calls the specified callback for each object in the []int16.
Panics if the object is the wrong type.
func (v *Value) EachInt32(callback func(int, int32) bool) *Value
EachInt32 calls the specified callback for each object in the []int32.
Panics if the object is the wrong type.
func (v *Value) EachInt64(callback func(int, int64) bool) *Value
EachInt64 calls the specified callback for each object in the []int64.
Panics if the object is the wrong type.
func (v *Value) EachInt8(callback func(int, int8) bool) *Value
EachInt8 calls the specified callback for each object in the []int8.
Panics if the object is the wrong type.
func (v *Value) EachInter(callback func(int, interface{}) bool) *Value
EachInter calls the specified callback for each object in the []interface{}.
Panics if the object is the wrong type.
func (v *Value) EachMSI(callback func(int, map[string]interface{}) bool) *Value
EachMSI calls the specified callback for each object in the []map[string]interface{}.
Panics if the object is the wrong type.
func (v *Value) EachObjxMap(callback func(int, Map) bool) *Value
EachObjxMap calls the specified callback for each object in the [](Map).
Panics if the object is the wrong type.
func (v *Value) EachStr(callback func(int, string) bool) *Value
EachStr calls the specified callback for each object in the []string.
Panics if the object is the wrong type.
func (v *Value) EachUint(callback func(int, uint) bool) *Value
EachUint calls the specified callback for each object in the []uint.
Panics if the object is the wrong type.
func (v *Value) EachUint16(callback func(int, uint16) bool) *Value
EachUint16 calls the specified callback for each object in the []uint16.
Panics if the object is the wrong type.
func (v *Value) EachUint32(callback func(int, uint32) bool) *Value
EachUint32 calls the specified callback for each object in the []uint32.
Panics if the object is the wrong type.
func (v *Value) EachUint64(callback func(int, uint64) bool) *Value
EachUint64 calls the specified callback for each object in the []uint64.
Panics if the object is the wrong type.
func (v *Value) EachUint8(callback func(int, uint8) bool) *Value
EachUint8 calls the specified callback for each object in the []uint8.
Panics if the object is the wrong type.
func (v *Value) EachUintptr(callback func(int, uintptr) bool) *Value
EachUintptr calls the specified callback for each object in the []uintptr.
Panics if the object is the wrong type.
func (v *Value) Float32(optionalDefault ...float32) float32
Float32 gets the value as a float32, returns the optionalDefault value or a system default object if the value is the wrong type.
func (v *Value) Float32Slice(optionalDefault ...[]float32) []float32
Float32Slice gets the value as a []float32, returns the optionalDefault value or nil if the value is not a []float32.
func (v *Value) Float64(optionalDefault ...float64) float64
Float64 gets the value as a float64, returns the optionalDefault value or a system default object if the value is the wrong type.
func (v *Value) Float64Slice(optionalDefault ...[]float64) []float64
Float64Slice gets the value as a []float64, returns the optionalDefault value or nil if the value is not a []float64.
func (v *Value) GroupBool(grouper func(int, bool) string) *Value
GroupBool uses the specified grouper function to group the items keyed by the return of the grouper. The object contained in the result will contain a map[string][]bool.
func (v *Value) GroupComplex128(grouper func(int, complex128) string) *Value
GroupComplex128 uses the specified grouper function to group the items keyed by the return of the grouper. The object contained in the result will contain a map[string][]complex128.
func (v *Value) GroupComplex64(grouper func(int, complex64) string) *Value
GroupComplex64 uses the specified grouper function to group the items keyed by the return of the grouper. The object contained in the result will contain a map[string][]complex64.
func (v *Value) GroupFloat32(grouper func(int, float32) string) *Value
GroupFloat32 uses the specified grouper function to group the items keyed by the return of the grouper. The object contained in the result will contain a map[string][]float32.
func (v *Value) GroupFloat64(grouper func(int, float64) string) *Value
GroupFloat64 uses the specified grouper function to group the items keyed by the return of the grouper. The object contained in the result will contain a map[string][]float64.
func (v *Value) GroupInt(grouper func(int, int) string) *Value
GroupInt uses the specified grouper function to group the items keyed by the return of the grouper. The object contained in the result will contain a map[string][]int.
func (v *Value) GroupInt16(grouper func(int, int16) string) *Value
GroupInt16 uses the specified grouper function to group the items keyed by the return of the grouper. The object contained in the result will contain a map[string][]int16.
func (v *Value) GroupInt32(grouper func(int, int32) string) *Value
GroupInt32 uses the specified grouper function to group the items keyed by the return of the grouper. The object contained in the result will contain a map[string][]int32.
func (v *Value) GroupInt64(grouper func(int, int64) string) *Value
GroupInt64 uses the specified grouper function to group the items keyed by the return of the grouper. The object contained in the result will contain a map[string][]int64.
func (v *Value) GroupInt8(grouper func(int, int8) string) *Value
GroupInt8 uses the specified grouper function to group the items keyed by the return of the grouper. The object contained in the result will contain a map[string][]int8.
func (v *Value) GroupInter(grouper func(int, interface{}) string) *Value
GroupInter uses the specified grouper function to group the items keyed by the return of the grouper. The object contained in the result will contain a map[string][]interface{}.
func (v *Value) GroupMSI(grouper func(int, map[string]interface{}) string) *Value
GroupMSI uses the specified grouper function to group the items keyed by the return of the grouper. The object contained in the result will contain a map[string][]map[string]interface{}.
func (v *Value) GroupObjxMap(grouper func(int, Map) string) *Value
GroupObjxMap uses the specified grouper function to group the items keyed by the return of the grouper. The object contained in the result will contain a map[string][](Map).
func (v *Value) GroupStr(grouper func(int, string) string) *Value
GroupStr uses the specified grouper function to group the items keyed by the return of the grouper. The object contained in the result will contain a map[string][]string.
func (v *Value) GroupUint(grouper func(int, uint) string) *Value
GroupUint uses the specified grouper function to group the items keyed by the return of the grouper. The object contained in the result will contain a map[string][]uint.
func (v *Value) GroupUint16(grouper func(int, uint16) string) *Value
GroupUint16 uses the specified grouper function to group the items keyed by the return of the grouper. The object contained in the result will contain a map[string][]uint16.
func (v *Value) GroupUint32(grouper func(int, uint32) string) *Value
GroupUint32 uses the specified grouper function to group the items keyed by the return of the grouper. The object contained in the result will contain a map[string][]uint32.
func (v *Value) GroupUint64(grouper func(int, uint64) string) *Value
GroupUint64 uses the specified grouper function to group the items keyed by the return of the grouper. The object contained in the result will contain a map[string][]uint64.
func (v *Value) GroupUint8(grouper func(int, uint8) string) *Value
GroupUint8 uses the specified grouper function to group the items keyed by the return of the grouper. The object contained in the result will contain a map[string][]uint8.
func (v *Value) GroupUintptr(grouper func(int, uintptr) string) *Value
GroupUintptr uses the specified grouper function to group the items keyed by the return of the grouper. The object contained in the result will contain a map[string][]uintptr.
func (v *Value) Int(optionalDefault ...int) int
Int gets the value as a int, returns the optionalDefault value or a system default object if the value is the wrong type.
func (v *Value) Int16(optionalDefault ...int16) int16
Int16 gets the value as a int16, returns the optionalDefault value or a system default object if the value is the wrong type.
func (v *Value) Int16Slice(optionalDefault ...[]int16) []int16
Int16Slice gets the value as a []int16, returns the optionalDefault value or nil if the value is not a []int16.
func (v *Value) Int32(optionalDefault ...int32) int32
Int32 gets the value as a int32, returns the optionalDefault value or a system default object if the value is the wrong type.
func (v *Value) Int32Slice(optionalDefault ...[]int32) []int32
Int32Slice gets the value as a []int32, returns the optionalDefault value or nil if the value is not a []int32.
func (v *Value) Int64(optionalDefault ...int64) int64
Int64 gets the value as a int64, returns the optionalDefault value or a system default object if the value is the wrong type.
func (v *Value) Int64Slice(optionalDefault ...[]int64) []int64
Int64Slice gets the value as a []int64, returns the optionalDefault value or nil if the value is not a []int64.
func (v *Value) Int8(optionalDefault ...int8) int8
Int8 gets the value as a int8, returns the optionalDefault value or a system default object if the value is the wrong type.
func (v *Value) Int8Slice(optionalDefault ...[]int8) []int8
Int8Slice gets the value as a []int8, returns the optionalDefault value or nil if the value is not a []int8.
func (v *Value) IntSlice(optionalDefault ...[]int) []int
IntSlice gets the value as a []int, returns the optionalDefault value or nil if the value is not a []int.
func (v *Value) Inter(optionalDefault ...interface{}) interface{}
Inter gets the value as a interface{}, returns the optionalDefault value or a system default object if the value is the wrong type.
func (v *Value) InterSlice(optionalDefault ...[]interface{}) []interface{}
InterSlice gets the value as a []interface{}, returns the optionalDefault value or nil if the value is not a []interface{}.
func (v *Value) IsBool() bool
IsBool gets whether the object contained is a bool or not.
func (v *Value) IsBoolSlice() bool
IsBoolSlice gets whether the object contained is a []bool or not.
func (v *Value) IsComplex128() bool
IsComplex128 gets whether the object contained is a complex128 or not.
func (v *Value) IsComplex128Slice() bool
IsComplex128Slice gets whether the object contained is a []complex128 or not.
func (v *Value) IsComplex64() bool
IsComplex64 gets whether the object contained is a complex64 or not.
func (v *Value) IsComplex64Slice() bool
IsComplex64Slice gets whether the object contained is a []complex64 or not.
func (v *Value) IsFloat32() bool
IsFloat32 gets whether the object contained is a float32 or not.
func (v *Value) IsFloat32Slice() bool
IsFloat32Slice gets whether the object contained is a []float32 or not.
func (v *Value) IsFloat64() bool
IsFloat64 gets whether the object contained is a float64 or not.
func (v *Value) IsFloat64Slice() bool
IsFloat64Slice gets whether the object contained is a []float64 or not.
func (v *Value) IsInt() bool
IsInt gets whether the object contained is a int or not.
func (v *Value) IsInt16() bool
IsInt16 gets whether the object contained is a int16 or not.
func (v *Value) IsInt16Slice() bool
IsInt16Slice gets whether the object contained is a []int16 or not.
func (v *Value) IsInt32() bool
IsInt32 gets whether the object contained is a int32 or not.
func (v *Value) IsInt32Slice() bool
IsInt32Slice gets whether the object contained is a []int32 or not.
func (v *Value) IsInt64() bool
IsInt64 gets whether the object contained is a int64 or not.
func (v *Value) IsInt64Slice() bool
IsInt64Slice gets whether the object contained is a []int64 or not.
func (v *Value) IsInt8() bool
IsInt8 gets whether the object contained is a int8 or not.
func (v *Value) IsInt8Slice() bool
IsInt8Slice gets whether the object contained is a []int8 or not.
func (v *Value) IsIntSlice() bool
IsIntSlice gets whether the object contained is a []int or not.
func (v *Value) IsInter() bool
IsInter gets whether the object contained is a interface{} or not.
func (v *Value) IsInterSlice() bool
IsInterSlice gets whether the object contained is a []interface{} or not.
func (v *Value) IsMSI() bool
IsMSI gets whether the object contained is a map[string]interface{} or not.
func (v *Value) IsMSISlice() bool
IsMSISlice gets whether the object contained is a []map[string]interface{} or not.
func (v *Value) IsNil() bool
IsNil gets whether the data is nil or not.
func (v *Value) IsObjxMap() bool
IsObjxMap gets whether the object contained is a (Map) or not.
func (v *Value) IsObjxMapSlice() bool
IsObjxMapSlice gets whether the object contained is a [](Map) or not.
func (v *Value) IsStr() bool
IsStr gets whether the object contained is a string or not.
func (v *Value) IsStrSlice() bool
IsStrSlice gets whether the object contained is a []string or not.
func (v *Value) IsUint() bool
IsUint gets whether the object contained is a uint or not.
func (v *Value) IsUint16() bool
IsUint16 gets whether the object contained is a uint16 or not.
func (v *Value) IsUint16Slice() bool
IsUint16Slice gets whether the object contained is a []uint16 or not.
func (v *Value) IsUint32() bool
IsUint32 gets whether the object contained is a uint32 or not.
func (v *Value) IsUint32Slice() bool
IsUint32Slice gets whether the object contained is a []uint32 or not.
func (v *Value) IsUint64() bool
IsUint64 gets whether the object contained is a uint64 or not.
func (v *Value) IsUint64Slice() bool
IsUint64Slice gets whether the object contained is a []uint64 or not.
func (v *Value) IsUint8() bool
IsUint8 gets whether the object contained is a uint8 or not.
func (v *Value) IsUint8Slice() bool
IsUint8Slice gets whether the object contained is a []uint8 or not.
func (v *Value) IsUintSlice() bool
IsUintSlice gets whether the object contained is a []uint or not.
func (v *Value) IsUintptr() bool
IsUintptr gets whether the object contained is a uintptr or not.
func (v *Value) IsUintptrSlice() bool
IsUintptrSlice gets whether the object contained is a []uintptr or not.
func (v *Value) MSI(optionalDefault ...map[string]interface{}) map[string]interface{}
MSI gets the value as a map[string]interface{}, returns the optionalDefault value or a system default object if the value is the wrong type.
func (v *Value) MSISlice(optionalDefault ...[]map[string]interface{}) []map[string]interface{}
MSISlice gets the value as a []map[string]interface{}, returns the optionalDefault value or nil if the value is not a []map[string]interface{}.
func (v *Value) MustBool() bool
MustBool gets the value as a bool.
Panics if the object is not a bool.
func (v *Value) MustBoolSlice() []bool
MustBoolSlice gets the value as a []bool.
Panics if the object is not a []bool.
func (v *Value) MustComplex128() complex128
MustComplex128 gets the value as a complex128.
Panics if the object is not a complex128.
func (v *Value) MustComplex128Slice() []complex128
MustComplex128Slice gets the value as a []complex128.
Panics if the object is not a []complex128.
func (v *Value) MustComplex64() complex64
MustComplex64 gets the value as a complex64.
Panics if the object is not a complex64.
func (v *Value) MustComplex64Slice() []complex64
MustComplex64Slice gets the value as a []complex64.
Panics if the object is not a []complex64.
func (v *Value) MustFloat32() float32
MustFloat32 gets the value as a float32.
Panics if the object is not a float32.
func (v *Value) MustFloat32Slice() []float32
MustFloat32Slice gets the value as a []float32.
Panics if the object is not a []float32.
func (v *Value) MustFloat64() float64
MustFloat64 gets the value as a float64.
Panics if the object is not a float64.
func (v *Value) MustFloat64Slice() []float64
MustFloat64Slice gets the value as a []float64.
Panics if the object is not a []float64.
func (v *Value) MustInt() int
MustInt gets the value as a int.
Panics if the object is not a int.
func (v *Value) MustInt16() int16
MustInt16 gets the value as a int16.
Panics if the object is not a int16.
func (v *Value) MustInt16Slice() []int16
MustInt16Slice gets the value as a []int16.
Panics if the object is not a []int16.
func (v *Value) MustInt32() int32
MustInt32 gets the value as a int32.
Panics if the object is not a int32.
func (v *Value) MustInt32Slice() []int32
MustInt32Slice gets the value as a []int32.
Panics if the object is not a []int32.
func (v *Value) MustInt64() int64
MustInt64 gets the value as a int64.
Panics if the object is not a int64.
func (v *Value) MustInt64Slice() []int64
MustInt64Slice gets the value as a []int64.
Panics if the object is not a []int64.
func (v *Value) MustInt8() int8
MustInt8 gets the value as a int8.
Panics if the object is not a int8.
func (v *Value) MustInt8Slice() []int8
MustInt8Slice gets the value as a []int8.
Panics if the object is not a []int8.
func (v *Value) MustIntSlice() []int
MustIntSlice gets the value as a []int.
Panics if the object is not a []int.
func (v *Value) MustInter() interface{}
MustInter gets the value as a interface{}.
Panics if the object is not a interface{}.
func (v *Value) MustInterSlice() []interface{}
MustInterSlice gets the value as a []interface{}.
Panics if the object is not a []interface{}.
func (v *Value) MustMSI() map[string]interface{}
MustMSI gets the value as a map[string]interface{}.
Panics if the object is not a map[string]interface{}.
func (v *Value) MustMSISlice() []map[string]interface{}
MustMSISlice gets the value as a []map[string]interface{}.
Panics if the object is not a []map[string]interface{}.
func (v *Value) MustObjxMap() Map
MustObjxMap gets the value as a (Map).
Panics if the object is not a (Map).
func (v *Value) MustObjxMapSlice() [](Map)
MustObjxMapSlice gets the value as a [](Map).
Panics if the object is not a [](Map).
func (v *Value) MustStr() string
MustStr gets the value as a string.
Panics if the object is not a string.
func (v *Value) MustStrSlice() []string
MustStrSlice gets the value as a []string.
Panics if the object is not a []string.
func (v *Value) MustUint() uint
MustUint gets the value as a uint.
Panics if the object is not a uint.
func (v *Value) MustUint16() uint16
MustUint16 gets the value as a uint16.
Panics if the object is not a uint16.
func (v *Value) MustUint16Slice() []uint16
MustUint16Slice gets the value as a []uint16.
Panics if the object is not a []uint16.
func (v *Value) MustUint32() uint32
MustUint32 gets the value as a uint32.
Panics if the object is not a uint32.
func (v *Value) MustUint32Slice() []uint32
MustUint32Slice gets the value as a []uint32.
Panics if the object is not a []uint32.
func (v *Value) MustUint64() uint64
MustUint64 gets the value as a uint64.
Panics if the object is not a uint64.
func (v *Value) MustUint64Slice() []uint64
MustUint64Slice gets the value as a []uint64.
Panics if the object is not a []uint64.
func (v *Value) MustUint8() uint8
MustUint8 gets the value as a uint8.
Panics if the object is not a uint8.
func (v *Value) MustUint8Slice() []uint8
MustUint8Slice gets the value as a []uint8.
Panics if the object is not a []uint8.
func (v *Value) MustUintSlice() []uint
MustUintSlice gets the value as a []uint.
Panics if the object is not a []uint.
func (v *Value) MustUintptr() uintptr
MustUintptr gets the value as a uintptr.
Panics if the object is not a uintptr.
func (v *Value) MustUintptrSlice() []uintptr
MustUintptrSlice gets the value as a []uintptr.
Panics if the object is not a []uintptr.
func (v *Value) ObjxMap(optionalDefault ...(Map)) Map
ObjxMap gets the value as a (Map), returns the optionalDefault value or a system default object if the value is the wrong type.
func (v *Value) ObjxMapSlice(optionalDefault ...[](Map)) [](Map)
ObjxMapSlice gets the value as a [](Map), returns the optionalDefault value or nil if the value is not a [](Map).
func (v *Value) ReplaceBool(replacer func(int, bool) bool) *Value
ReplaceBool uses the specified function to replace each bools by iterating each item. The data in the returned result will be a []bool containing the replaced items.
func (v *Value) ReplaceComplex128(replacer func(int, complex128) complex128) *Value
ReplaceComplex128 uses the specified function to replace each complex128s by iterating each item. The data in the returned result will be a []complex128 containing the replaced items.
func (v *Value) ReplaceComplex64(replacer func(int, complex64) complex64) *Value
ReplaceComplex64 uses the specified function to replace each complex64s by iterating each item. The data in the returned result will be a []complex64 containing the replaced items.
func (v *Value) ReplaceFloat32(replacer func(int, float32) float32) *Value
ReplaceFloat32 uses the specified function to replace each float32s by iterating each item. The data in the returned result will be a []float32 containing the replaced items.
func (v *Value) ReplaceFloat64(replacer func(int, float64) float64) *Value
ReplaceFloat64 uses the specified function to replace each float64s by iterating each item. The data in the returned result will be a []float64 containing the replaced items.
func (v *Value) ReplaceInt(replacer func(int, int) int) *Value
ReplaceInt uses the specified function to replace each ints by iterating each item. The data in the returned result will be a []int containing the replaced items.
func (v *Value) ReplaceInt16(replacer func(int, int16) int16) *Value
ReplaceInt16 uses the specified function to replace each int16s by iterating each item. The data in the returned result will be a []int16 containing the replaced items.
func (v *Value) ReplaceInt32(replacer func(int, int32) int32) *Value
ReplaceInt32 uses the specified function to replace each int32s by iterating each item. The data in the returned result will be a []int32 containing the replaced items.
func (v *Value) ReplaceInt64(replacer func(int, int64) int64) *Value
ReplaceInt64 uses the specified function to replace each int64s by iterating each item. The data in the returned result will be a []int64 containing the replaced items.
func (v *Value) ReplaceInt8(replacer func(int, int8) int8) *Value
ReplaceInt8 uses the specified function to replace each int8s by iterating each item. The data in the returned result will be a []int8 containing the replaced items.
func (v *Value) ReplaceInter(replacer func(int, interface{}) interface{}) *Value
ReplaceInter uses the specified function to replace each interface{}s by iterating each item. The data in the returned result will be a []interface{} containing the replaced items.
func (v *Value) ReplaceMSI(replacer func(int, map[string]interface{}) map[string]interface{}) *Value
ReplaceMSI uses the specified function to replace each map[string]interface{}s by iterating each item. The data in the returned result will be a []map[string]interface{} containing the replaced items.
func (v *Value) ReplaceObjxMap(replacer func(int, Map) Map) *Value
ReplaceObjxMap uses the specified function to replace each (Map)s by iterating each item. The data in the returned result will be a [](Map) containing the replaced items.
func (v *Value) ReplaceStr(replacer func(int, string) string) *Value
ReplaceStr uses the specified function to replace each strings by iterating each item. The data in the returned result will be a []string containing the replaced items.
func (v *Value) ReplaceUint(replacer func(int, uint) uint) *Value
ReplaceUint uses the specified function to replace each uints by iterating each item. The data in the returned result will be a []uint containing the replaced items.
func (v *Value) ReplaceUint16(replacer func(int, uint16) uint16) *Value
ReplaceUint16 uses the specified function to replace each uint16s by iterating each item. The data in the returned result will be a []uint16 containing the replaced items.
func (v *Value) ReplaceUint32(replacer func(int, uint32) uint32) *Value
ReplaceUint32 uses the specified function to replace each uint32s by iterating each item. The data in the returned result will be a []uint32 containing the replaced items.
func (v *Value) ReplaceUint64(replacer func(int, uint64) uint64) *Value
ReplaceUint64 uses the specified function to replace each uint64s by iterating each item. The data in the returned result will be a []uint64 containing the replaced items.
func (v *Value) ReplaceUint8(replacer func(int, uint8) uint8) *Value
ReplaceUint8 uses the specified function to replace each uint8s by iterating each item. The data in the returned result will be a []uint8 containing the replaced items.
func (v *Value) ReplaceUintptr(replacer func(int, uintptr) uintptr) *Value
ReplaceUintptr uses the specified function to replace each uintptrs by iterating each item. The data in the returned result will be a []uintptr containing the replaced items.
func (v *Value) Str(optionalDefault ...string) string
Str gets the value as a string, returns the optionalDefault value or a system default object if the value is the wrong type.
func (v *Value) StrSlice(optionalDefault ...[]string) []string
StrSlice gets the value as a []string, returns the optionalDefault value or nil if the value is not a []string.
func (v *Value) String() string
String returns the value always as a string
func (v *Value) StringSlice(optionalDefault ...[]string) []string
StringSlice returns the value always as a []string
func (v *Value) Uint(optionalDefault ...uint) uint
Uint gets the value as a uint, returns the optionalDefault value or a system default object if the value is the wrong type.
func (v *Value) Uint16(optionalDefault ...uint16) uint16
Uint16 gets the value as a uint16, returns the optionalDefault value or a system default object if the value is the wrong type.
func (v *Value) Uint16Slice(optionalDefault ...[]uint16) []uint16
Uint16Slice gets the value as a []uint16, returns the optionalDefault value or nil if the value is not a []uint16.
func (v *Value) Uint32(optionalDefault ...uint32) uint32
Uint32 gets the value as a uint32, returns the optionalDefault value or a system default object if the value is the wrong type.
func (v *Value) Uint32Slice(optionalDefault ...[]uint32) []uint32
Uint32Slice gets the value as a []uint32, returns the optionalDefault value or nil if the value is not a []uint32.
func (v *Value) Uint64(optionalDefault ...uint64) uint64
Uint64 gets the value as a uint64, returns the optionalDefault value or a system default object if the value is the wrong type.
func (v *Value) Uint64Slice(optionalDefault ...[]uint64) []uint64
Uint64Slice gets the value as a []uint64, returns the optionalDefault value or nil if the value is not a []uint64.
func (v *Value) Uint8(optionalDefault ...uint8) uint8
Uint8 gets the value as a uint8, returns the optionalDefault value or a system default object if the value is the wrong type.
func (v *Value) Uint8Slice(optionalDefault ...[]uint8) []uint8
Uint8Slice gets the value as a []uint8, returns the optionalDefault value or nil if the value is not a []uint8.
func (v *Value) UintSlice(optionalDefault ...[]uint) []uint
UintSlice gets the value as a []uint, returns the optionalDefault value or nil if the value is not a []uint.
func (v *Value) Uintptr(optionalDefault ...uintptr) uintptr
Uintptr gets the value as a uintptr, returns the optionalDefault value or a system default object if the value is the wrong type.
func (v *Value) UintptrSlice(optionalDefault ...[]uintptr) []uintptr
UintptrSlice gets the value as a []uintptr, returns the optionalDefault value or nil if the value is not a []uintptr.
func (v *Value) WhereBool(decider func(int, bool) bool) *Value
WhereBool uses the specified decider function to select items from the []bool. The object contained in the result will contain only the selected items.
func (v *Value) WhereComplex128(decider func(int, complex128) bool) *Value
WhereComplex128 uses the specified decider function to select items from the []complex128. The object contained in the result will contain only the selected items.
func (v *Value) WhereComplex64(decider func(int, complex64) bool) *Value
WhereComplex64 uses the specified decider function to select items from the []complex64. The object contained in the result will contain only the selected items.
func (v *Value) WhereFloat32(decider func(int, float32) bool) *Value
WhereFloat32 uses the specified decider function to select items from the []float32. The object contained in the result will contain only the selected items.
func (v *Value) WhereFloat64(decider func(int, float64) bool) *Value
WhereFloat64 uses the specified decider function to select items from the []float64. The object contained in the result will contain only the selected items.
func (v *Value) WhereInt(decider func(int, int) bool) *Value
WhereInt uses the specified decider function to select items from the []int. The object contained in the result will contain only the selected items.
func (v *Value) WhereInt16(decider func(int, int16) bool) *Value
WhereInt16 uses the specified decider function to select items from the []int16. The object contained in the result will contain only the selected items.
func (v *Value) WhereInt32(decider func(int, int32) bool) *Value
WhereInt32 uses the specified decider function to select items from the []int32. The object contained in the result will contain only the selected items.
func (v *Value) WhereInt64(decider func(int, int64) bool) *Value
WhereInt64 uses the specified decider function to select items from the []int64. The object contained in the result will contain only the selected items.
func (v *Value) WhereInt8(decider func(int, int8) bool) *Value
WhereInt8 uses the specified decider function to select items from the []int8. The object contained in the result will contain only the selected items.
func (v *Value) WhereInter(decider func(int, interface{}) bool) *Value
WhereInter uses the specified decider function to select items from the []interface{}. The object contained in the result will contain only the selected items.
func (v *Value) WhereMSI(decider func(int, map[string]interface{}) bool) *Value
WhereMSI uses the specified decider function to select items from the []map[string]interface{}. The object contained in the result will contain only the selected items.
func (v *Value) WhereObjxMap(decider func(int, Map) bool) *Value
WhereObjxMap uses the specified decider function to select items from the [](Map). The object contained in the result will contain only the selected items.
func (v *Value) WhereStr(decider func(int, string) bool) *Value
WhereStr uses the specified decider function to select items from the []string. The object contained in the result will contain only the selected items.
func (v *Value) WhereUint(decider func(int, uint) bool) *Value
WhereUint uses the specified decider function to select items from the []uint. The object contained in the result will contain only the selected items.
func (v *Value) WhereUint16(decider func(int, uint16) bool) *Value
WhereUint16 uses the specified decider function to select items from the []uint16. The object contained in the result will contain only the selected items.
func (v *Value) WhereUint32(decider func(int, uint32) bool) *Value
WhereUint32 uses the specified decider function to select items from the []uint32. The object contained in the result will contain only the selected items.
func (v *Value) WhereUint64(decider func(int, uint64) bool) *Value
WhereUint64 uses the specified decider function to select items from the []uint64. The object contained in the result will contain only the selected items.
func (v *Value) WhereUint8(decider func(int, uint8) bool) *Value
WhereUint8 uses the specified decider function to select items from the []uint8. The object contained in the result will contain only the selected items.
func (v *Value) WhereUintptr(decider func(int, uintptr) bool) *Value
WhereUintptr uses the specified decider function to select items from the []uintptr. The object contained in the result will contain only the selected items.