Documentation
¶
Index ¶
- Variables
- func AsBool(value interface{}) bool
- func AsBoolSlice(values interface{}) []bool
- func AsDuration(value interface{}) time.Duration
- func AsFloat32(value interface{}) float32
- func AsFloat32Slice(values interface{}) []float32
- func AsFloat64(value interface{}) float64
- func AsFloat64Slice(values interface{}) []float64
- func AsIP(value interface{}) net.IP
- func AsInt(value interface{}) int
- func AsInt16(value interface{}) int16
- func AsInt16Slice(values interface{}) []int16
- func AsInt32(value interface{}) int32
- func AsInt32Slice(values interface{}) []int32
- func AsInt64(value interface{}) int64
- func AsInt64Slice(values interface{}) []int64
- func AsInt8(value interface{}) int8
- func AsInt8Slice(values interface{}) []int8
- func AsIntSlice(values interface{}) []int
- func AsInterfaceInterfaceMap(value interface{}) map[interface{}]interface{}
- func AsLocation(value interface{}) *time.Location
- func AsString(value interface{}) string
- func AsStringInterfaceMap(value interface{}) map[string]interface{}
- func AsStringSlice(values interface{}) []string
- func AsStringStringMap(value interface{}) map[string]string
- func AsTime(value interface{}) time.Time
- func AsURL(value interface{}) *url.URL
- func AsUint(value interface{}) uint
- func AsUint16(value interface{}) uint16
- func AsUint16Slice(values interface{}) []uint16
- func AsUint32(value interface{}) uint32
- func AsUint32Slice(values interface{}) []uint32
- func AsUint64(value interface{}) uint64
- func AsUint64Slice(values interface{}) []uint64
- func AsUint8(value interface{}) uint8
- func AsUint8Slice(values interface{}) []uint8
- func AsUintSlice(values interface{}) []uint
- func ConvertAs(value interface{}, rtype reflect.Type) interface{}
- func ConvertTo(value interface{}, rtype reflect.Type) (interface{}, error)
- func Indirect(a interface{}) interface{}
- func ToBool(value interface{}) (bool, error)
- func ToBoolSlice(values interface{}) ([]bool, error)
- func ToDuration(value interface{}) (time.Duration, error)
- func ToFloat32(value interface{}) (float32, error)
- func ToFloat32Slice(values interface{}) ([]float32, error)
- func ToFloat64(value interface{}) (float64, error)
- func ToFloat64Slice(values interface{}) ([]float64, error)
- func ToIP(value interface{}) (net.IP, error)
- func ToInt(value interface{}) (int, error)
- func ToInt16(value interface{}) (int16, error)
- func ToInt16Slice(values interface{}) ([]int16, error)
- func ToInt32(value interface{}) (int32, error)
- func ToInt32Slice(values interface{}) ([]int32, error)
- func ToInt64(value interface{}) (int64, error)
- func ToInt64Slice(values interface{}) ([]int64, error)
- func ToInt8(value interface{}) (int8, error)
- func ToInt8Slice(values interface{}) ([]int8, error)
- func ToIntSlice(values interface{}) ([]int, error)
- func ToInterfaceInterfaceMap(value interface{}) (map[interface{}]interface{}, error)
- func ToLocation(value interface{}) (*time.Location, error)
- func ToString(value interface{}) (string, error)
- func ToStringInterfaceMap(value interface{}) (map[string]interface{}, error)
- func ToStringSlice(values interface{}) ([]string, error)
- func ToStringStringMap(value interface{}) (map[string]string, error)
- func ToTime(value interface{}) (time.Time, error)
- func ToURL(value interface{}) (*url.URL, error)
- func ToUint(value interface{}) (uint, error)
- func ToUint16(value interface{}) (uint16, error)
- func ToUint16Slice(values interface{}) ([]uint16, error)
- func ToUint32(value interface{}) (uint32, error)
- func ToUint32Slice(values interface{}) ([]uint32, error)
- func ToUint64(value interface{}) (uint64, error)
- func ToUint64Slice(values interface{}) ([]uint64, error)
- func ToUint8(value interface{}) (uint8, error)
- func ToUint8Slice(values interface{}) ([]uint8, error)
- func ToUintSlice(values interface{}) ([]uint, error)
- type Value
- func (v *Value) AsBool() bool
- func (v *Value) AsBoolSlice() []bool
- func (v *Value) AsFloat32() float32
- func (v *Value) AsFloat32Slice() []float32
- func (v *Value) AsFloat64() float64
- func (v *Value) AsFloat64Slice() []float64
- func (v *Value) AsInt() int
- func (v *Value) AsInt16() int16
- func (v *Value) AsInt16Slice() []int16
- func (v *Value) AsInt32() int32
- func (v *Value) AsInt32Slice() []int32
- func (v *Value) AsInt64() int64
- func (v *Value) AsInt64Slice() []int64
- func (v *Value) AsInt8() int8
- func (v *Value) AsInt8Slice() []int8
- func (v *Value) AsIntSlice() []int
- func (v *Value) AsInterfaceInterfaceMap() map[interface{}]interface{}
- func (v *Value) AsString() string
- func (v *Value) AsStringInterfaceMap() map[string]interface{}
- func (v *Value) AsStringSlice() []string
- func (v *Value) AsStringStringMap() map[string]string
- func (v *Value) AsUint() uint
- func (v *Value) AsUint16() uint16
- func (v *Value) AsUint16Slice() []uint16
- func (v *Value) AsUint32() uint32
- func (v *Value) AsUint32Slice() []uint32
- func (v *Value) AsUint64() uint64
- func (v *Value) AsUint64Slice() []uint64
- func (v *Value) AsUint8() uint8
- func (v *Value) AsUint8Slice() []uint8
- func (v *Value) AsUintSlice() []uint
- func (v *Value) IsNil() bool
- func (v *Value) ToBool() (bool, error)
- func (v *Value) ToBoolSlice() ([]bool, error)
- func (v *Value) ToFloat32() (float32, error)
- func (v *Value) ToFloat32Slice() ([]float32, error)
- func (v *Value) ToFloat64() (float64, error)
- func (v *Value) ToFloat64Slice() ([]float64, error)
- func (v *Value) ToInt() (int, error)
- func (v *Value) ToInt16() (int16, error)
- func (v *Value) ToInt16Slice() ([]int16, error)
- func (v *Value) ToInt32() (int32, error)
- func (v *Value) ToInt32Slice() ([]int32, error)
- func (v *Value) ToInt64() (int64, error)
- func (v *Value) ToInt64Slice() ([]int64, error)
- func (v *Value) ToInt8() (int8, error)
- func (v *Value) ToInt8Slice() ([]int8, error)
- func (v *Value) ToIntSlice() ([]int, error)
- func (v *Value) ToInterfaceInterfaceMap() (map[interface{}]interface{}, error)
- func (v *Value) ToString() (string, error)
- func (v *Value) ToStringInterfaceMap() (map[string]interface{}, error)
- func (v *Value) ToStringSlice() ([]string, error)
- func (v *Value) ToStringStringMap() (map[string]string, error)
- func (v *Value) ToUint() (uint, error)
- func (v *Value) ToUint16() (uint16, error)
- func (v *Value) ToUint16Slice() ([]uint16, error)
- func (v *Value) ToUint32() (uint32, error)
- func (v *Value) ToUint32Slice() ([]uint32, error)
- func (v *Value) ToUint64() (uint64, error)
- func (v *Value) ToUint64Slice() ([]uint64, error)
- func (v *Value) ToUint8() (uint8, error)
- func (v *Value) ToUint8Slice() ([]uint8, error)
- func (v *Value) ToUintSlice() ([]uint, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TYPE_STRING = reflect.TypeOf("") TYPE_BOOL = reflect.TypeOf(true) TYPE_INT = reflect.TypeOf(int(0)) TYPE_INT8 = reflect.TypeOf(int8(0)) TYPE_INT16 = reflect.TypeOf(int16(0)) TYPE_INT32 = reflect.TypeOf(int32(0)) TYPE_INT64 = reflect.TypeOf(int64(0)) TYPE_UINT = reflect.TypeOf(uint(0)) TYPE_UINT8 = reflect.TypeOf(uint8(0)) TYPE_UINT16 = reflect.TypeOf(uint16(0)) TYPE_UINT32 = reflect.TypeOf(uint32(0)) TYPE_UINT64 = reflect.TypeOf(uint64(0)) TYPE_FLOAT32 = reflect.TypeOf(float32(0)) TYPE_FLOAT64 = reflect.TypeOf(float64(0)) TYPE_STRING_SLICE = reflect.TypeOf([]string(nil)) TYPE_INTERFACE_SLICE = reflect.TypeOf([]interface{}(nil)) TYPE_STRING_STRING_MAP = reflect.TypeOf(map[string]string(nil)) TYPE_STRING_INTERFACE_MAP = reflect.TypeOf(map[string]interface{}(nil)) TYPE_INTERFACE_INTERFACE_MAP = reflect.TypeOf(map[interface{}]interface{}(nil)) )
Functions ¶
func AsBoolSlice ¶
func AsBoolSlice(values interface{}) []bool
func AsDuration ¶
func AsFloat32Slice ¶
func AsFloat32Slice(values interface{}) []float32
func AsFloat64Slice ¶
func AsFloat64Slice(values interface{}) []float64
func AsInt16Slice ¶
func AsInt16Slice(values interface{}) []int16
func AsInt32Slice ¶
func AsInt32Slice(values interface{}) []int32
func AsInt64Slice ¶
func AsInt64Slice(values interface{}) []int64
func AsInt8Slice ¶
func AsInt8Slice(values interface{}) []int8
func AsIntSlice ¶
func AsIntSlice(values interface{}) []int
func AsInterfaceInterfaceMap ¶
func AsInterfaceInterfaceMap(value interface{}) map[interface{}]interface{}
func AsLocation ¶
func AsStringInterfaceMap ¶
func AsStringInterfaceMap(value interface{}) map[string]interface{}
func AsStringSlice ¶
func AsStringSlice(values interface{}) []string
func AsStringStringMap ¶
func AsUint16Slice ¶
func AsUint16Slice(values interface{}) []uint16
func AsUint32Slice ¶
func AsUint32Slice(values interface{}) []uint32
func AsUint64Slice ¶
func AsUint64Slice(values interface{}) []uint64
func AsUint8Slice ¶
func AsUint8Slice(values interface{}) []uint8
func AsUintSlice ¶
func AsUintSlice(values interface{}) []uint
func Indirect ¶
func Indirect(a interface{}) interface{}
Indirect returns the value, after dereferencing as many times as necessary to reach the base type (or nil).
func ToBoolSlice ¶
func ToDuration ¶
func ToFloat32Slice ¶
func ToFloat64Slice ¶
func ToInt16Slice ¶
func ToInt32Slice ¶
func ToInt64Slice ¶
func ToInt8Slice ¶
func ToIntSlice ¶
func ToInterfaceInterfaceMap ¶
func ToInterfaceInterfaceMap(value interface{}) (map[interface{}]interface{}, error)
func ToLocation ¶
func ToStringInterfaceMap ¶
func ToStringSlice ¶
func ToStringStringMap ¶
func ToUint16Slice ¶
func ToUint32Slice ¶
func ToUint64Slice ¶
func ToUint8Slice ¶
func ToUintSlice ¶
Types ¶
type Value ¶
type Value struct {
Data interface{}
}
func (*Value) AsBoolSlice ¶
func (*Value) AsFloat32Slice ¶
func (*Value) AsFloat64Slice ¶
func (*Value) AsInt16Slice ¶
func (*Value) AsInt32Slice ¶
func (*Value) AsInt64Slice ¶
func (*Value) AsInt8Slice ¶
func (*Value) AsIntSlice ¶
func (*Value) AsInterfaceInterfaceMap ¶
func (v *Value) AsInterfaceInterfaceMap() map[interface{}]interface{}
func (*Value) AsStringInterfaceMap ¶
func (*Value) AsStringSlice ¶
func (*Value) AsStringStringMap ¶
func (*Value) AsUint16Slice ¶
func (*Value) AsUint32Slice ¶
func (*Value) AsUint64Slice ¶
func (*Value) AsUint8Slice ¶
func (*Value) AsUintSlice ¶
func (*Value) ToBoolSlice ¶
func (*Value) ToFloat32Slice ¶
func (*Value) ToFloat64Slice ¶
func (*Value) ToInt16Slice ¶
func (*Value) ToInt32Slice ¶
func (*Value) ToInt64Slice ¶
func (*Value) ToInt8Slice ¶
func (*Value) ToIntSlice ¶
func (*Value) ToInterfaceInterfaceMap ¶
func (*Value) ToStringInterfaceMap ¶
func (*Value) ToStringSlice ¶
func (*Value) ToUint16Slice ¶
func (*Value) ToUint32Slice ¶
func (*Value) ToUint64Slice ¶
func (*Value) ToUint8Slice ¶
func (*Value) ToUintSlice ¶
Source Files
¶
- convert.go
- generate.go
- to_bool.go
- to_bool_slice.go
- to_float32.go
- to_float32_slice.go
- to_float64.go
- to_float64_slice.go
- to_int.go
- to_int16.go
- to_int16_slice.go
- to_int32.go
- to_int32_slice.go
- to_int64.go
- to_int64_slice.go
- to_int8.go
- to_int8_slice.go
- to_int_slice.go
- to_interface_interface_map.go
- to_map.go
- to_net_ip.go
- to_net_url.go
- to_string.go
- to_string_interface_map.go
- to_string_slice.go
- to_string_string_map.go
- to_time.go
- to_time_duration.go
- to_time_location.go
- to_uint.go
- to_uint16.go
- to_uint16_slice.go
- to_uint32.go
- to_uint32_slice.go
- to_uint64.go
- to_uint64_slice.go
- to_uint8.go
- to_uint8_slice.go
- to_uint_slice.go
- value.go
Click to show internal directories.
Click to hide internal directories.