Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CLI struct { Debug bool `help:"Enable debug mode."` JSON bool `help:"Output in JSON format." name:"json"` Version VersionFlag `name:"version" help:"Print version information and quit."` Create CreateCommand `cmd:"" help:"Create a new droplet." default:"withargs"` Ls LsCommand `cmd:"" help:"List droplets."` Rm RmCommand `cmd:"" help:"Remove one or more droplets."` Status StatusCommand `cmd:"" help:"Show version and API connectivity."` Options OptionsCommand `cmd:"" help:"Show available region and size options."` }
Functions ¶
This section is empty.
Types ¶
type CreateCommand ¶
type CreateCommand struct {
Region string `help:"Region of the droplet." short:"r" enum:"usw,use,eu,ap,au" default:"eu"`
Size string `help:"Size of the droplet." short:"s" enum:"xs,s,m,l,xl" default:"xs"`
Name string `help:"Name of the droplet." short:"n"`
}
CreateCommand creates a new droplet.
type Globals ¶
type Globals struct {
JSON bool
Logger *zap.SugaredLogger
}
Globals holds shared state passed to all commands.
type OptionsCommand ¶
type OptionsCommand struct{}
OptionsCommand displays available region and size mappings.
func (*OptionsCommand) Run ¶
func (cmd *OptionsCommand) Run(globals *Globals) error
Run executes the options command.
type RmCommand ¶
type RmCommand struct {
IDs []int `arg:"" help:"Droplet ID(s) to remove." name:"id" required:""`
}
RmCommand removes one or more droplets.
type VersionFlag ¶
type VersionFlag string
VersionFlag prints the version and exits.
func (VersionFlag) BeforeApply ¶
func (VersionFlag) Decode ¶
func (v VersionFlag) Decode(ctx *kong.DecodeContext) error
func (VersionFlag) IsBool ¶
func (v VersionFlag) IsBool() bool
Click to show internal directories.
Click to hide internal directories.