Documentation
¶
Index ¶
- Variables
- func AsBasicBool(sym Symbol) (value bool, ok bool)
- func AsBasicString(sym Symbol) (value string, ok bool)
- func AsBool(sym Symbol) bool
- func EncodeSymbol(span *model.Span, symbol Symbol) ([]byte, error)
- func FieldSymbolsEqual(span *model.Span, x, y FieldSymbols) bool
- func FieldSymbolsHash(span *model.Span, fields FieldSymbols) model.ID
- func FilterEmptyEvalFields(group []eval.Field) (filtered []eval.Field)
- func FilterUnderscoreFields(fields []eval.Field) (filtered []eval.Field)
- func Integrate(span *model.Span, s Symbol, t reflect.Type) (reflect.Value, error)
- func IntegrateInterface(span *model.Span, s Symbol, t reflect.Type) (interface{}, error)
- func IsBasicKind(s Symbol, kind reflect.Kind) bool
- func IsEmptySymbol(sym Symbol) bool
- func IsEmptyType(t Type) bool
- func IsSignedIntegerType(t Type) bool
- func IsUnsignedIntegerType(t Type) bool
- func IsVarietySymbol(sym Symbol) bool
- func SignedMaximal(sym Symbol) int64
- func UnsignedMaximal(sym Symbol) uint64
- func VerifyNoDuplicateFieldSymbol(span *model.Span, fieldSymbols FieldSymbols) error
- type BasicSymbol
- func (basic BasicSymbol) Augment(span *model.Span, _ eval.Fields) (eval.Shape, eval.Effect, error)
- func (basic BasicSymbol) ConvertTo(span *model.Span, to BasicType) (BasicSymbol, error)
- func (basic BasicSymbol) DisassembleToGo(span *model.Span) (reflect.Value, error)
- func (basic BasicSymbol) DisassembleToPB(span *model.Span) (*pb.Symbol, error)
- func (basic BasicSymbol) Equal(span *model.Span, sym Symbol) bool
- func (basic BasicSymbol) GoValue() reflect.Value
- func (basic BasicSymbol) Hash(span *model.Span) model.ID
- func (basic BasicSymbol) Invoke(span *model.Span) (eval.Shape, eval.Effect, error)
- func (basic BasicSymbol) LiftToSeries(span *model.Span) *SeriesSymbol
- func (basic BasicSymbol) Link(span *model.Span, name string, monadic bool) (eval.Shape, eval.Effect, error)
- func (basic BasicSymbol) Select(span *model.Span, path model.Path) (eval.Shape, eval.Effect, error)
- func (basic BasicSymbol) Splay() tree.Tree
- func (basic BasicSymbol) String() string
- func (basic BasicSymbol) Type() Type
- type BasicType
- type BlobSymbol
- func (blob *BlobSymbol) Augment(span *model.Span, _ eval.Fields) (eval.Shape, eval.Effect, error)
- func (blob *BlobSymbol) Bytes() []byte
- func (blob *BlobSymbol) DisassembleToGo(span *model.Span) (reflect.Value, error)
- func (blob *BlobSymbol) DisassembleToPB(span *model.Span) (*pb.Symbol, error)
- func (blob *BlobSymbol) Equal(span *model.Span, sym Symbol) bool
- func (blob *BlobSymbol) Hash(span *model.Span) model.ID
- func (blob *BlobSymbol) Invoke(span *model.Span) (eval.Shape, eval.Effect, error)
- func (blob *BlobSymbol) LiftToSeries(span *model.Span) *SeriesSymbol
- func (blob *BlobSymbol) Link(span *model.Span, name string, monadic bool) (eval.Shape, eval.Effect, error)
- func (blob *BlobSymbol) Select(span *model.Span, path model.Path) (eval.Shape, eval.Effect, error)
- func (blob *BlobSymbol) Splay() tree.Tree
- func (blob *BlobSymbol) String() string
- func (blob *BlobSymbol) Type() Type
- type BlobType
- type EmptySymbol
- func (empty EmptySymbol) Augment(span *model.Span, _ eval.Fields) (eval.Shape, eval.Effect, error)
- func (empty EmptySymbol) DisassembleToGo(span *model.Span) (reflect.Value, error)
- func (empty EmptySymbol) DisassembleToPB(span *model.Span) (*pb.Symbol, error)
- func (empty EmptySymbol) Equal(span *model.Span, sym Symbol) bool
- func (empty EmptySymbol) Hash(span *model.Span) model.ID
- func (empty EmptySymbol) Invoke(span *model.Span) (eval.Shape, eval.Effect, error)
- func (empty EmptySymbol) LiftToSeries(span *model.Span) *SeriesSymbol
- func (empty EmptySymbol) Link(span *model.Span, name string, monadic bool) (eval.Shape, eval.Effect, error)
- func (empty EmptySymbol) Select(span *model.Span, path model.Path) (eval.Shape, eval.Effect, error)
- func (empty EmptySymbol) Splay() tree.Tree
- func (empty EmptySymbol) String() string
- func (empty EmptySymbol) Type() Type
- type EmptyType
- type EvokeArg
- type FieldSymbol
- type FieldSymbols
- type FieldType
- type InterpretMacro
- type KeyValueSymbol
- type MapSymbol
- func (ms *MapSymbol) Augment(span *model.Span, _ eval.Fields) (eval.Shape, eval.Effect, error)
- func (ms *MapSymbol) DisassembleToGo(span *model.Span) (reflect.Value, error)
- func (ms *MapSymbol) DisassembleToPB(span *model.Span) (*pb.Symbol, error)
- func (ms *MapSymbol) Equal(span *model.Span, sym Symbol) bool
- func (ms *MapSymbol) Hash(span *model.Span) model.ID
- func (ms *MapSymbol) Invoke(span *model.Span) (eval.Shape, eval.Effect, error)
- func (ms *MapSymbol) LiftToSeries(span *model.Span) *SeriesSymbol
- func (ms *MapSymbol) Link(span *model.Span, name string, monadic bool) (eval.Shape, eval.Effect, error)
- func (ms *MapSymbol) Select(span *model.Span, path model.Path) (eval.Shape, eval.Effect, error)
- func (ms *MapSymbol) SortedKeys() []string
- func (ms *MapSymbol) Splay() tree.Tree
- func (ms *MapSymbol) String() string
- func (ms *MapSymbol) Type() Type
- type MapType
- type NamedSymbol
- func (named *NamedSymbol) Augment(span *model.Span, _ eval.Fields) (eval.Shape, eval.Effect, error)
- func (named *NamedSymbol) DisassembleToGo(span *model.Span) (reflect.Value, error)
- func (named *NamedSymbol) DisassembleToPB(span *model.Span) (*pb.Symbol, error)
- func (named *NamedSymbol) Equal(span *model.Span, sym Symbol) bool
- func (named *NamedSymbol) GoType() reflect.Type
- func (named *NamedSymbol) Hash(span *model.Span) model.ID
- func (named *NamedSymbol) Invoke(span *model.Span) (eval.Shape, eval.Effect, error)
- func (named *NamedSymbol) LiftToSeries(span *model.Span) *SeriesSymbol
- func (named *NamedSymbol) Link(span *model.Span, name string, monadic bool) (eval.Shape, eval.Effect, error)
- func (named *NamedSymbol) Select(span *model.Span, path model.Path) (eval.Shape, eval.Effect, error)
- func (named *NamedSymbol) Splay() tree.Tree
- func (named *NamedSymbol) String() string
- func (named *NamedSymbol) Type() Type
- func (named *NamedSymbol) Walk(span *model.Span, field string) (Symbol, error)
- type NamedType
- type OpaqueSymbol
- func (opaque *OpaqueSymbol) Augment(span *model.Span, _ eval.Fields) (eval.Shape, eval.Effect, error)
- func (opaque *OpaqueSymbol) DisassembleToGo(span *model.Span) (reflect.Value, error)
- func (opaque *OpaqueSymbol) DisassembleToPB(span *model.Span) (*pb.Symbol, error)
- func (opaque *OpaqueSymbol) Equal(span *model.Span, sym Symbol) bool
- func (opaque *OpaqueSymbol) GoType() reflect.Type
- func (opaque *OpaqueSymbol) Hash(span *model.Span) model.ID
- func (opaque *OpaqueSymbol) Interface() interface{}
- func (opaque *OpaqueSymbol) Invoke(span *model.Span) (eval.Shape, eval.Effect, error)
- func (opaque *OpaqueSymbol) LiftToSeries(span *model.Span) *SeriesSymbol
- func (opaque *OpaqueSymbol) Link(span *model.Span, name string, monadic bool) (eval.Shape, eval.Effect, error)
- func (opaque *OpaqueSymbol) Select(span *model.Span, path model.Path) (eval.Shape, eval.Effect, error)
- func (opaque *OpaqueSymbol) Splay() tree.Tree
- func (opaque *OpaqueSymbol) String() string
- func (opaque *OpaqueSymbol) Type() Type
- type OpaqueType
- type OptionalType
- type SeriesSymbol
- func (ss *SeriesSymbol) Augment(span *model.Span, _ eval.Fields) (eval.Shape, eval.Effect, error)
- func (ss *SeriesSymbol) DisassembleToGo(span *model.Span) (reflect.Value, error)
- func (ss *SeriesSymbol) DisassembleToPB(span *model.Span) (*pb.Symbol, error)
- func (ss *SeriesSymbol) Equal(span *model.Span, sym Symbol) bool
- func (ss *SeriesSymbol) Hash(span *model.Span) model.ID
- func (ss *SeriesSymbol) Invoke(span *model.Span) (eval.Shape, eval.Effect, error)
- func (ss *SeriesSymbol) IsEmpty() bool
- func (ss *SeriesSymbol) Len() int
- func (ss *SeriesSymbol) LiftToSeries(span *model.Span) *SeriesSymbol
- func (ss *SeriesSymbol) Link(span *model.Span, name string, monadic bool) (eval.Shape, eval.Effect, error)
- func (ss *SeriesSymbol) Select(span *model.Span, path model.Path) (eval.Shape, eval.Effect, error)
- func (ss *SeriesSymbol) Splay() tree.Tree
- func (ss *SeriesSymbol) String() string
- func (ss *SeriesSymbol) Type() Type
- type SeriesType
- type StructSymbol
- func (ss *StructSymbol) Augment(span *model.Span, _ eval.Fields) (eval.Shape, eval.Effect, error)
- func (ss *StructSymbol) DisassembleToGo(span *model.Span) (reflect.Value, error)
- func (ss *StructSymbol) DisassembleToPB(span *model.Span) (*pb.Symbol, error)
- func (ss *StructSymbol) Equal(span *model.Span, sym Symbol) bool
- func (ss *StructSymbol) FindMonadic() *FieldSymbol
- func (ss *StructSymbol) FindName(name string) *FieldSymbol
- func (ss *StructSymbol) GetMonadic() (Symbol, bool)
- func (ss *StructSymbol) Hash(span *model.Span) model.ID
- func (ss *StructSymbol) Invoke(span *model.Span) (eval.Shape, eval.Effect, error)
- func (ss *StructSymbol) IsEmpty() bool
- func (ss *StructSymbol) LiftToSeries(span *model.Span) *SeriesSymbol
- func (ss *StructSymbol) Link(span *model.Span, name string, monadic bool) (eval.Shape, eval.Effect, error)
- func (ss *StructSymbol) LinkField(name string, monadic bool) Symbol
- func (ss *StructSymbol) Select(span *model.Span, path model.Path) (_ eval.Shape, _ eval.Effect, err error)
- func (ss *StructSymbol) Splay() tree.Tree
- func (ss *StructSymbol) String() string
- func (ss *StructSymbol) Type() Type
- func (ss *StructSymbol) Walk(step string) Symbol
- type StructType
- type Symbol
- func Assemble(span *model.Span, asm VarietyAssembler, pbSymbol *pb.Symbol) Symbol
- func AssembleWithError(span *model.Span, asm VarietyAssembler, pbSymbol *pb.Symbol) (res Symbol, err error)
- func BasicBoolSymbol(b bool) Symbol
- func BasicByteSymbol(i byte) Symbol
- func BasicInt32Symbol(i int32) Symbol
- func BasicInt64Symbol(i int64) Symbol
- func BasicStringSymbol(s string) Symbol
- func DecodeSymbol(span *model.Span, asm VarietyAssembler, gzipped []byte) (Symbol, error)
- func Deconstruct(span *model.Span, v reflect.Value) Symbol
- func DeconstructInterface(span *model.Span, any interface{}) Symbol
- func DeconstructKind(span *model.Span, v reflect.Value) Symbol
- func Evoke(vty *VarietySymbol, args ...EvokeArg) Symbol
- func ExtractMap(span *model.Span, s Symbol, mapType reflect.Type) (Symbol, error)
- func FindIntegrationKey(from *MapSymbol, to reflect.StructField) Symbol
- func MakeMapSymbol(span *model.Span, m map[string]Symbol) (Symbol, error)
- func MakeSeriesSymbol(span *model.Span, elem Symbols) (Symbol, error)
- func MakeStringsSymbol(span *model.Span, ss []string) Symbol
- type Symbols
- type Type
- type Types
- type VarietyAssembler
- type VarietySymbol
- func (vty *VarietySymbol) Augment(span *model.Span, fields eval.Fields) (eval.Shape, eval.Effect, error)
- func (vty *VarietySymbol) DisassembleToGo(span *model.Span) (reflect.Value, error)
- func (vty *VarietySymbol) DisassembleToPB(span *model.Span) (*pb.Symbol, error)
- func (vty *VarietySymbol) Dismentle(span *model.Span) (pkgPath, funcName string, arg *StructSymbol, err error)
- func (vty *VarietySymbol) Equal(span *model.Span, sym Symbol) bool
- func (vty *VarietySymbol) Evoke(span *model.Span, fields eval.Fields) (Symbol, eval.Effect, error)
- func (vty *VarietySymbol) Hash(span *model.Span) model.ID
- func (vty *VarietySymbol) Invoke(span *model.Span) (eval.Shape, eval.Effect, error)
- func (vty *VarietySymbol) LiftToSeries(span *model.Span) *SeriesSymbol
- func (vty *VarietySymbol) Link(span *model.Span, name string, monadic bool) (eval.Shape, eval.Effect, error)
- func (vty *VarietySymbol) Select(span *model.Span, path model.Path) (eval.Shape, eval.Effect, error)
- func (vty *VarietySymbol) Splay() tree.Tree
- func (vty *VarietySymbol) String() string
- func (vty *VarietySymbol) Type() Type
- type VarietyType
Constants ¶
This section is empty.
Variables ¶
var ( BasicTrue = BasicSymbol{true} BasicFalse = BasicSymbol{false} )
var EmptySeries = &SeriesSymbol{ Type_: &SeriesType{Elem: EmptyType{}}, }
Functions ¶
func AsBasicBool ¶
func AsBasicString ¶
func FieldSymbolsEqual ¶
func FieldSymbolsEqual(span *model.Span, x, y FieldSymbols) bool
func FieldSymbolsHash ¶
func FieldSymbolsHash(span *model.Span, fields FieldSymbols) model.ID
func FilterUnderscoreFields ¶
FilterUnderscoreFields filters out all fields whose name begins with underscore.
func IntegrateInterface ¶
IntegrateInterface integrates a Ko value into a Go value of given type, returning the Go value as interface{}.
func IsEmptySymbol ¶
func IsEmptyType ¶
func IsSignedIntegerType ¶
func IsUnsignedIntegerType ¶
func IsVarietySymbol ¶
func SignedMaximal ¶
func UnsignedMaximal ¶
func VerifyNoDuplicateFieldSymbol ¶
func VerifyNoDuplicateFieldSymbol(span *model.Span, fieldSymbols FieldSymbols) error
Types ¶
type BasicSymbol ¶
type BasicSymbol struct {
Value interface{} `ko:"name=value"`
}
func MakeBasicSymbol ¶
func MakeBasicSymbol(span *model.Span, v interface{}) BasicSymbol
func (BasicSymbol) ConvertTo ¶
func (basic BasicSymbol) ConvertTo(span *model.Span, to BasicType) (BasicSymbol, error)
func (BasicSymbol) DisassembleToGo ¶
DisassembleToGo converts a Ko value into a Go value
func (BasicSymbol) DisassembleToPB ¶
DisassembleToPB converts a Ko value into a protobuf
func (BasicSymbol) GoValue ¶
func (basic BasicSymbol) GoValue() reflect.Value
func (BasicSymbol) LiftToSeries ¶
func (basic BasicSymbol) LiftToSeries(span *model.Span) *SeriesSymbol
func (BasicSymbol) Splay ¶
func (basic BasicSymbol) Splay() tree.Tree
func (BasicSymbol) String ¶
func (basic BasicSymbol) String() string
func (BasicSymbol) Type ¶
func (basic BasicSymbol) Type() Type
type BasicType ¶
type BasicType int
BasicType is the type for basic values such as strings, bools and numbers
func BasicFromKind ¶
type BlobSymbol ¶
func MakeBlobSymbol ¶
func MakeBlobSymbol(b []byte) *BlobSymbol
func (*BlobSymbol) Bytes ¶
func (blob *BlobSymbol) Bytes() []byte
func (*BlobSymbol) DisassembleToGo ¶
DisassembleToGo converts a Ko value into a Go value
func (*BlobSymbol) DisassembleToPB ¶
DisassembleToPB converts a Ko value into a protobuf
func (*BlobSymbol) LiftToSeries ¶
func (blob *BlobSymbol) LiftToSeries(span *model.Span) *SeriesSymbol
func (*BlobSymbol) Splay ¶
func (blob *BlobSymbol) Splay() tree.Tree
func (*BlobSymbol) String ¶
func (blob *BlobSymbol) String() string
func (*BlobSymbol) Type ¶
func (blob *BlobSymbol) Type() Type
type BlobType ¶
type BlobType struct{}
BlobType captures the []byte type.
type EmptySymbol ¶
type EmptySymbol struct{}
func (EmptySymbol) DisassembleToGo ¶
DisassembleToGo converts a Ko value into a Go value
func (EmptySymbol) DisassembleToPB ¶
DisassembleToPB converts a Ko value into a protobuf
func (EmptySymbol) LiftToSeries ¶
func (empty EmptySymbol) LiftToSeries(span *model.Span) *SeriesSymbol
func (EmptySymbol) Splay ¶
func (empty EmptySymbol) Splay() tree.Tree
func (EmptySymbol) String ¶
func (empty EmptySymbol) String() string
func (EmptySymbol) Type ¶
func (empty EmptySymbol) Type() Type
type EmptyType ¶
type EmptyType struct{}
type FieldSymbol ¶
type FieldSymbol struct { Name string `ko:"name=name"` Monadic bool `ko:"name=monadic"` Value Symbol `ko:"name=value"` }
func FindIntegrationField ¶
func FindIntegrationField(from *StructSymbol, to reflect.StructField) *FieldSymbol
type FieldSymbols ¶
type FieldSymbols []*FieldSymbol
func FilterEmptyFieldSymbols ¶
func FilterEmptyFieldSymbols(fields FieldSymbols) (filtered FieldSymbols)
func GroupFieldsToSymbols ¶
func (FieldSymbols) Copy ¶
func (fs FieldSymbols) Copy() FieldSymbols
func (FieldSymbols) Len ¶
func (fs FieldSymbols) Len() int
func (FieldSymbols) Less ¶
func (fs FieldSymbols) Less(i, j int) bool
func (FieldSymbols) Sort ¶
func (fs FieldSymbols) Sort()
func (FieldSymbols) Swap ¶
func (fs FieldSymbols) Swap(i, j int)
type FieldType ¶
func FieldSymbolTypes ¶
func FieldSymbolTypes(fields FieldSymbols) []*FieldType
type InterpretMacro ¶
type InterpretMacro interface {
InterpretFunc() (pkgPath, funcName string)
}
type KeyValueSymbol ¶
type MapSymbol ¶
MapSymbol captures map[string]Q types.
func (*MapSymbol) DisassembleToGo ¶
DisassembleToGo converts a Ko value into a Go value
func (*MapSymbol) DisassembleToPB ¶
DisassembleToPB converts a Ko value into a protobuf
func (*MapSymbol) LiftToSeries ¶
func (ms *MapSymbol) LiftToSeries(span *model.Span) *SeriesSymbol
func (*MapSymbol) SortedKeys ¶
type MapType ¶
type MapType struct {
Value Type `ko:"name=type"`
}
MapType is the type capturing map[string]T
type NamedSymbol ¶
func (*NamedSymbol) DisassembleToGo ¶
DisassembleToGo converts a Ko value into a Go value
func (*NamedSymbol) DisassembleToPB ¶
DisassembleToPB converts a Ko value into a protobuf
func (*NamedSymbol) GoType ¶
func (named *NamedSymbol) GoType() reflect.Type
func (*NamedSymbol) LiftToSeries ¶
func (named *NamedSymbol) LiftToSeries(span *model.Span) *SeriesSymbol
func (*NamedSymbol) Splay ¶
func (named *NamedSymbol) Splay() tree.Tree
func (*NamedSymbol) String ¶
func (named *NamedSymbol) String() string
func (*NamedSymbol) Type ¶
func (named *NamedSymbol) Type() Type
type OpaqueSymbol ¶
func (*OpaqueSymbol) DisassembleToGo ¶
DisassembleToGo converts a Ko value into a Go value
func (*OpaqueSymbol) DisassembleToPB ¶
DisassembleToPB converts a Ko value into a protobuf
func (*OpaqueSymbol) GoType ¶
func (opaque *OpaqueSymbol) GoType() reflect.Type
func (*OpaqueSymbol) Interface ¶
func (opaque *OpaqueSymbol) Interface() interface{}
func (*OpaqueSymbol) LiftToSeries ¶
func (opaque *OpaqueSymbol) LiftToSeries(span *model.Span) *SeriesSymbol
func (*OpaqueSymbol) Splay ¶
func (opaque *OpaqueSymbol) Splay() tree.Tree
func (*OpaqueSymbol) String ¶
func (opaque *OpaqueSymbol) String() string
func (*OpaqueSymbol) Type ¶
func (opaque *OpaqueSymbol) Type() Type
type OpaqueType ¶
OpaqueType captures a specific Go type.
func (*OpaqueType) GoType ¶
func (ot *OpaqueType) GoType() reflect.Type
GoType returns the Go equivalent of the type.
func (*OpaqueType) IsType ¶
func (ot *OpaqueType) IsType()
func (*OpaqueType) Splay ¶
func (ot *OpaqueType) Splay() tree.Tree
func (*OpaqueType) String ¶
func (ot *OpaqueType) String() string
type OptionalType ¶
type OptionalType struct {
Elem Type `ko:"name=elem"`
}
func (*OptionalType) GoType ¶
func (ot *OptionalType) GoType() reflect.Type
GoType returns the Go equivalent of the type.
func (*OptionalType) IsType ¶
func (*OptionalType) IsType()
func (*OptionalType) Splay ¶
func (ot *OptionalType) Splay() tree.Tree
func (*OptionalType) String ¶
func (ot *OptionalType) String() string
type SeriesSymbol ¶
type SeriesSymbol struct { Type_ *SeriesType `ko:"name=type"` Elem Symbols `ko:"name=elem"` }
func (*SeriesSymbol) DisassembleToGo ¶
DisassembleToGo converts a Ko value into a Go value
func (*SeriesSymbol) DisassembleToPB ¶
DisassembleToPB converts a Ko value into a protobuf
func (*SeriesSymbol) IsEmpty ¶
func (ss *SeriesSymbol) IsEmpty() bool
func (*SeriesSymbol) Len ¶
func (ss *SeriesSymbol) Len() int
func (*SeriesSymbol) LiftToSeries ¶
func (ss *SeriesSymbol) LiftToSeries(span *model.Span) *SeriesSymbol
func (*SeriesSymbol) Splay ¶
func (ss *SeriesSymbol) Splay() tree.Tree
func (*SeriesSymbol) String ¶
func (ss *SeriesSymbol) String() string
func (*SeriesSymbol) Type ¶
func (ss *SeriesSymbol) Type() Type
type SeriesType ¶
type SeriesType struct {
Elem Type `ko:"name=elem"`
}
func (*SeriesType) GoType ¶
func (st *SeriesType) GoType() reflect.Type
GoType returns the Go equivalent of the type.
func (*SeriesType) IsType ¶
func (*SeriesType) IsType()
func (*SeriesType) Splay ¶
func (st *SeriesType) Splay() tree.Tree
func (*SeriesType) String ¶
func (st *SeriesType) String() string
type StructSymbol ¶
type StructSymbol struct { Type_ *StructType `ko:"name=type"` Field FieldSymbols `ko:"name=field"` }
func DecodeArg ¶
func DecodeArg(span *model.Span, asm VarietyAssembler, argBytes []byte) (*StructSymbol, error)
func FilterEmptyStructFields ¶
func FilterEmptyStructFields(ss *StructSymbol) *StructSymbol
func MakeStructSymbol ¶
func MakeStructSymbol(fields FieldSymbols) *StructSymbol
func (*StructSymbol) DisassembleToGo ¶
DisassembleToGo converts a Ko value into a Go value
func (*StructSymbol) DisassembleToPB ¶
DisassembleToPB converts a Ko value into a protobuf
func (*StructSymbol) FindMonadic ¶
func (ss *StructSymbol) FindMonadic() *FieldSymbol
func (*StructSymbol) FindName ¶
func (ss *StructSymbol) FindName(name string) *FieldSymbol
func (*StructSymbol) GetMonadic ¶
func (ss *StructSymbol) GetMonadic() (Symbol, bool)
func (*StructSymbol) IsEmpty ¶
func (ss *StructSymbol) IsEmpty() bool
func (*StructSymbol) LiftToSeries ¶
func (ss *StructSymbol) LiftToSeries(span *model.Span) *SeriesSymbol
func (*StructSymbol) LinkField ¶
func (ss *StructSymbol) LinkField(name string, monadic bool) Symbol
func (*StructSymbol) Splay ¶
func (ss *StructSymbol) Splay() tree.Tree
func (*StructSymbol) String ¶
func (ss *StructSymbol) String() string
func (*StructSymbol) Type ¶
func (ss *StructSymbol) Type() Type
func (*StructSymbol) Walk ¶
func (ss *StructSymbol) Walk(step string) Symbol
type StructType ¶
type StructType struct {
Field []*FieldType `ko:"name=field"`
}
func (*StructType) GoType ¶
func (st *StructType) GoType() reflect.Type
GoType returns the Go equivalent of the type.
func (*StructType) GoTypeAndNameMap ¶
func (st *StructType) GoTypeAndNameMap() (reflect.Type, map[string]string)
GoTypeAndNameMap returns the Go equivalent of the type and a map from Ko (field) name to Go (field) name
func (*StructType) IsType ¶
func (*StructType) IsType()
func (*StructType) Splay ¶
func (st *StructType) Splay() tree.Tree
func (*StructType) String ¶
func (st *StructType) String() string
type Symbol ¶
type Symbol interface { eval.Shape // String, Select, Augment, Invoke, Link tree.Splayer // Splay Type() Type Hash(*model.Span) model.ID Equal(*model.Span, Symbol) bool LiftToSeries(*model.Span) *SeriesSymbol // DisassembleToGo converts a Ko value into a Go value DisassembleToGo(*model.Span) (reflect.Value, error) // DisassembleToPB converts a Ko value into a protobuf DisassembleToPB(*model.Span) (*pb.Symbol, error) }
Symbol implementations:
BasicSymbol, EmptySymbol,
*SeriesSymbol, *StructSymbol *NamedSymbol, *OpaqueSymbol, *MapSymbol *VarietySymbol, *BlobSymbol
func AssembleWithError ¶
func BasicBoolSymbol ¶
func BasicByteSymbol ¶
func BasicInt32Symbol ¶
func BasicInt64Symbol ¶
func BasicStringSymbol ¶
func DecodeSymbol ¶
func Deconstruct ¶
Deconstruct a Go value into a Ko value
func DeconstructInterface ¶
DeconstructInterface deconstructs a Go interface value into a Ko value
func Evoke ¶
func Evoke(vty *VarietySymbol, args ...EvokeArg) Symbol
func FindIntegrationKey ¶
func FindIntegrationKey(from *MapSymbol, to reflect.StructField) Symbol
type Symbols ¶
type Symbols []Symbol
func FilterEmptySymbols ¶
type Type ¶
type Type interface { // String returns a string representation of the type String() string tree.Splayer // IsType is only used to enforce the implementation of Type IsType() // GoType returns the Go equivalent of the type. GoType() reflect.Type }
Type implementations: *OptionalType
BasicType, EmptyType,
*SeriesType, *StructType NamedType, *OpaqueType, *MapType VarietyType BlobType
func Optionally ¶
Optionally makes a type optional, unless it is already optional or series.
type VarietyAssembler ¶
type VarietySymbol ¶
type VarietySymbol struct { Macro eval.Macro `ko:"name=macro"` Arg FieldSymbols `ko:"name=arg"` }
func MakeVarietySymbol ¶
func MakeVarietySymbol(macro eval.Macro, arg FieldSymbols) *VarietySymbol
func (*VarietySymbol) DisassembleToGo ¶
DisassembleToGo converts a Ko value into a Go value
func (*VarietySymbol) DisassembleToPB ¶
DisassembleToPB converts a Ko value into a protobuf
func (*VarietySymbol) Dismentle ¶
func (vty *VarietySymbol) Dismentle(span *model.Span) (pkgPath, funcName string, arg *StructSymbol, err error)
func (*VarietySymbol) LiftToSeries ¶
func (vty *VarietySymbol) LiftToSeries(span *model.Span) *SeriesSymbol
func (*VarietySymbol) Splay ¶
func (vty *VarietySymbol) Splay() tree.Tree
func (*VarietySymbol) String ¶
func (vty *VarietySymbol) String() string
func (*VarietySymbol) Type ¶
func (vty *VarietySymbol) Type() Type
type VarietyType ¶
type VarietyType struct{}
VarietyType captures a function type
func (VarietyType) GoType ¶
func (nt VarietyType) GoType() reflect.Type
GoType returns the Go equivalent of the type.
func (VarietyType) IsType ¶
func (VarietyType) IsType()
func (VarietyType) Splay ¶
func (VarietyType) Splay() tree.Tree
func (VarietyType) String ¶
func (VarietyType) String() string