v2

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2019 License: MIT Imports: 9 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSProvider

type AWSProvider struct {
	// the aws provider is optional (above) but if supplied you must set account id and region
	AccountID         *int64   `json:"account_id" validate:"required"`
	AdditionalRegions []string `json:"additional_regions"`
	Profile           *string  `json:"profile"`
	Region            *string  `json:"region" validate:"required"`
	Version           *string  `json:"version,omitempty" validate:"required"`
}

type Account

type Account struct {
	Common
}

type Backend

type Backend struct {
	Bucket      string `json:"bucket,omitempty"`
	DynamoTable string `json:"dynamodb_table,omitempty"`
	Profile     string `json:"profile,omitempty"`
	Region      string `json:"region,omitempty"`
}

type Common

type Common struct {
	Backend          Backend           `json:"backend,omitempty"`
	ExtraVars        map[string]string `json:"extra_vars,omitempty"`
	Owner            string            `json:"owner,omitempty" `
	Project          string            `json:"project,omitempty" `
	Providers        Providers         `json:"providers,omitempty" `
	TerraformVersion string            `json:"terraform_version,omitempty"`
}

type Component

type Component struct {
	Common

	EKS          *v1.EKSConfig     `json:"eks,omitempty"`
	Kind         *v1.ComponentKind `json:"kind,omitempty"`
	ModuleSource *string           `json:"module_source"`
}

type Config

type Config struct {
	Accounts map[string]Account   `json:"accounts,omitempty"`
	Defaults Defaults             `json:"defaults" validate:"required"`
	Docker   bool                 `json:"docker,omitempty"`
	Envs     map[string]Env       `json:"envs,omitempty"`
	Global   Component            `json:"global,omitempty"`
	Modules  map[string]v1.Module `json:"modules,omitempty"`
	Plugins  v1.Plugins           `json:"plugins,omitempty"`
	Tools    Tools                `json:"tools,omitempty"`
	Version  int                  `json:"version" validate:"required,eq=2"`
}

func ReadConfig

func ReadConfig(b []byte) (*Config, error)

func (*Config) Generate

func (c *Config) Generate(r *rand.Rand, size int) reflect.Value

Generate is used for test/quick integration. There are supposedly ways to do this without polluting the public api, but givent that fogg isn't an api, it doesn't seem like a big deal

func (*Config) Validate

func (c *Config) Validate() error

Validate validates the config

type Defaults

type Defaults struct {
	Common
}

type Env

type Env struct {
	Common

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

type Providers

type Providers struct {
	AWS *AWSProvider `json:"aws"`
}

type Tools

type Tools struct {
	TravisCI *v1.TravisCI `json:"travis_ci,omitempty"`
	TfLint   *v1.TfLint   `json:"tflint,omitempty"`
}

Jump to

Keyboard shortcuts

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