cli

package
v0.1.10-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2022 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = "dev"

Functions

func InitTf

func InitTf(ctx context.Context) (*tfexec.Terraform, error)

func StartCli

func StartCli()

Types

type ApplyCommand

type ApplyCommand struct {
	Translate *TranslateCommand
}

func (*ApplyCommand) Description

func (c *ApplyCommand) Description() CommandDesc

func (*ApplyCommand) Execute

func (c *ApplyCommand) Execute(ctx context.Context) error

func (*ApplyCommand) ParseFlags

func (c *ApplyCommand) ParseFlags(f *flag.FlagSet, args []string)

type CheckCommand

type CheckCommand struct {
	ConfigFiles []string
}

func (*CheckCommand) Description

func (c *CheckCommand) Description() CommandDesc

func (*CheckCommand) Execute

func (c *CheckCommand) Execute(ctx context.Context) error

func (*CheckCommand) ParseFlags

func (c *CheckCommand) ParseFlags(f *flag.FlagSet, args []string)

type Command

type Command interface {
	Description() CommandDesc
	Execute(ctx context.Context) error
	ParseFlags(set *flag.FlagSet, strings []string)
}

type CommandDesc

type CommandDesc struct {
	Name        string
	Description string
	Usage       string
}

type DestroyCommand

type DestroyCommand struct {
}

func (*DestroyCommand) Description

func (d *DestroyCommand) Description() CommandDesc

func (*DestroyCommand) Execute

func (d *DestroyCommand) Execute(ctx context.Context) error

func (*DestroyCommand) ParseFlags

func (d *DestroyCommand) ParseFlags(f *flag.FlagSet, args []string)

type HelpCommand

type HelpCommand struct {
	AvailableCommands []Command
}

func (*HelpCommand) Description

func (c *HelpCommand) Description() CommandDesc

func (*HelpCommand) Execute

func (c *HelpCommand) Execute(ctx context.Context) error

func (*HelpCommand) ParseFlags

func (c *HelpCommand) ParseFlags(f *flag.FlagSet, args []string)

type ServeCommand

type ServeCommand struct {
	Port int
}

ServeCommand - Temporary command to start the grpc server. Eventually we won't have a CLI / it will live in a diff repo.

func (*ServeCommand) Description

func (c *ServeCommand) Description() CommandDesc

func (*ServeCommand) Execute

func (c *ServeCommand) Execute(ctx context.Context) error

func (*ServeCommand) ParseFlags

func (c *ServeCommand) ParseFlags(f *flag.FlagSet, args []string)

type TranslateCommand

type TranslateCommand struct {
	CommandLineVars variables.CommandLineVariables
	OutputFile      string
	ConfigFiles     []string
}

func (*TranslateCommand) Description

func (c *TranslateCommand) Description() CommandDesc

func (*TranslateCommand) Execute

func (c *TranslateCommand) Execute(ctx context.Context) error

func (*TranslateCommand) ParseFlags

func (c *TranslateCommand) ParseFlags(f *flag.FlagSet, args []string)

type VersionCommand

type VersionCommand struct {
}

func (*VersionCommand) Description

func (c *VersionCommand) Description() CommandDesc

func (*VersionCommand) Execute

func (c *VersionCommand) Execute(ctx context.Context) error

func (*VersionCommand) ParseFlags

func (c *VersionCommand) ParseFlags(f *flag.FlagSet, args []string)

Jump to

Keyboard shortcuts

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