injector

package
v0.0.0-...-bdb2e15 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: Apache-2.0, MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = fmt.Errorf("attribute name not found")
)

Functions

This section is empty.

Types

type AttrType

type AttrType string

AttrType represents the type of an attribute

const (
	AttrTypeString AttrType = "string"
	AttrTypeInt    AttrType = "int"
	AttrTypeBool   AttrType = "bool"

	AttrNameKey = "name"
	AttrTypeKey = "type"
)

type BaseAttr

type BaseAttr struct {
	Name string
	Type AttrType
}

BaseAttr represents a base attribute

type BaseInjector

type BaseInjector struct {
	// contains filtered or unexported fields
}

func (*BaseInjector) Inject

type BlueprintEnvInjector

type BlueprintEnvInjector struct {
	// contains filtered or unexported fields
}

func NewBlueprintEnvInjector

func NewBlueprintEnvInjector(ctx *cue.Context, logger *slog.Logger) *BlueprintEnvInjector

func (*BlueprintEnvInjector) Inject

type BlueprintInjector

type BlueprintInjector interface {
	Inject(bp blueprint.RawBlueprint) blueprint.RawBlueprint
}

type BlueprintInjectorEnvMap

type BlueprintInjectorEnvMap struct{}

func (BlueprintInjectorEnvMap) Get

func (b BlueprintInjectorEnvMap) Get(ctx *cue.Context, name string, attrType AttrType) (cue.Value, error)

type BlueprintInjectorMap

type BlueprintInjectorMap interface {
	Get(ctx *cue.Context, name string, attrType AttrType) (cue.Value, error)
}

type BlueprintInjectorRuntimeMap

type BlueprintInjectorRuntimeMap struct {
	// contains filtered or unexported fields
}

func (BlueprintInjectorRuntimeMap) Get

func (b BlueprintInjectorRuntimeMap) Get(ctx *cue.Context, name string, attrType AttrType) (cue.Value, error)

type BlueprintRuntimeInjector

type BlueprintRuntimeInjector struct {
	// contains filtered or unexported fields
}

func NewBlueprintRuntimeInjector

func NewBlueprintRuntimeInjector(
	ctx *cue.Context,
	runtimeValues map[string]cue.Value,
	logger *slog.Logger,
) *BlueprintRuntimeInjector

func (*BlueprintRuntimeInjector) Inject

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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