Documentation ¶
Index ¶
- Variables
- func DesugarCall(g *graph.Graph, call string) (string, error)
- func EvalMember(name string, obj interface{}) (reflect.Value, error)
- func EvalTerms(obj interface{}, terms ...string) (interface{}, error)
- func Find(slice []string, f func(string) bool) (string, bool)
- func HasField(obj interface{}, fieldName string) bool
- func HasMethod(obj interface{}, methodName string) bool
- func HasPath(obj interface{}, terms ...string) error
- func Inits(in []string) [][]string
- func JoinTerms(s []string) string
- func ListFields(obj interface{}) ([]string, error)
- func LookupCanonicalFieldName(t reflect.Type, term string) (string, error)
- func MkCallPipeline(s string) string
- func Prefixes(in string) (out []string)
- func SplitTerms(in string) []string
- func VertexSplit(g *graph.Graph, s string) (string, string, bool)
- type Preprocessor
Constants ¶
This section is empty.
Variables ¶
var ErrUnresolvable = errors.New("field is unresolvable")
ErrUnresolvable indicates that a field exists but is unresolvable due to nil references
Functions ¶
func DesugarCall ¶
DesugarCall takes a call in the form of "a.b.c.d" and returns a desugared string that will work with the language extension provided by calling .Language()
func EvalMember ¶
EvalMember gets a member from a stuct, dereferencing pointers as necessary
func ListFields ¶
ListFields returns a list of fields for the struct
func LookupCanonicalFieldName ¶
LookupCanonicalFieldName takes a type and an arbitrarily cased field name and returns the field name with a case that matches the actual field.
func MkCallPipeline ¶
MkCallPipeline transforms a term group (b.c.d) into a pipeline (b | c | d)
func Prefixes ¶
Prefixes returns a set of prefixes for a string, e.g. "a.b.c.d" will yield []string{"a.b.c.d","a.b.c","a.b.","a"}
func SplitTerms ¶
SplitTerms takes a string and splits it on '.'
Types ¶
type Preprocessor ¶
type Preprocessor struct {
// contains filtered or unexported fields
}
Preprocessor is a template preprocessor
func New ¶
func New(g *graph.Graph) *Preprocessor
New creates a new preprocessor for the specified graph