Documentation ¶
Index ¶
- type ActionOverConfig
- type ConfigTypeName
- type ConfigsPerEnvironment
- type ConfigsPerType
- type ConfigsPerTypePerEnvironments
- type DependenciesPerEnvironment
- type DuplicateConfigIdentifierError
- type EnvironmentName
- type Project
- func (p Project) ForEveryConfigDo(actions ...ActionOverConfig)
- func (p Project) ForEveryConfigInEnvironmentDo(environment string, actions ...ActionOverConfig)
- func (p Project) GetConfigFor(c coordinate.Coordinate) (config.Config, bool)
- func (p Project) HasDependencyOn(environment string, project Project) bool
- func (p Project) String() string
- type ProjectID
- type ProjectLoaderContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionOverConfig ¶ added in v2.8.0
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 (e DuplicateConfigIdentifierError) Coordinates() coordinate.Coordinate
func (DuplicateConfigIdentifierError) Error ¶
func (e DuplicateConfigIdentifierError) Error() string
func (DuplicateConfigIdentifierError) LocationDetails ¶
func (e DuplicateConfigIdentifierError) LocationDetails() configErrors.EnvironmentDetails
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 ¶
HasDependencyOn returns whether the project it is called on, has a dependency on the given project, for the given environment