Documentation ¶
Index ¶
- func Pipeline(g *graph.Graph, id string, factory *Factory, top Values) executor.Pipeline
- func Render(ctx context.Context, g *graph.Graph, top Values) (*graph.Graph, error)
- type ErrBadTemplate
- type ErrUnresolvable
- type Factory
- type LazyValue
- type PrepareThunk
- type Renderer
- type ValueThunk
- type Values
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ErrBadTemplate ¶
type ErrBadTemplate struct{ Err error }
ErrBadTemplate is returned by Render if the template string causes an error. It is likely to be returned in cases where a predicate function is rendered and does not result in a boolean value.
func (ErrBadTemplate) Error ¶
func (e ErrBadTemplate) Error() string
type ErrUnresolvable ¶
type ErrUnresolvable struct{}
ErrUnresolvable is returned by Render if the template string tries to resolve unaccesible node properties.
func (ErrUnresolvable) Error ¶
func (ErrUnresolvable) Error() string
type Factory ¶
type Factory struct { Graph *graph.Graph DotValues map[string]*LazyValue Language *extensions.LanguageExtension }
Factory generates Renderers
func NewFactory ¶
NewFactory generates a new Render factory
type LazyValue ¶
type LazyValue struct {
// contains filtered or unexported fields
}
LazyValue wraps a ValueThunk in an interface and provides a way to cache the thunk evaluation.
type PrepareThunk ¶
type PrepareThunk struct { // prevent hashing thunks into a single value Data []byte Thunk func(*Factory) (resource.Task, error) `hash:"ignore"` }
PrepareThunk returns a possibly lazily evaluated preparer
func (*PrepareThunk) Apply ¶
func (p *PrepareThunk) Apply(context.Context) (resource.TaskStatus, error)
Apply allows thunk to implement resource.Task
func (*PrepareThunk) Check ¶
func (p *PrepareThunk) Check(context.Context, resource.Renderer) (resource.TaskStatus, error)
Check allows thunk to implement resource.Task
type Renderer ¶
type Renderer struct { Graph func() *graph.Graph ID string DotValue resource.Value DotValuePresent bool Language *extensions.LanguageExtension // contains filtered or unexported fields }
Renderer to be passed to preparers, which will render strings
type ValueThunk ¶
ValueThunk lazily evaluates a param
Directories ¶
Path | Synopsis |
---|---|
Package extensions defines custom extensions to the go text templating language.
|
Package extensions defines custom extensions to the go text templating language. |
platform
Package platform queries the underlying operating system
|
Package platform queries the underlying operating system |