Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auxiliary ¶ added in v0.3.3
type Auxiliary struct {
Ins model.Instance
// Type will be used to mark definition label for OAM runtime to get the CRD
// It's now required for trait and main workload object. Extra workload CR object will not have the type.
Type string
// Workload or trait with multiple `outputs` will have a name, if name is empty, than it's the main of this type.
Name string
// IsOutputs will record the output path format of the Auxiliary
// it can be one of these two cases:
// false: the format is `output`, this means it's the main resource of the trait
// true: the format is `outputs.<resourceName>`, this means it can be auxiliary workload or trait
IsOutputs bool
}
Auxiliary are objects rendered by definition template.
type Context ¶
type Context interface {
SetBase(base model.Instance)
AppendAuxiliaries(auxiliaries ...Auxiliary)
SetConfigs(configs []map[string]string)
Output() (model.Instance, []Auxiliary)
BaseContextFile() string
BaseContextLabels() map[string]string
}
Context defines Rendering Context Interface
func NewContext ¶
NewContext create render templateContext
Click to show internal directories.
Click to hide internal directories.