converter

package
v2.16.0-rc.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// DefaultGroup is used, when a legacy config does not specify a group. All
	// new configs are required to be in a group.
	DefaultGroup = "default"
)

Variables

This section is empty.

Functions

func Convert

func Convert(context ConverterContext, environments map[string]*v1environment.EnvironmentV1,
	projects []projectV1.Project) (manifest.Manifest, []projectV2.Project, []error)

Convert takes v1 environments and projects and converts them into a v2 manifest and projects

Types

type ConvertConfigError

type ConvertConfigError struct {
	// Location (coordinate) of the config.Config that failed to be converted
	Location coordinate.Coordinate `json:"location"`
	// Reason describing what went wrong
	Reason string `json:"reason"`
}

func (ConvertConfigError) Coordinates

func (e ConvertConfigError) Coordinates() coordinate.Coordinate

func (ConvertConfigError) Error

func (e ConvertConfigError) Error() string

type ConverterContext

type ConverterContext struct {
	Fs afero.Fs

	ResolveSkip bool
}

type ReferenceParseError

type ReferenceParseError struct {
	// Location (coordinate) of the config.Config in which a reference failed to be parsed
	Location coordinate.Coordinate `json:"location"`
	// ParameterName is the name of the reference parameter that failed to be parsed
	ParameterName string `json:"parameterName"`
	// Reason describing what went wrong
	Reason string `json:"reason"`
}

func (ReferenceParseError) Coordinates

func (e ReferenceParseError) Coordinates() coordinate.Coordinate

func (ReferenceParseError) Error

func (e ReferenceParseError) Error() string

type TemplateConversionError

type TemplateConversionError struct {
	// TemplatePath is the path to the template JSON file that failed to be converted
	TemplatePath string `json:"templatePath"`
	// Reason describing what went wrong
	Reason string `json:"reason"`
}

func (TemplateConversionError) Error

func (e TemplateConversionError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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