Documentation
¶
Index ¶
Constants ¶
View Source
const ( JoinMethodJoin = "join" JoinMethodError = "error" )
View Source
const RS = ls.LS + "reshape/"
Variables ¶
View Source
var ( ErrInvalidSource = errors.New("Invalid source") ErrMultipleSourceNodesForObject = errors.New("Multiple source nodes specified for an object") ErrSourceMustBeString = errors.New("source term value must be a string") )
View Source
var ErrInvalidConditional = errors.New("Invalid conditional")
View Source
var ErrInvalidVariables = errors.New("Invalid vars section")
View Source
var ErrJoinFailure = errors.New("Join failure")
View Source
var ReshapeTerms = struct { // If given, the If term specifies a predicate that should be true to reshape the node If string // Vars defines a list of expressions that pull values from the // source graph and define them as variables Vars string // Source specifies the source value to be used to generate the target value Source string // IfEmpty determines whether to reshape the node even if it has no value IfEmpty string // JoinMethod determines how to join multiple values to generate a single value JoinMethod string // JoinDelimiter specifies the join delimiter if there are multiple values to be combined JoinDelimiter string }{ If: ls.NewTerm(RS+"if", false, false, ls.OverrideComposition, struct { ifSemantics }{}), Vars: ls.NewTerm(RS+"vars", false, true, ls.OverrideComposition, struct { varsSemantics }{}), Source: ls.NewTerm(RS+"source", false, false, ls.OverrideComposition, struct { sourceSemantics }{}), IfEmpty: ls.NewTerm(RS+"ifEmpty", false, false, ls.OverrideComposition, nil), JoinMethod: ls.NewTerm(RS+"joinMethod", false, false, ls.OverrideComposition, nil), JoinDelimiter: ls.NewTerm(RS+"joinDelimiter", false, false, ls.OverrideComposition, nil), }
ReshapeTerms defines the terms used to specify reshaping layers
Functions ¶
Types ¶
type ErrInvalidSchemaNodeType ¶
type ErrInvalidSchemaNodeType []string
ErrInvalidSchemaNodeType is returned if the schema node type cannot be projected (such as a reference, which cannot happen after compilation)
func (ErrInvalidSchemaNodeType) Error ¶
func (e ErrInvalidSchemaNodeType) Error() string
type ReshapeContext ¶
type ReshapeContext struct {
// contains filtered or unexported fields
}
func (*ReshapeContext) CurrentSchemaNode ¶
func (p *ReshapeContext) CurrentSchemaNode() ls.Node
Click to show internal directories.
Click to hide internal directories.