plan

package
v0.3.14 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const PlanKind types.Kind = "Plan"

PlanKind is kind of plan file

Variables

This section is empty.

Functions

func MergeServices added in v0.3.0

func MergeServices(s1 map[string][]PlanArtifact, s2 map[string][]PlanArtifact) map[string][]PlanArtifact

MergeServices merges two service maps

func MergeServicesT added in v0.3.0

MergeServicesT merges two service maps

func WritePlan

func WritePlan(path string, plan Plan) error

WritePlan encodes the plan to yaml converting absolute paths to relative.

Types

type Plan

type Plan struct {
	types.TypeMeta   `yaml:",inline"`
	types.ObjectMeta `yaml:"metadata,omitempty"`
	Spec             Spec `yaml:"spec,omitempty"`
}

Plan defines the format of plan

func NewPlan

func NewPlan() Plan

NewPlan creates a new plan Sets the version and optionally fills in some default values

func ReadPlan

func ReadPlan(path string, sourceDir string) (Plan, error)

ReadPlan decodes the plan from yaml converting relative paths to absolute.

type PlanArtifact added in v0.3.0

type PlanArtifact struct {
	ServiceName               string `yaml:"-"`
	TransformerName           string `yaml:"transformerName"`
	transformertypes.Artifact `yaml:",inline"`
}

PlanArtifact stores the artifact with the transformerName

type Spec added in v0.3.0

type Spec struct {
	SourceDir         string `yaml:"sourceDir"`
	CustomizationsDir string `yaml:"customizationsDir,omitempty"`

	Services map[string][]PlanArtifact `yaml:"services"` //[servicename]

	TransformerSelector          metav1.LabelSelector `yaml:"transformerSelector,omitempty"`
	Transformers                 map[string]string    `yaml:"transformers,omitempty" m2kpath:"normal"` //[name]filepath
	InvokedByDefaultTransformers []string             `yaml:"invokedByDefaultTransformers,omitempty"`
	DisabledTransformers         map[string]string    `yaml:"disabledTransformers,omitempty" m2kpath:"normal"` //[name]filepath
}

Spec stores the data about the plan

Jump to

Keyboard shortcuts

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