Documentation ¶
Index ¶
- func NamespaceFrom(ctx context.Context) string
- func NewTemplateLoader(ctx context.Context, cli client.Client) template.Loader[*loadConfig, *compileConfig]
- func WithNamespace(ctx context.Context, ns string) context.Context
- func WithType(typ string) template.LoadOption[*loadConfig]
- type TemplateLoader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NamespaceFrom ¶
NamespaceFrom returns the namespace from context
func NewTemplateLoader ¶
func NewTemplateLoader(ctx context.Context, cli client.Client) template.Loader[*loadConfig, *compileConfig]
NewTemplateLoader creates a new template loader for definition
func WithNamespace ¶
WithNamespace returns a context with namespace
func WithType ¶
func WithType(typ string) template.LoadOption[*loadConfig]
WithType adds a definition type to the loader.
Types ¶
type TemplateLoader ¶
type TemplateLoader struct {
// contains filtered or unexported fields
}
TemplateLoader loads a template from a Definition.
func (*TemplateLoader) LoadTemplate ¶
func (l *TemplateLoader) LoadTemplate(ctx context.Context, name string, opts ...template.LoadOption[*loadConfig]) (template.Template[*compileConfig], error)
LoadTemplate loads the main template from the definition.
Click to show internal directories.
Click to hide internal directories.