imports

package
v0.119.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TemplatingFailedReason is the reason that is defined during templating.
	TemplatingFailedReason = "ImportValidationFailed"
)

Variables

This section is empty.

Functions

func ComputeImportsHash

func ComputeImportsHash(imps *Imports) (string, error)

Types

type Constructor

type Constructor struct {
	*installations.Operation
	// contains filtered or unexported fields
}

Constructor is a struct that contains all values that are needed to load all imported data and generate the one imported config

func NewConstructor

func NewConstructor(op *installations.Operation) *Constructor

NewConstructor creates a new Import Constructor.

func (*Constructor) Construct

func (c *Constructor) Construct(ctx context.Context, imps *Imports) error

Construct loads all imported data from the data sources (either installations or the landscape config) and creates the imported configuration. The imported data is added to installation resource.

func (*Constructor) LoadImports

func (c *Constructor) LoadImports(ctx context.Context) (*Imports, error)

LoadImports loads all imports from the cluster (or wherever).

func (*Constructor) RenderImportExecutions

func (c *Constructor) RenderImportExecutions() error

RenderImportExecutions renders the blueprint's ImportExecutions. Has to be called after import construction (c.Construct(...))

type Imports

type Imports struct {
	DataObjects map[string]*dataobjects.DataObject
	Targets     map[string]*dataobjects.TargetExtension
	TargetLists map[string]*dataobjects.TargetExtensionList
	TargetMaps  map[string]*dataobjects.TargetMapExtension
}

Imports is a helper struct to pass around the loaded imports.

func (*Imports) All

func (imps *Imports) All() []*dataobjects.Imported

func (*Imports) Size

func (imps *Imports) Size() int

Size returns the total amount of imports.

Jump to

Keyboard shortcuts

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