config

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2018 License: MIT Imports: 8 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	AccountID          *int64   `json:"account_id"`
	AWSProfileBackend  *string  `json:"aws_profile_backend"`
	AWSProfileProvider *string  `json:"aws_profile_provider"`
	AWSProviderVersion *string  `json:"aws_provider_version,omitempty"`
	AWSRegionBackend   *string  `json:"aws_region_backend"`
	AWSRegionProvider  *string  `json:"aws_region_provider"`
	AWSRegions         []string `json:"aws_regions"`
	InfraBucket        *string  `json:"infra_s3_bucket"`
	Owner              *string  `json:"owner"`
	Project            *string  `json:"project"`
	TerraformVersion   *string  `json:"terraform_version"`
}

type Component

type Component struct {
	AccountID          *int64   `json:"account_id"`
	AWSProfileBackend  *string  `json:"aws_profile_backend"`
	AWSProfileProvider *string  `json:"aws_profile_provider"`
	AWSProviderVersion *string  `json:"aws_provider_version,omitempty"`
	AWSRegionBackend   *string  `json:"aws_region_backend"`
	AWSRegionProvider  *string  `json:"aws_region_provider"`
	AWSRegions         []string `json:"aws_regions"`
	InfraBucket        *string  `json:"infra_s3_bucket"`
	Owner              *string  `json:"owner"`
	Project            *string  `json:"project"`
	SharedInfraVersion *string  `json:"shared_infra_version"`
	TerraformVersion   *string  `json:"terraform_version"`
}

type Config

type Config struct {
	Defaults defaults           `json:"defaults"`
	Accounts map[string]Account `json:"accounts"`
	Envs     map[string]Env     `json:"envs"`
	Modules  map[string]Module  `json:"modules"`
}

func FindAndReadConfig

func FindAndReadConfig(fs afero.Fs, configFile string) (*Config, error)

func InitConfig

func InitConfig(project, region, bucket, awsProfile, owner, sharedInfraVersion, awsProviderVersion string) *Config

func ReadConfig

func ReadConfig(f io.Reader) (*Config, error)

func (*Config) Validate

func (c *Config) Validate() error

type Env

type Env struct {
	AccountID          *int64   `json:"account_id"`
	AWSProfileBackend  *string  `json:"aws_profile_backend"`
	AWSProfileProvider *string  `json:"aws_profile_provider"`
	AWSProviderVersion *string  `json:"aws_provider_version,omitempty"`
	AWSRegionBackend   *string  `json:"aws_region_backend"`
	AWSRegionProvider  *string  `json:"aws_region_provider"`
	AWSRegions         []string `json:"aws_regions"`
	InfraBucket        *string  `json:"infra_s3_bucket"`
	Owner              *string  `json:"owner"`
	Project            *string  `json:"project"`
	TerraformVersion   *string  `json:"terraform_version"`
	Type               *string  `json:"type"`

	Components map[string]*Component `json:"components"`
}

type Module

type Module struct {
	TerraformVersion *string `json:"terraform_version"`
}

Jump to

Keyboard shortcuts

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