config

package
v0.8.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2022 License: MIT Imports: 6 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 `yaml:"template"`
}

Apply is a terraform apply config

type Config

type Config struct {
	CI        string    `yaml:"ci"`
	Notifier  Notifier  `yaml:"notifier"`
	Terraform Terraform `yaml:"terraform"`
	// contains filtered or unexported fields
}

Config is for tfnotify config structure

func (*Config) Find

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

Find returns config path

func (*Config) GetNotifierType

func (cfg *Config) GetNotifierType() string

GetNotifierType return notifier type described in Config

func (*Config) LoadFile

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

LoadFile binds the config file to Config structure

func (*Config) Validation

func (cfg *Config) Validation() error

Validation validates config file

type Default

type Default struct {
	Template string `yaml:"template"`
}

Default is a default setting for terraform commands

type Fmt

type Fmt struct {
	Template string `yaml:"template"`
}

Fmt is a terraform fmt config

type GithubNotifier

type GithubNotifier struct {
	Token      string     `yaml:"token"`
	BaseURL    string     `yaml:"base_url"`
	Repository Repository `yaml:"repository"`
}

GithubNotifier is a notifier for GitHub

type GitlabNotifier

type GitlabNotifier struct {
	Token      string     `yaml:"token"`
	BaseURL    string     `yaml:"base_url"`
	Repository Repository `yaml:"repository"`
}

GitlabNotifier is a notifier for GitLab

type MattermostNotifier

type MattermostNotifier struct {
	Webhook string `yaml:"webhook"`
	Channel string `yaml:"channel"`
	Bot     string `yaml:"bot"`
}

MattermostNotifier is a notifier for Mattermost

type Notifier

type Notifier struct {
	Github     GithubNotifier     `yaml:"github"`
	Gitlab     GitlabNotifier     `yaml:"gitlab"`
	Slack      SlackNotifier      `yaml:"slack"`
	Typetalk   TypetalkNotifier   `yaml:"typetalk"`
	Mattermost MattermostNotifier `yaml:"mattermost"`
}

Notifier is a notification notifier

type Plan

type Plan struct {
	Template            string              `yaml:"template"`
	WhenAddOrUpdateOnly WhenAddOrUpdateOnly `yaml:"when_add_or_update_only,omitempty"`
	WhenDestroy         WhenDestroy         `yaml:"when_destroy,omitempty"`
	WhenNoChanges       WhenNoChanges       `yaml:"when_no_changes,omitempty"`
	WhenPlanError       WhenPlanError       `yaml:"when_plan_error,omitempty"`
}

Plan is a terraform plan config

type Repository

type Repository struct {
	Owner string `yaml:"owner"`
	Name  string `yaml:"name"`
}

Repository represents a GitHub repository

type SlackNotifier

type SlackNotifier struct {
	Token   string `yaml:"token"`
	Channel string `yaml:"channel"`
	Bot     string `yaml:"bot"`
}

SlackNotifier is a notifier for Slack

type Terraform

type Terraform struct {
	Default      Default `yaml:"default"`
	Fmt          Fmt     `yaml:"fmt"`
	Plan         Plan    `yaml:"plan"`
	Apply        Apply   `yaml:"apply"`
	UseRawOutput bool    `yaml:"use_raw_output,omitempty"`
}

Terraform represents terraform configurations

type TypetalkNotifier

type TypetalkNotifier struct {
	Token   string `yaml:"token"`
	TopicID string `yaml:"topic_id"`
}

TypetalkNotifier is a notifier for Typetalk

type WhenAddOrUpdateOnly

type WhenAddOrUpdateOnly struct {
	Label string `yaml:"label,omitempty"`
}

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

type WhenDestroy

type WhenDestroy struct {
	Label    string `yaml:"label,omitempty"`
	Template string `yaml:"template,omitempty"`
}

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

type WhenNoChanges

type WhenNoChanges struct {
	Label string `yaml:"label,omitempty"`
}

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

type WhenPlanError

type WhenPlanError struct {
	Label string `yaml:"label,omitempty"`
}

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