package
1.2.0-alpha
Repository: https://github.com/go-restruct/restruct.git
Documentation: pkg.go.dev

# Functions

Eval returns the result of evaluating the provided expression.
EvalProgram returns the result of executing the program with the given resolver.
NewArrayType returns a new array type.
NewFuncType returns a new function type.
NewLiteralType returns a new primitive type.
NewMapResolver creates a new struct resolver.
NewMapType returns a new map type.
NewMapTypeResolver creates a new struct resolver.
NewMetaResolver creates a new meta resolver.
NewMetaTypeResolver creates a new meta type resolver.
NewPackage creates a new package.
NewPackageType returns a new package with the given symbols.
NewPrimitiveType returns a new primitive type.
NewPtrType returns a new pointer type.
NewSliceType returns a new array type.
NewStructResolver creates a new struct resolver.
NewStructType returns a new struct type.
NewStructTypeResolver creates a new struct type resolver.
NewTypeResolverAdapter creates a new TypeResolverAdapter from a resolver.
Parse parses an expression into a program.
ParseString parses an expression from a string.
TypeEqual returns true if the two types are equal.
TypeOf returns the type of a runtime value.
ValueOf returns a Value for the given runtime value.

# Constants

Composite types.
Primitives.
Enumeration of valid kinds of types.
Enumeration of valid kinds of types.
Enumeration of valid kinds of types.
Enumeration of valid kinds of types.
Enumeration of valid kinds of types.
Enumeration of valid kinds of types.
Enumeration of valid kinds of types.
Enumeration of valid kinds of types.
Enumeration of valid kinds of types.
Enumeration of valid kinds of types.
Enumeration of valid kinds of types.
Enumeration of valid kinds of types.
Enumeration of valid kinds of types.
Enumeration of valid kinds of types.
Enumeration of valid kinds of types.
Enumeration of valid kinds of types.
Enumeration of valid kinds of types.
Enumeration of valid kinds of types.
Enumeration of valid kinds of types.
Enumeration of valid kinds of types.
Enumeration of valid kinds of types.
Untyped constants.
Enumeration of valid kinds of types.
Enumeration of valid kinds of types.
Enumeration of valid kinds of types.

# Variables

ErrInvalidKind occurs when you call an inappropriate method for a given kind.
ErrNotRepresentable occurs when a type is encountered that is not supported by the language.
ErrUntypedNil occurs when an untyped nil is used inappropriately.

# Structs

ArrayType is the type of array-like values.
ConversionError is returned when an invalid type conversion is attempted.
Field represents a struct field.
FuncType is the type of function values.
InvalidOpError is returned when an attempt is made to perform an operation on a type that is not supported.
MapResolver resolves map keys.
MapType is the type of maps.
MapTypeResolver resolves map keys.
MetaResolver runs multiple resolvers serially.
MetaTypeResolver runs multiple type resolvers serially.
NoSuchFieldError is returned when an unknown field is accessed.
Package represents a package value.
PackageType is the type of a package.
PrimitiveType is the type of primitives.
Program represents a parsed expression.
PtrType is the type of pointers.
ReferenceError is returned when it is not possible to take the address of a value.
SliceType is the type of array-like values.
StructResolver resolves struct fields.
StructType is the type of struct values.
StructTypeResolver resolves types of struct fields.
TypeResolverAdapter adapts a runtime resolver to a type resolver by taking types of values retrieve from Resolve.

# Interfaces

Resolver resolves runtime values.
Type is the representation of an expr type.
TypeResolver resolves types.
Value represents a value at runtime.

# Type aliases

Kind is the most basic type descriptor.