config

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: MIT Imports: 6 Imported by: 10 modules, 8 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 added in v0.3.2

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

GitlabNotifier is a notifier for GitLab

type Notifier

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

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"`
	Validate     Validate `yaml:"validate"`
}

Terraform represents terraform configurations

type TypetalkNotifier added in v0.3.0

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

TypetalkNotifier is a notifier for Typetalk

type Validate added in v0.8.0

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

Validate is a terraform validate config

type WhenAddOrUpdateOnly added in v0.6.2

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 added in v0.4.0

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 added in v0.6.1

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 added in v0.6.2

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