Documentation
¶
Overview ¶
Package cli is the outflare command line client: every API operation as a command, read from the OpenAPI document built into the binary.
outflare login save the server URL and an API token outflare list-leads --q ana call an operation (flags are its parameters and body fields) outflare create-lead --email ana@acme-com.example --first-name Ana outflare help create-webhook what an operation takes and needs outflare api GET /v1/whoami call any path outflare listen --forward-to URL send new events to a local receiver
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GeneratePython ¶
GeneratePython writes the Python SDK's operations module from the API document: one method per operation, the same set the CLI has, so the SDK cannot fall behind the server. The engine's tests check that the committed file matches; regenerate it with go run ./engine/cmd/sdkgen.
Types ¶
type Env ¶
type Env struct {
Stdin io.Reader
Stdout, Stderr io.Writer
Getenv func(string) string
ConfigDir string // where config.json lives; empty uses the user config dir
HTTP *http.Client
Version string
// Spec is the OpenAPI document the commands come from.
Spec []byte
// TTY reports whether stdout is a terminal (pretty output).
TTY bool
// RetryBase is the first wait between retries, doubling each time;
// zero means 500ms. Tests make it tiny.
RetryBase time.Duration
}
Env is what a run reads from and writes to, so tests can drive it.