Documentation
¶
Index ¶
- func LookupFields(entityPtr interface{}) bool
- func Parse(url string, quirks []string, inputs map[string]interface{}) (*normal.ServiceTemplate, *problems.Problems, error)
- func Render(entityPtr interface{}) tosca.EntityPtrs
- func SetInputs(entityPtr interface{}, inputs map[string]interface{})
- type Context
- func (self *Context) AddHierarchies()
- func (self *Context) AddNamespaces()
- func (self *Context) AddUnit(entityPtr interface{}, container *Unit, nameTransformer tosca.NameTransformer) *Unit
- func (self *Context) Gather(pattern string) tosca.EntityPtrs
- func (self *Context) GetInheritTasks() Tasks
- func (self *Context) GetProblems() *problems.Problems
- func (self *Context) LookupNames()
- func (self *Context) PrintHierarchies(indent int)
- func (self *Context) PrintImports(indent int)
- func (self *Context) PrintNamespaces(indent int)
- func (self *Context) ReadRoot(url urlpkg.URL) bool
- func (self *Context) Render() tosca.EntityPtrs
- func (self *Context) Traverse(phase string, traverse reflection.Traverser)
- type ContextualWork
- type EntityWork
- type Executor
- type HasInputs
- type InheritContext
- type InheritField
- type InheritFields
- type LookupField
- type LookupName
- type LookupProblems
- type NoEntity
- type Promise
- type Renderable
- type Task
- func (self *Task) AddDependency(task *Task)
- func (self *Task) Done()
- func (self *Task) Execute()
- func (self *Task) IsIndependent() bool
- func (self *Task) Print(indent int)
- func (self *Task) PrintDependencies(indent int, treePrefix terminal.TreePrefix)
- func (self *Task) PrintDependency(indent int, treePrefix terminal.TreePrefix, last bool)
- type TaskList
- type Tasks
- type TasksForEntities
- type Unit
- func (self *Unit) AddImport(import_ *Unit)
- func (self *Unit) GetContext() *tosca.Context
- func (self *Unit) MergeHierarchies(hierarchyContext tosca.HierarchyContext, work *ContextualWork)
- func (self *Unit) MergeNamespaces(work *ContextualWork)
- func (self *Unit) PrintImports(indent int, treePrefix terminal.TreePrefix)
- func (self *Unit) PrintNode(indent int, treePrefix terminal.TreePrefix, last bool)
- type Units
- type YAMLError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶
type Context struct { Root *Unit Quirks []string Units Units Parsing sync.Map WaitGroup sync.WaitGroup Locker sync.Mutex NamespacesWork *ContextualWork HierarchiesWork *ContextualWork }
func NewContext ¶
func (*Context) AddHierarchies ¶
func (self *Context) AddHierarchies()
func (*Context) AddNamespaces ¶
func (self *Context) AddNamespaces()
func (*Context) AddUnit ¶
func (self *Context) AddUnit(entityPtr interface{}, container *Unit, nameTransformer tosca.NameTransformer) *Unit
func (*Context) GetInheritTasks ¶
func (*Context) GetProblems ¶
func (*Context) LookupNames ¶
func (self *Context) LookupNames()
func (*Context) PrintHierarchies ¶
func (*Context) PrintImports ¶
func (*Context) PrintNamespaces ¶
func (*Context) Render ¶
func (self *Context) Render() tosca.EntityPtrs
type ContextualWork ¶
func NewContextualWork ¶
func NewContextualWork(phase string) *ContextualWork
type EntityWork ¶
type EntityWork map[interface{}]bool
func (EntityWork) Start ¶
func (self EntityWork) Start(phase string, entityPtr interface{}) bool
type InheritContext ¶
type InheritContext struct { Tasks Tasks TasksForEntities TasksForEntities InheritFields InheritFields }
func NewInheritContext ¶
func NewInheritContext() *InheritContext
func (*InheritContext) GetDependencies ¶
func (self *InheritContext) GetDependencies(entityPtr interface{}) map[interface{}]bool
func (*InheritContext) GetInheritTask ¶
func (self *InheritContext) GetInheritTask(entityPtr interface{}) *Task
func (*InheritContext) NewExecutor ¶
func (self *InheritContext) NewExecutor(entityPtr interface{}) Executor
type InheritField ¶
type InheritField struct { Entity reflect.Value FromEntityPtr interface{} Key string Field reflect.Value FromField reflect.Value }
func NewInheritFields ¶
func NewInheritFields(entityPtr interface{}) []*InheritField
From "inherit" tags
func (*InheritField) Inherit ¶
func (self *InheritField) Inherit()
func (*InheritField) InheritEntity ¶
func (self *InheritField) InheritEntity()
Field is compatible with *interface{}
func (*InheritField) InheritStringsFromMap ¶
func (self *InheritField) InheritStringsFromMap()
Field is *map[string]string
func (*InheritField) InheritStringsFromSlice ¶
func (self *InheritField) InheritStringsFromSlice()
Field is *[]string
func (*InheritField) InheritStructsFromMap ¶
func (self *InheritField) InheritStructsFromMap()
Field is compatible with map[string]*interface{}
func (*InheritField) InheritStructsFromSlice ¶
func (self *InheritField) InheritStructsFromSlice()
Field is compatible with []*interface{}
type InheritFields ¶
type InheritFields map[interface{}][]*InheritField
func (InheritFields) Get ¶
func (self InheritFields) Get(entityPtr interface{}) []*InheritField
Cache these, because we call twice for each entity
type LookupField ¶
type LookupField struct { Types []reflect.Type Names []LookupName }
type LookupName ¶
type LookupProblems ¶
type LookupProblems map[string]*LookupField
func (LookupProblems) Field ¶
func (self LookupProblems) Field(key string) *LookupField
func (LookupProblems) Report ¶
func (self LookupProblems) Report(context *tosca.Context)
type Renderable ¶
type Renderable interface {
Render()
}
type Task ¶
func (*Task) AddDependency ¶
func (*Task) IsIndependent ¶
func (*Task) PrintDependencies ¶
func (self *Task) PrintDependencies(indent int, treePrefix terminal.TreePrefix)
func (*Task) PrintDependency ¶
func (self *Task) PrintDependency(indent int, treePrefix terminal.TreePrefix, last bool)
type Tasks ¶
func (Tasks) FindIndependent ¶
type TasksForEntities ¶
type TasksForEntities map[interface{}]*Task
type Unit ¶
type Unit struct { EntityPtr interface{} Container *Unit Imports Units NameTransformer tosca.NameTransformer Locker sync.Mutex }
func NewUnit ¶
func NewUnit(entityPtr interface{}, container *Unit, nameTransformer tosca.NameTransformer) *Unit
func NewUnitNoEntity ¶
func (*Unit) GetContext ¶
func (*Unit) MergeHierarchies ¶
func (self *Unit) MergeHierarchies(hierarchyContext tosca.HierarchyContext, work *ContextualWork)
func (*Unit) MergeNamespaces ¶
func (self *Unit) MergeNamespaces(work *ContextualWork)
func (*Unit) PrintImports ¶
func (self *Unit) PrintImports(indent int, treePrefix terminal.TreePrefix)
Click to show internal directories.
Click to hide internal directories.