
adminctl
Package adminctl implements the `s3-orchestrator admin …` family of subcommands. Each command is a thin HTTP client over the admin API exposed by the running server. Responses render as human-readable text by default; the global --json flag switches to raw JSON.
Index
- func Command(cmd string, args []string, baseAddr, token string, stdout, stderr io.Writer) int
- func CommandWithFormat(cmd string, args []string, baseAddr, token string, format output.Format, stdout, stderr io.Writer) int
- func Run(args []string, stdout, stderr io.Writer) int
func Command
Command executes an admin CLI command in text output mode, returning the exit code. Exposed so tests can drive subcommands directly without parsing process-level flags.
func CommandWithFormat
CommandWithFormat executes an admin CLI command with an explicit output format, returning the exit code. Run uses this with the format derived from the --json flag; Command wraps it with the text default.
func Run
Run is the CLI entry point for `s3-orchestrator admin`. It parses the admin-level flags, resolves the target address and token (flag -> env -> config via resolveTarget), then dispatches to a per-command handler. Returns the process exit code so the caller in cmd/ can os.Exit cleanly.
Generated by gomarkdoc