loader

package
v0.0.0-...-c3373f0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2024 License: Apache-2.0, MIT Imports: 15 Imported by: 1

Documentation

Index

Constants

View Source
const BlueprintFileName = "blueprint.cue"

Variables

View Source
var (
	ErrVersionNotFound = errors.New("version not found")
)

Functions

This section is empty.

Types

type BlueprintLoader

type BlueprintLoader interface {
	// Load loads the blueprint.
	Load(projectPath, gitRootPath string) (blueprint.RawBlueprint, error)

	// SetOverrider sets the InjectorOverrider.
	SetOverrider(overrider InjectorOverrider)
}

BlueprintLoader is an interface for loading blueprints.

type DefaultBlueprintLoader

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

DefaultBlueprintLoader is the default implementation of the BlueprintLoader

func NewCustomBlueprintLoader

func NewCustomBlueprintLoader(
	fs afero.Fs,
	injector injector.Injector,
	overrider InjectorOverrider,
	logger *slog.Logger,
) DefaultBlueprintLoader

NewCustomBlueprintLoader creates a new DefaultBlueprintLoader with custom dependencies.

func NewDefaultBlueprintLoader

func NewDefaultBlueprintLoader(overrider InjectorOverrider, logger *slog.Logger) DefaultBlueprintLoader

NewDefaultBlueprintLoader creates a new DefaultBlueprintLoader.

func (*DefaultBlueprintLoader) Load

func (b *DefaultBlueprintLoader) Load(projectPath, gitRootPath string) (blueprint.RawBlueprint, error)

func (*DefaultBlueprintLoader) SetOverrider

func (b *DefaultBlueprintLoader) SetOverrider(overrider InjectorOverrider)

SetOverrider sets the InjectorOverrider.

type InjectorOverrider

type InjectorOverrider func(value cue.Value) map[string]string

InjectorOverrider is a function that receives a CUE value and returns a map of environment variables to override

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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