Documentation
¶
Overview ¶
Package cli implements the aboard command: it parses arguments, talks to an Aboard server through its public API, keeps this machine's agent credentials and project settings on disk, and prints results as text or as one JSON object.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
Run runs the aboard command with args (without the program name) and returns the process exit code.
func TrustCertFile ¶
TrustCertFile makes every HTTPS request this process sends trust the PEM certificates in SSL_CERT_FILE as well as the system's roots, on every platform: Go reads that variable on Linux but not on macOS. A team server whose certificate comes from a team's own authority is then reachable from either. With the variable unset it changes nothing. Call it once, before any request.
Types ¶
type Env ¶
type Env struct {
Stdin io.Reader
Stdout io.Writer
Stderr io.Writer
// Getenv reads an environment variable.
Getenv func(string) string
// Dir is the working directory, where the project's .aboard file lives.
Dir string
// Executable returns the path of the running aboard binary, used to start the
// local server in the background.
Executable func() (string, error)
// Rand is the source of randomness for idempotency keys.
Rand io.Reader
// Terminal is true when standard input and output are a terminal, so a command may
// ask questions.
Terminal bool
// StdoutTerminal and StderrTerminal are true when that stream is a terminal, so text
// written to it may be colored.
StdoutTerminal, StderrTerminal bool
// OpenBrowser opens a URL in the person's browser, failing when no browser could be
// started.
OpenBrowser func(ctx context.Context, url string) error
}
Env is everything a command reads from or writes to the outside world.
type Error ¶
type Error struct {
Code string
Message string
Hint string
Details map[string]any
// Exit is the process exit code; zero means exitError.
Exit int
// Usage is printed to stderr after the error, for usage errors.
Usage string
// Err is the underlying cause, if any. It is never shown to the user as is.
Err error
}
Error is a failure reported to the person or agent running a command. It has the same fields as an API error, so errors from the server pass through unchanged.
Source Files
¶
- added.go
- agentremoval.go
- agentsaddpeople.go
- approve.go
- ask.go
- attention.go
- audit.go
- board.go
- boardlifecycle.go
- boardnew.go
- boardpeople.go
- boards.go
- build.go
- certs.go
- cli.go
- client.go
- connect.go
- createboard.go
- credentials.go
- daemon.go
- delivery.go
- deliverymode.go
- doctor.go
- down.go
- errors.go
- exitwith.go
- files.go
- flags.go
- help.go
- hook.go
- inboxread.go
- inboxseats.go
- init.go
- initask.go
- initsetup.go
- installed.go
- invite.go
- joinboard.go
- jsonobject.go
- keys.go
- launch.go
- legacyseats.go
- local.go
- login.go
- logout.go
- manifest.go
- members.go
- messages.go
- msgref.go
- open.go
- outdated.go
- pair.go
- paths.go
- people.go
- project.go
- react.go
- release.go
- sandbox.go
- say.go
- seats.go
- selfupgrade.go
- servers.go
- session.go
- sessionboards.go
- status.go
- statusseats.go
- style.go
- subagent.go
- swarm.go
- swarmfile.go
- swarmlist.go
- swarmprogress.go
- swarmrunner.go
- tasks.go
- tasksnudges.go
- threads.go
- uninstall.go
- updatenotice.go
- upgrade.go
- versionskew.go
- watch.go