Versions in this module Expand all Collapse all v0 v0.0.2 May 3, 2021 v0.0.1 May 3, 2021 Changes in this version + var BoolValueFalse = BoolValue + var BoolValueTrue = BoolValue + var EmptyMapBoolValue = NewMapBoolValue(make(map[string]bool)) + var EmptyMapIntValue = NewMapIntValue(make(map[string]int64)) + var EmptyMapNumberValue = NewMapNumberValue(make(map[string]float64)) + var EmptyMapStringValue = NewMapStringValue(make(map[string]string)) + var EmptyMapTimeValue = NewMapTimeValue(make(map[string]time.Time)) + var EmptyMapValue = NewMapValue(nil) + var EmptyStringValue = NewStringValue("") + var EmptyStringsValue = NewStringsValue(nil) + var EmptyStruct = struct{} + var ErrConversion = fmt.Errorf("Error converting type") + var ErrConversionNotSupported = fmt.Errorf("Unsupported conversion") + var ErrValue = NewErrorValue(fmt.Errorf("")) + var NilStructValue = NewStructValue(nilStruct) + var NilValueVal = NewNilValue() + var NumberNaNValue = NewNumberValue(math.NaN()) + var TimeZeroValue = NewTimeValue(time.Time{}) + func BoolStringVal(sv string) bool + func Equal(l, r Value) (bool, error) + func IsBool(sv string) bool + func StringToFloat64(s string) (float64, bool) + func StringToTimeAnchor(val string, anchor time.Time) (time.Time, bool) + func ValueToBool(val Value) (bool, bool) + func ValueToFloat64(val Value) (float64, bool) + func ValueToInt(val Value) (int, bool) + func ValueToInt64(val Value) (int64, bool) + func ValueToString(val Value) (string, bool) + func ValueToStrings(val Value) ([]string, bool) + func ValueToTime(val Value) (time.Time, bool) + func ValueToTimeAnchor(val Value, anchor time.Time) (time.Time, bool) + type BoolValue struct + func NewBoolValue(v bool) BoolValue + func (m BoolValue) Err() bool + func (m BoolValue) MarshalJSON() ([]byte, error) + func (m BoolValue) Nil() bool + func (m BoolValue) ToString() string + func (m BoolValue) Type() ValueType + func (m BoolValue) Val() bool + func (m BoolValue) Value() interface{} + type ByteSliceValue struct + func NewByteSliceValue(v []byte) ByteSliceValue + func (m ByteSliceValue) Err() bool + func (m ByteSliceValue) Len() int + func (m ByteSliceValue) MarshalJSON() ([]byte, error) + func (m ByteSliceValue) Nil() bool + func (m ByteSliceValue) ToString() string + func (m ByteSliceValue) Type() ValueType + func (m ByteSliceValue) Val() []byte + func (m ByteSliceValue) Value() interface{} + type ErrorValue struct + func NewErrorValue(v error) ErrorValue + func NewErrorValuef(v string, args ...interface{}) ErrorValue + func (m ErrorValue) Err() bool + func (m ErrorValue) Error() string + func (m ErrorValue) MarshalJSON() ([]byte, error) + func (m ErrorValue) Nil() bool + func (m ErrorValue) ToString() string + func (m ErrorValue) Type() ValueType + func (m ErrorValue) Val() error + func (m ErrorValue) Value() interface{} + type IntValue struct + func NewIntNil() IntValue + func NewIntValue(v int64) IntValue + func (m IntValue) Err() bool + func (m IntValue) Float() float64 + func (m IntValue) Int() int64 + func (m IntValue) MarshalJSON() ([]byte, error) + func (m IntValue) Nil() bool + func (m IntValue) NumberValue() NumberValue + func (m IntValue) ToString() string + func (m IntValue) Type() ValueType + func (m IntValue) Val() int64 + func (m IntValue) Value() interface{} + type JsonValue struct + func NewJsonValue(v json.RawMessage) JsonValue + func (m JsonValue) Err() bool + func (m JsonValue) MarshalJSON() ([]byte, error) + func (m JsonValue) Nil() bool + func (m JsonValue) ToString() string + func (m JsonValue) Type() ValueType + func (m JsonValue) Val() interface{} + func (m JsonValue) Value() interface{} + type Map interface + Get func(key string) (Value, bool) + Len func() int + MapValue func() MapValue + type MapBoolValue struct + func NewMapBoolValue(v map[string]bool) MapBoolValue + func (m MapBoolValue) Err() bool + func (m MapBoolValue) Get(key string) (Value, bool) + func (m MapBoolValue) Len() int + func (m MapBoolValue) MapValue() MapValue + func (m MapBoolValue) MarshalJSON() ([]byte, error) + func (m MapBoolValue) Nil() bool + func (m MapBoolValue) SliceValue() []Value + func (m MapBoolValue) ToString() string + func (m MapBoolValue) Type() ValueType + func (m MapBoolValue) Val() map[string]bool + func (m MapBoolValue) Value() interface{} + type MapIntValue struct + func NewMapIntValue(v map[string]int64) MapIntValue + func (m MapIntValue) Err() bool + func (m MapIntValue) Get(key string) (Value, bool) + func (m MapIntValue) Len() int + func (m MapIntValue) MapFloat() map[string]float64 + func (m MapIntValue) MapInt() map[string]int64 + func (m MapIntValue) MapValue() MapValue + func (m MapIntValue) MarshalJSON() ([]byte, error) + func (m MapIntValue) Nil() bool + func (m MapIntValue) SliceValue() []Value + func (m MapIntValue) ToString() string + func (m MapIntValue) Type() ValueType + func (m MapIntValue) Val() map[string]int64 + func (m MapIntValue) Value() interface{} + type MapNumberValue struct + func NewMapNumberValue(v map[string]float64) MapNumberValue + func (m MapNumberValue) Err() bool + func (m MapNumberValue) Get(key string) (Value, bool) + func (m MapNumberValue) Len() int + func (m MapNumberValue) MapInt() map[string]int64 + func (m MapNumberValue) MapValue() MapValue + func (m MapNumberValue) MarshalJSON() ([]byte, error) + func (m MapNumberValue) Nil() bool + func (m MapNumberValue) SliceValue() []Value + func (m MapNumberValue) ToString() string + func (m MapNumberValue) Type() ValueType + func (m MapNumberValue) Val() map[string]float64 + func (m MapNumberValue) Value() interface{} + type MapStringValue struct + func NewMapStringValue(v map[string]string) MapStringValue + func (m MapStringValue) Err() bool + func (m MapStringValue) Get(key string) (Value, bool) + func (m MapStringValue) Len() int + func (m MapStringValue) MapBool() MapBoolValue + func (m MapStringValue) MapInt() MapIntValue + func (m MapStringValue) MapNumber() MapNumberValue + func (m MapStringValue) MapValue() MapValue + func (m MapStringValue) MarshalJSON() ([]byte, error) + func (m MapStringValue) Nil() bool + func (m MapStringValue) SliceValue() []Value + func (m MapStringValue) ToString() string + func (m MapStringValue) Type() ValueType + func (m MapStringValue) Val() map[string]string + func (m MapStringValue) Value() interface{} + type MapTimeValue struct + func NewMapTimeValue(v map[string]time.Time) MapTimeValue + func (m MapTimeValue) Err() bool + func (m MapTimeValue) Get(key string) (Value, bool) + func (m MapTimeValue) Len() int + func (m MapTimeValue) MapInt() map[string]int64 + func (m MapTimeValue) MapValue() MapValue + func (m MapTimeValue) MarshalJSON() ([]byte, error) + func (m MapTimeValue) Nil() bool + func (m MapTimeValue) ToString() string + func (m MapTimeValue) Type() ValueType + func (m MapTimeValue) Val() map[string]time.Time + func (m MapTimeValue) Value() interface{} + type MapValue struct + func NewMapValue(v map[string]interface{}) MapValue + func (m MapValue) Err() bool + func (m MapValue) Get(key string) (Value, bool) + func (m MapValue) Len() int + func (m MapValue) MapFloat() map[string]float64 + func (m MapValue) MapInt() map[string]int64 + func (m MapValue) MapString() map[string]string + func (m MapValue) MapTime() MapTimeValue + func (m MapValue) MapValue() MapValue + func (m MapValue) MarshalJSON() ([]byte, error) + func (m MapValue) Nil() bool + func (m MapValue) ToString() string + func (m MapValue) Type() ValueType + func (m MapValue) Val() map[string]Value + func (m MapValue) Value() interface{} + type NilValue struct + func NewNilValue() NilValue + func (m NilValue) Err() bool + func (m NilValue) MarshalJSON() ([]byte, error) + func (m NilValue) Nil() bool + func (m NilValue) ToString() string + func (m NilValue) Type() ValueType + func (m NilValue) Val() interface{} + func (m NilValue) Value() interface{} + type NumberValue struct + func NewNumberNil() NumberValue + func NewNumberValue(v float64) NumberValue + func (m NumberValue) Err() bool + func (m NumberValue) Float() float64 + func (m NumberValue) Int() int64 + func (m NumberValue) MarshalJSON() ([]byte, error) + func (m NumberValue) Nil() bool + func (m NumberValue) ToString() string + func (m NumberValue) Type() ValueType + func (m NumberValue) Val() float64 + func (m NumberValue) Value() interface{} + type NumericValue interface + Float func() float64 + Int func() int64 + type Slice interface + Len func() int + SliceValue func() []Value + type SliceValue struct + func NewSliceValues(v []Value) SliceValue + func NewSliceValuesNative(iv []interface{}) SliceValue + func (m *SliceValue) Append(v Value) + func (m SliceValue) Err() bool + func (m SliceValue) Len() int + func (m SliceValue) MarshalJSON() ([]byte, error) + func (m SliceValue) Nil() bool + func (m SliceValue) SliceValue() []Value + func (m SliceValue) ToString() string + func (m SliceValue) Type() ValueType + func (m SliceValue) Val() []Value + func (m SliceValue) Value() interface{} + func (m SliceValue) Values() []interface{} + type StringValue struct + func NewStringValue(v string) StringValue + func (m StringValue) Err() bool + func (m StringValue) IntValue() IntValue + func (m StringValue) MarshalJSON() ([]byte, error) + func (m StringValue) Nil() bool + func (m StringValue) NumberValue() NumberValue + func (m StringValue) StringsValue() StringsValue + func (m StringValue) ToString() string + func (m StringValue) Type() ValueType + func (m StringValue) Val() string + func (m StringValue) Value() interface{} + type StringsValue struct + func NewStringsValue(v []string) StringsValue + func (m *StringsValue) Append(sv string) + func (m StringsValue) Err() bool + func (m StringsValue) IntValue() IntValue + func (m StringsValue) Len() int + func (m StringsValue) MarshalJSON() ([]byte, error) + func (m StringsValue) Nil() bool + func (m StringsValue) NumberValue() NumberValue + func (m StringsValue) Set() map[string]struct{} + func (m StringsValue) SliceValue() []Value + func (m StringsValue) Strings() []string + func (m StringsValue) ToString() string + func (m StringsValue) Type() ValueType + func (m StringsValue) Val() []string + func (m StringsValue) Value() interface{} + type StructValue struct + func NewStructValue(v interface{}) StructValue + func (m StructValue) Err() bool + func (m StructValue) MarshalJSON() ([]byte, error) + func (m StructValue) Nil() bool + func (m StructValue) ToString() string + func (m StructValue) Type() ValueType + func (m StructValue) Val() interface{} + func (m StructValue) Value() interface{} + type TimeValue struct + func NewTimeValue(v time.Time) TimeValue + func (m TimeValue) Err() bool + func (m TimeValue) Float() float64 + func (m TimeValue) Int() int64 + func (m TimeValue) MarshalJSON() ([]byte, error) + func (m TimeValue) Nil() bool + func (m TimeValue) Time() time.Time + func (m TimeValue) ToString() string + func (m TimeValue) Type() ValueType + func (m TimeValue) Val() time.Time + func (m TimeValue) Value() interface{} + type Value interface + Err func() bool + Nil func() bool + ToString func() string + Type func() ValueType + Value func() interface{} + func Cast(valType ValueType, val Value) (Value, error) + func NewValue(goVal interface{}) Value + type ValueType uint8 + const BoolType + const ByteSliceType + const ErrorType + const IntType + const JsonType + const MapBoolType + const MapIntType + const MapNumberType + const MapStringType + const MapTimeType + const MapValueType + const NilType + const NumberType + const SliceValueType + const StringType + const StringsType + const StructType + const TimeType + const UnknownType + const ValueInterfaceType + func ValueFromString(vt string) ValueType + func ValueTypeFromString(val string) ValueType + func ValueTypeFromStringAll(val string) ValueType + func (m ValueType) IsMap() bool + func (m ValueType) IsNumeric() bool + func (m ValueType) IsSlice() bool + func (m ValueType) String() string