cli

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: MPL-2.0 Imports: 12 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 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 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 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