cmd

package
v0.0.0-...-f378cae Latest Latest
Warning

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

Go to latest
Published: May 26, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExitCodeOK    = 0
	ExitCodeError = 1
)
View Source
const (
	// DefaultTimeout is the default timeout for running terraform plan
	DefaultTimeout = 300 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Args

type Args struct {
	ConfigPath string
	Notifiable bool
}

func ParseArgs

func ParseArgs(args []string) (*Args, error)

type CLI

type CLI struct {
	Args   *Args
	Config *Config
}

func NewCLI

func NewCLI(parseArgs CLIParseFunc) (*CLI, error)

func (*CLI) Run

func (cli *CLI) Run(ctx context.Context) (int, error)

type CLIParseFunc

type CLIParseFunc func([]string) (*Args, error)

type Config

type Config struct {
	BaseDirectory string        `json:"base_directory"`
	Directories   []Directory   `json:"directories"`
	Timeout       time.Duration `json:"timeout"`
	Notification  string        `json:"notification"`
}

type Directory

type Directory string

Jump to

Keyboard shortcuts

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