config

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 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
	NameSpace string
	Project   string
	SHA       string
	Link      string
	MRNumber  int
}

type Complement

type Complement struct {
	MR        []domain.ComplementEntry
	NameSpace []domain.ComplementEntry
	Project   []domain.ComplementEntry
	SHA       []domain.ComplementEntry
	Link      []domain.ComplementEntry
	Vars      map[string][]domain.ComplementEntry
}

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:"-"`
	EmbeddedVarNames []string          `yaml:"embedded_var_names"`
	Templates        map[string]string
	Log              Log
	BaseURL          string     `yaml:"base_url"`
	GitLabToken      string     `yaml:"-"`
	Complement       Complement `yaml:"ci"`
	PlanPatch        bool       `yaml:"plan_patch"`
}

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
	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