config

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Apply

type Apply struct {
	Template       string
	WhenParseError WhenParseError `yaml:"when_parse_error"`
}

Apply is a terraform apply config

type CI

type CI struct {
	Name     string
	Owner    string
	Repo     string
	SHA      string
	Link     string
	PRNumber int
}

type Complement

func (*Complement) UnmarshalYAML

func (cpl *Complement) UnmarshalYAML(unmarshal func(interface{}) error) error

type ComplementEnvsubstEntry

type ComplementEnvsubstEntry struct {
	Value string
}

func (*ComplementEnvsubstEntry) Entry

func (entry *ComplementEnvsubstEntry) Entry() (string, error)

func (*ComplementEnvsubstEntry) Type

func (entry *ComplementEnvsubstEntry) Type() string

type ComplementTemplateEntry

type ComplementTemplateEntry struct {
	Value string
}

func (*ComplementTemplateEntry) Entry

func (entry *ComplementTemplateEntry) Entry() (string, error)

func (*ComplementTemplateEntry) Type

func (entry *ComplementTemplateEntry) Type() string

type Config

type Config struct {
	CI          CI `yaml:"-"`
	Terraform   Terraform
	Vars        map[string]string `yaml:"-"`
	Templates   map[string]string
	Log         Log
	GHEBaseURL  string     `yaml:"ghe_base_url"`
	GitHubToken string     `yaml:"-"`
	Complement  Complement `yaml:"ci"`
}

Config is for tfcmt config structure

func (*Config) Find

func (cfg *Config) Find(file string) (string, error)

Find returns config path

func (*Config) LoadFile

func (cfg *Config) LoadFile(path string) error

LoadFile binds the config file to Config structure

func (*Config) Validate

func (cfg *Config) Validate() error

Validate validates config file

type Log

type Log struct {
	Level string
}

type Plan

type Plan struct {
	Template            string
	WhenAddOrUpdateOnly WhenAddOrUpdateOnly `yaml:"when_add_or_update_only"`
	WhenDestroy         WhenDestroy         `yaml:"when_destroy"`
	WhenNoChanges       WhenNoChanges       `yaml:"when_no_changes"`
	WhenPlanError       WhenPlanError       `yaml:"when_plan_error"`
	WhenParseError      WhenParseError      `yaml:"when_parse_error"`
	DisableLabel        bool                `yaml:"disable_label"`
}

Plan is a terraform plan config

type Terraform

type Terraform struct {
	Plan         Plan
	Apply        Apply
	UseRawOutput bool `yaml:"use_raw_output"`
}

Terraform represents terraform configurations

type WhenAddOrUpdateOnly

type WhenAddOrUpdateOnly struct {
	Label string
	Color string `yaml:"label_color"`
}

WhenAddOrUpdateOnly is a configuration to notify the plan result contains new or updated in place resources

type WhenDestroy

type WhenDestroy struct {
	Label    string
	Template string
	Color    string `yaml:"label_color"`
}

WhenDestroy is a configuration to notify the plan result contains destroy operation

type WhenNoChanges

type WhenNoChanges struct {
	Label string
	Color string `yaml:"label_color"`
}

WhenNoChanges is a configuration to add a label when the plan result contains no change

type WhenParseError

type WhenParseError struct {
	Template string
}

WhenParseError is a configuration to notify the plan result returns an error

type WhenPlanError

type WhenPlanError struct {
	Label string
	Color string `yaml:"label_color"`
}

WhenPlanError is a configuration to notify the plan result returns an error

Jump to

Keyboard shortcuts

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