Documentation
¶
Index ¶
- Variables
- func Check(v g.Value, want affine.Affinity) (err error)
- func ConvertValue(run rt.Runtime, val g.Value, out affine.Affinity) (ret g.Value, err error)
- func FillRecord(run rt.Runtime, rec *g.Record, keys []string, vals []g.Value) (ret *g.Record, err error)
- func GetAssignment(run rt.Runtime, a rt.Assignment) (ret g.Value, err error)
- func GetBool(run rt.Runtime, eval rt.BoolEval) (ret g.Value, err error)
- func GetFlag(run rt.Runtime, opt meta.Options) (ret bool)
- func GetNumList(run rt.Runtime, eval rt.NumListEval) (ret g.Value, err error)
- func GetNumber(run rt.Runtime, eval rt.NumberEval) (ret g.Value, err error)
- func GetOptionalBool(run rt.Runtime, eval rt.BoolEval, fallback bool) (ret g.Value, err error)
- func GetOptionalNumber(run rt.Runtime, eval rt.NumberEval, fallback float64) (ret g.Value, err error)
- func GetOptionalNumbers(run rt.Runtime, eval rt.NumListEval, fallback []float64) (ret g.Value, err error)
- func GetOptionalText(run rt.Runtime, eval rt.TextEval, fallback string) (ret g.Value, err error)
- func GetOptionalTexts(run rt.Runtime, eval rt.TextListEval, fallback []string) (ret g.Value, err error)
- func GetRecord(run rt.Runtime, eval rt.RecordEval) (ret g.Value, err error)
- func GetRecordList(run rt.Runtime, eval rt.RecordListEval) (ret g.Value, err error)
- func GetTemplateText() (ret g.Value)
- func GetText(run rt.Runtime, eval rt.TextEval) (ret g.Value, err error)
- func GetTextList(run rt.Runtime, eval rt.TextListEval) (ret g.Value, err error)
- func IsKindOf(run rt.Runtime, obj, kind string) (ret bool, err error)
- func ObjectText(run rt.Runtime, eval rt.TextEval) (ret g.Value, err error)
- func PopSeveral(run rt.Runtime, p int)
- func Range(i, min, max int) (ret int, err error)
- func RectifyText(run rt.Runtime, ft g.Field, val g.Value) (ret g.Value, err error)
- func Run(run rt.Runtime, exe rt.Execute) (err error)
- func RunAll(run rt.Runtime, exes []rt.Execute) (err error)
- func Truthy(v g.Value) (ret bool)
- func WriteText(run rt.Runtime, eval rt.TextEval) (err error)
- type LabelFinder
- type MissingEval
Constants ¶
This section is empty.
Variables ¶
var HackTillTemplatesCanEvaluatePatternTypes g.Value
fix! ( at the very least should live in pattern but we need to remove its few -- tests and Determine -- dependencies on core
Functions ¶
func ConvertValue ¶
func FillRecord ¶
func FillRecord(run rt.Runtime, rec *g.Record, keys []string, vals []g.Value) (ret *g.Record, err error)
FillRecord fill the passed record with the arguments named by keys and values keys are optional, but if they exist must match the order of fields in the record; there doesnt have to be be a key for every field; they can be sparse. if there are more values than keys, this assumes the first few values are indexed ( keys are right justified ) returns the passed record if there's no error
func GetAssignment ¶
handles null assignments by returning "MissingEval" error ( cant live in package safe because package assign uses package safe )
func GetNumList ¶
GetNumList returns an new iterator to walk the passed list, or an empty iterator if the value is null.
func GetOptionalBool ¶
GetOptionalBool runs the optionally specified eval.
func GetOptionalNumber ¶
func GetOptionalNumber(run rt.Runtime, eval rt.NumberEval, fallback float64) (ret g.Value, err error)
GetOptionalNumber runs the optionally specified eval.
func GetOptionalNumbers ¶
func GetOptionalNumbers(run rt.Runtime, eval rt.NumListEval, fallback []float64) (ret g.Value, err error)
GetOptionalNumber runs the optionally specified eval.
func GetOptionalText ¶
GetOptionalText runs the optionally specified eval.
func GetOptionalTexts ¶
func GetOptionalTexts(run rt.Runtime, eval rt.TextListEval, fallback []string) (ret g.Value, err error)
GetOptionalText runs the optionally specified eval.
func GetRecordList ¶
GetRecordList returns an new iterator to walk the passed list, or an empty iterator if the value is null.
func GetTemplateText ¶
func GetTextList ¶
GetTextList returns an new iterator to walk the passed list, or an empty iterator if the value is null.
func ObjectText ¶
ObjectText - given an eval producing a name, return a string value of the object's id. can return a valid "empty" value for empty strings
func PopSeveral ¶
func RectifyText ¶
used when converting values to fields that might require objects. if the target field (ex. a pattern local) requires text of a certain type and the incoming value is untyped, try to convert it.
func Run ¶
Run executes the passed statement using the passed runtime; does *not* error if the passed exec is nil.
Types ¶
type LabelFinder ¶
type LabelFinder struct {
// contains filtered or unexported fields
}
func NewLabelFinder ¶
type MissingEval ¶
type MissingEval string
MissingEval error type for unknown variables while processing loops.
func (MissingEval) Error ¶
func (e MissingEval) Error() string
Error returns the name of the unknown variable.