definition

package
v1.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2024 License: Apache-2.0 Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NamespaceFrom

func NamespaceFrom(ctx context.Context) string

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

func WithNamespace(ctx context.Context, ns string) context.Context

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL