Documentation
¶
Overview ¶
Package cli implements the jokku command line: Dokku's commands, arguments and output, backed by the Jokku API.
Index ¶
- func Main(ctx context.Context, args []string, stdio IO) int
- type AppMode
- type Command
- type Context
- func (c *Context) Bool(name string) bool
- func (c *Context) Global() bool
- func (c *Context) Header(format string, args ...any)
- func (c *Context) Info(format string, args ...any)
- func (c *Context) Step(format string, args ...any)
- func (c *Context) String(name string) string
- func (c *Context) Warn(format string, args ...any)
- type Flag
- type IO
- type UsageError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Command ¶
type Command struct {
Name string
Args string // usage after the app, e.g. "KEY=VALUE..."
Help string
App AppMode
Flags []Flag
MinArgs int
MaxArgs int // -1 for no limit
// AnyFlags accepts arbitrary --flags; report commands use them to select
// one value (apps:report myapp --app-locked).
AnyFlags bool
// PassArgsAfter stops flag parsing after this many positional
// arguments (the app included), so the rest reach a command verbatim:
// "jokku enter app web ls -la".
PassArgsAfter int
// Local commands run without an API connection.
Local bool
Hidden bool
Run func(*Context) error
// contains filtered or unexported fields
}
type Context ¶
type Context struct {
context.Context
IO
Cmd *Command
App string
Args []string
API *client.Client
// contains filtered or unexported fields
}
type UsageError ¶
type UsageError struct {
// contains filtered or unexported fields
}
UsageError is printed with the command's usage line.
func (*UsageError) Error ¶
func (e *UsageError) Error() string
Click to show internal directories.
Click to hide internal directories.