valid

package
v0.7.0-alpha1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package valid contains the structs representing the atlantis.yaml config after it's been parsed and validated.

Package valid contains definitions of valid yaml configuration after its been parsed and validated.

Index

Constants

View Source
const AllowCustomWorkflowsKey = "allow_custom_workflows"
View Source
const AllowedOverridesKey = "allowed_overrides"
View Source
const ApplyRequirementsKey = "apply_requirements"
View Source
const ApprovedApplyReq = "approved"
View Source
const DefaultAutoPlanEnabled = true
View Source
const DefaultWorkflowName = "default"
View Source
const MergeableApplyReq = "mergeable"
View Source
const WorkflowKey = "workflow"

Variables

View Source
var DefaultApplyStage = Stage{
	Steps: []Step{
		{
			StepName: "apply",
		},
	},
}
View Source
var DefaultPlanStage = Stage{
	Steps: []Step{
		{
			StepName: "init",
		},
		{
			StepName: "plan",
		},
	},
}

Functions

This section is empty.

Types

type Autoplan

type Autoplan struct {
	WhenModified []string
	Enabled      bool
}

type GlobalCfg added in v0.7.0

type GlobalCfg struct {
	Repos     []Repo
	Workflows map[string]Workflow
}

func NewGlobalCfg added in v0.7.0

func NewGlobalCfg(allowRepoCfg bool, mergeableReq bool, approvedReq bool) GlobalCfg

func (GlobalCfg) DefaultProjCfg added in v0.7.0

func (g GlobalCfg) DefaultProjCfg(log logging.SimpleLogging, repoID string, repoRelDir string, workspace string) MergedProjectCfg

func (GlobalCfg) MergeProjectCfg added in v0.7.0

func (g GlobalCfg) MergeProjectCfg(log logging.SimpleLogging, repoID string, proj Project, rCfg RepoCfg) MergedProjectCfg

func (GlobalCfg) ValidateRepoCfg added in v0.7.0

func (g GlobalCfg) ValidateRepoCfg(rCfg RepoCfg, repoID string) error

type MergedProjectCfg added in v0.7.0

type MergedProjectCfg struct {
	ApplyRequirements []string
	Workflow          Workflow
	RepoRelDir        string
	Workspace         string
	Name              string
	AutoplanEnabled   bool
	TerraformVersion  *version.Version
}

type Project

type Project struct {
	Dir               string
	Workspace         string
	Name              *string
	WorkflowName      *string
	TerraformVersion  *version.Version
	Autoplan          Autoplan
	ApplyRequirements []string
}

func (Project) GetName added in v0.4.5

func (p Project) GetName() string

GetName returns the name of the project or an empty string if there is no project name.

type Repo added in v0.7.0

type Repo struct {
	ID                   string
	IDRegex              *regexp.Regexp
	ApplyRequirements    []string
	Workflow             *Workflow
	AllowedOverrides     []string
	AllowCustomWorkflows *bool
}

func (Repo) IDMatches added in v0.7.0

func (r Repo) IDMatches(otherID string) bool

func (Repo) IDString added in v0.7.0

func (r Repo) IDString() string

type RepoCfg added in v0.7.0

type RepoCfg struct {
	// Version is the version of the atlantis YAML file. Will always be equal
	// to 2.
	Version   int
	Projects  []Project
	Workflows map[string]Workflow
	Automerge bool
}

RepoCfg is the atlantis.yaml config after it's been parsed and validated.

func (RepoCfg) FindProjectByName added in v0.7.0

func (r RepoCfg) FindProjectByName(name string) *Project

func (RepoCfg) FindProjectsByDir added in v0.7.0

func (r RepoCfg) FindProjectsByDir(dir string) []Project

FindProjectsByDir returns all projects that are in dir.

func (RepoCfg) FindProjectsByDirWorkspace added in v0.7.0

func (r RepoCfg) FindProjectsByDirWorkspace(dir string, workspace string) []Project

type Stage

type Stage struct {
	Steps []Step
}

type Step

type Step struct {
	StepName   string
	ExtraArgs  []string
	RunCommand []string
}

type Workflow

type Workflow struct {
	Name  string
	Apply Stage
	Plan  Stage
}

Jump to

Keyboard shortcuts

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