Documentation
¶
Overview ¶
Package cli holds the dekka commands.
Index ¶
Constants ¶
View Source
const ( // DefaultAPIURL is the public Dekka API. Every route lives under /v1. DefaultAPIURL = "https://api.dekka.cloud" // DashboardURL is where API keys are created. DashboardURL = "https://dekka.cloud/app" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APIError ¶
type APIError struct {
Status int
Code string
Message string
RequestID string
// Hint is what to do next, when the CLI knows.
Hint string
}
APIError is an error the API answered with.
type App ¶
type App struct {
In io.Reader
Out io.Writer
Err io.Writer
Getenv func(string) string
Store credentials.Store
// StdinIsTerminal reports whether In is an interactive terminal.
StdinIsTerminal func() bool
// ReadSecret reads a line from the terminal without echoing it.
ReadSecret func() (string, error)
// OpenBrowser opens a link in the person's browser. It is nil where there
// is no browser to open, and dekka login then prints the link.
OpenBrowser func(url string) error
// Hostname names this machine on the page that approves a sign-in.
Hostname func() (string, error)
// RunSSH runs the system's ssh with these arguments on this terminal. When it's nil,
// dekka servers ssh prints the command instead.
RunSSH func(args []string) error
Version string
HTTPClient *http.Client
// PollInterval, when set, replaces the wait between runtime log polls and
// between stream reconnects.
PollInterval time.Duration
// contains filtered or unexported fields
}
App carries what the commands read and write, so tests can replace it.
Click to show internal directories.
Click to hide internal directories.