v2

package
v2.15.3-dev-ko-test6 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionOverConfig added in v2.8.0

type ActionOverConfig func(c config.Config)

ActionOverConfig is a function that will be performed over each config that is part of a project via a Project.ForEveryConfigDo method

type ConfigTypeName added in v2.8.0

type ConfigTypeName = string

type ConfigsPerEnvironment

type ConfigsPerEnvironment map[EnvironmentName][]config.Config

ConfigsPerEnvironment is a map of EnvironmentName to configs. This is a flattened version of ConfigsPerTypePerEnvironments

type ConfigsPerType

type ConfigsPerType map[ConfigTypeName][]config.Config

ConfigsPerType is a map of ConfigTypeName string (e.g. API ID, settings schema, automation resource, ...) to configs of that type

func (ConfigsPerType) ForEveryConfigDo added in v2.14.3

func (cpt ConfigsPerType) ForEveryConfigDo(actions ...ActionOverConfig)

ForEveryConfigDo executes the given ActionOverConfig actions for each configuration defined in the ConfigsPerType. Actions can not modify the configs inside the ConfigsPerType.

type ConfigsPerTypePerEnvironments

type ConfigsPerTypePerEnvironments map[EnvironmentName]ConfigsPerType

ConfigsPerTypePerEnvironments is a map of EnvironmentName to a ConfigsPerType map

type DependenciesPerEnvironment

type DependenciesPerEnvironment map[EnvironmentName][]ProjectID

DependenciesPerEnvironment is a map of EnvironmentName to project IDs

type DuplicateConfigIdentifierError

type DuplicateConfigIdentifierError struct {
	// Location (coordinate) of the config.Config in whose ID overlaps with an existign one
	Location coordinate.Coordinate `json:"location"`
	// EnvironmentDetails of the environment for which the duplicate was loaded
	EnvironmentDetails configErrors.EnvironmentDetails `json:"environmentDetails"`
}

DuplicateConfigIdentifierError occurs if configuration IDs are found more than once

func (DuplicateConfigIdentifierError) Coordinates

func (DuplicateConfigIdentifierError) Error

func (DuplicateConfigIdentifierError) LocationDetails

type EnvironmentName added in v2.8.0

type EnvironmentName = string

type Project

type Project struct {
	Id string

	// set to the name defined in manifest if this project is part of a grouping, else will be empty
	GroupId string

	// Configs are the configurations within this Project
	Configs ConfigsPerTypePerEnvironments

	// Dependencies of this project to other projects
	Dependencies DependenciesPerEnvironment
}

func LoadProjects

func LoadProjects(fs afero.Fs, context ProjectLoaderContext, specificProjectNames []string) ([]Project, []error)

Tries to load the specified projects. If no project names are specified, all projects are loaded.

func (Project) ForEveryConfigDo added in v2.8.0

func (p Project) ForEveryConfigDo(actions ...ActionOverConfig)

ForEveryConfigDo executes the given ActionOverConfig actions for each configuration defined in the project for each environment Actions can not modify the configs inside the Project.

func (Project) ForEveryConfigInEnvironmentDo added in v2.8.0

func (p Project) ForEveryConfigInEnvironmentDo(environment string, actions ...ActionOverConfig)

ForEveryConfigInEnvironmentDo executes the given ActionOverConfig actions for each configuration defined in the project for a given environment. It behaves like ForEveryConfigDo just limited to a single environment. Actions can not modify the configs inside the Project.

func (Project) GetConfigFor added in v2.11.0

func (p Project) GetConfigFor(c coordinate.Coordinate) (config.Config, bool)

GetConfigFor searches a config object for matching the given coordinate in the current project

func (Project) HasDependencyOn

func (p Project) HasDependencyOn(environment string, project Project) bool

HasDependencyOn returns whether the project it is called on, has a dependency on the given project, for the given environment

func (Project) String

func (p Project) String() string

type ProjectID added in v2.8.0

type ProjectID = string

type ProjectLoaderContext

type ProjectLoaderContext struct {
	KnownApis       map[string]struct{}
	WorkingDir      string
	Manifest        manifest.Manifest
	ParametersSerde map[string]parameter.ParameterSerDe
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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