Versions in this module Expand all Collapse all v1 v1.4.1 Mar 5, 2025 Changes in this version + var InternalTypesToRegister []interface + var NilType = Type + var NilVal = Value + func NormalizeString(s string) string + func Walk(val Value, cb func(Path, Value) (bool, error)) error + type CapsuleOps struct + ConversionFrom func(src Type) func(interface{}, Path) (Value, error) + ConversionTo func(dst Type) func(Value, Path) (interface{}, error) + Equals func(a, b interface{}) Value + ExtensionData func(key interface{}) interface{} + GoString func(val interface{}) string + RawEquals func(a, b interface{}) bool + TypeGoString func(goTy reflect.Type) string + type ElementCallback func(key Value, val Value) (stop bool) + type ElementIterator interface + Element func() (key Value, value Value) + Next func() bool + type GetAttrStep struct + Name string + func (s GetAttrStep) Apply(val Value) (Value, error) + func (s GetAttrStep) GoString() string + type IndexStep struct + Key Value + func (s IndexStep) Apply(val Value) (Value, error) + func (s IndexStep) GoString() string + type Path []PathStep + func GetAttrPath(name string) Path + func IndexIntPath(v int) Path + func IndexPath(v Value) Path + func IndexStringPath(v string) Path + func (p Path) Apply(val Value) (Value, error) + func (p Path) Copy() Path + func (p Path) Equals(other Path) bool + func (p Path) GetAttr(name string) Path + func (p Path) HasPrefix(prefix Path) bool + func (p Path) Index(v Value) Path + func (p Path) IndexInt(v int) Path + func (p Path) IndexString(v string) Path + func (p Path) LastStep(val Value) (Value, PathStep, error) + func (p Path) NewError(err error) error + func (p Path) NewErrorf(f string, args ...interface{}) error + type PathError struct + Path Path + type PathSet struct + func NewPathSet(paths ...Path) PathSet + func (s PathSet) Add(path Path) + func (s PathSet) AddAllSteps(path Path) + func (s PathSet) Empty() bool + func (s PathSet) Equal(other PathSet) bool + func (s PathSet) Has(path Path) bool + func (s PathSet) Intersection(other PathSet) PathSet + func (s PathSet) List() []Path + func (s PathSet) Remove(path Path) + func (s PathSet) Subtract(other PathSet) PathSet + func (s PathSet) SymmetricDifference(other PathSet) PathSet + func (s PathSet) Union(other PathSet) PathSet + type PathStep interface + Apply func(Value) (Value, error) + type Type struct + var Bool Type + var DynamicPseudoType Type + var EmptyObject Type + var EmptyTuple Type + var Number Type + var String Type + func Capsule(name string, nativeType reflect.Type) Type + func CapsuleWithOps(name string, nativeType reflect.Type, ops *CapsuleOps) Type + func List(elem Type) Type + func Map(elem Type) Type + func Object(attrTypes map[string]Type) Type + func Set(elem Type) Type + func Tuple(elemTypes []Type) Type + func (t *Type) GobDecode(buf []byte) error + func (t *Type) UnmarshalJSON(buf []byte) error + func (t Type) AttributeType(name string) Type + func (t Type) AttributeTypes() map[string]Type + func (t Type) ElementType() Type + func (t Type) EncapsulatedType() reflect.Type + func (t Type) Equals(other Type) bool + func (t Type) FriendlyName() string + func (t Type) FriendlyNameForConstraint() string + func (t Type) GoString() string + func (t Type) GobEncode() ([]byte, error) + func (t Type) HasAttribute(name string) bool + func (t Type) HasDynamicTypes() bool + func (t Type) IsCapsuleType() bool + func (t Type) IsCollectionType() bool + func (t Type) IsListType() bool + func (t Type) IsMapType() bool + func (t Type) IsObjectType() bool + func (t Type) IsPrimitiveType() bool + func (t Type) IsSetType() bool + func (t Type) IsTupleType() bool + func (t Type) Length() int + func (t Type) ListElementType() *Type + func (t Type) MapElementType() *Type + func (t Type) MarshalJSON() ([]byte, error) + func (t Type) SetElementType() *Type + func (t Type) TestConformance(other Type) []error + func (t Type) TupleElementType(idx int) Type + func (t Type) TupleElementTypes() []Type + func (ty Type) CapsuleExtensionData(key interface{}) interface{} + func (ty Type) CapsuleOps() *CapsuleOps + type Value struct + var DynamicVal Value + var EmptyObjectVal Value + var EmptyTupleVal Value + var False Value + var NegativeInfinity Value + var PositiveInfinity Value + var True Value + var Zero Value + func BoolVal(v bool) Value + func CapsuleVal(ty Type, wrapVal interface{}) Value + func ListVal(vals []Value) Value + func ListValEmpty(element Type) Value + func MapVal(vals map[string]Value) Value + func MapValEmpty(element Type) Value + func MustParseNumberVal(s string) Value + func NullVal(t Type) Value + func NumberFloatVal(v float64) Value + func NumberIntVal(v int64) Value + func NumberUIntVal(v uint64) Value + func NumberVal(v *big.Float) Value + func ObjectVal(attrs map[string]Value) Value + func ParseNumberVal(s string) (Value, error) + func SetVal(vals []Value) Value + func SetValEmpty(element Type) Value + func SetValFromValueSet(s ValueSet) Value + func StringVal(v string) Value + func Transform(val Value, cb func(Path, Value) (Value, error)) (Value, error) + func TupleVal(elems []Value) Value + func UnknownAsNull(val Value) Value + func UnknownVal(t Type) Value + func (val *Value) GobDecode(buf []byte) error + func (val Value) Absolute() Value + func (val Value) Add(other Value) Value + func (val Value) And(other Value) Value + func (val Value) AsBigFloat() *big.Float + func (val Value) AsString() string + func (val Value) AsValueMap() map[string]Value + func (val Value) AsValueSet() ValueSet + func (val Value) AsValueSlice() []Value + func (val Value) CanIterateElements() bool + func (val Value) ContainsMarked() bool + func (val Value) Divide(other Value) Value + func (val Value) ElementIterator() ElementIterator + func (val Value) EncapsulatedValue() interface{} + func (val Value) Equals(other Value) Value + func (val Value) False() bool + func (val Value) ForEachElement(cb ElementCallback) bool + func (val Value) GetAttr(name string) Value + func (val Value) GoString() string + func (val Value) GobEncode() ([]byte, error) + func (val Value) GreaterThan(other Value) Value + func (val Value) GreaterThanOrEqualTo(other Value) Value + func (val Value) HasElement(elem Value) Value + func (val Value) HasIndex(key Value) Value + func (val Value) HasMark(mark interface{}) bool + func (val Value) HasSameMarks(other Value) bool + func (val Value) Hash() int + func (val Value) Index(key Value) Value + func (val Value) IsKnown() bool + func (val Value) IsMarked() bool + func (val Value) IsNull() bool + func (val Value) IsWhollyKnown() bool + func (val Value) Length() Value + func (val Value) LengthInt() int + func (val Value) LessThan(other Value) Value + func (val Value) LessThanOrEqualTo(other Value) Value + func (val Value) Mark(mark interface{}) Value + func (val Value) Marks() ValueMarks + func (val Value) Modulo(other Value) Value + func (val Value) Multiply(other Value) Value + func (val Value) Negate() Value + func (val Value) Not() Value + func (val Value) NotEqual(other Value) Value + func (val Value) Or(other Value) Value + func (val Value) RawEquals(other Value) bool + func (val Value) Subtract(other Value) Value + func (val Value) True() bool + func (val Value) Type() Type + func (val Value) Unmark() (Value, ValueMarks) + func (val Value) UnmarkDeep() (Value, ValueMarks) + func (val Value) WithMarks(marks ...ValueMarks) Value + func (val Value) WithSameMarks(srcs ...Value) Value + type ValueMarks map[interface{}]struct + func (m ValueMarks) Equal(o ValueMarks) bool + func (m ValueMarks) GoString() string + func NewValueMarks(marks ...interface{}) ValueMarks + type ValueSet struct + func NewValueSet(ety Type) ValueSet + func (s ValueSet) Add(v Value) + func (s ValueSet) Copy() ValueSet + func (s ValueSet) ElementType() Type + func (s ValueSet) Has(v Value) bool + func (s ValueSet) Intersection(other ValueSet) ValueSet + func (s ValueSet) Length() int + func (s ValueSet) Remove(v Value) + func (s ValueSet) Subtract(other ValueSet) ValueSet + func (s ValueSet) SymmetricDifference(other ValueSet) ValueSet + func (s ValueSet) Union(other ValueSet) ValueSet + func (s ValueSet) Values() []Value