cli

package
v0.3.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2026 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExitSuccess     = 0
	ExitGeneral     = 1
	ExitInvalidArgs = 2
	ExitAPIError    = 3
	ExitConfigError = 4
)

Exit codes per spec (docs/specs/03-cli/01-commands.md).

Variables

This section is empty.

Functions

func Execute

func Execute()

Execute runs the root command.

func ExitCode

func ExitCode(err error) int

ExitCode returns the appropriate exit code for an error.

func NewRootCmd

func NewRootCmd() *cobra.Command

func RoleInstructionFiles

func RoleInstructionFiles() []string

RoleInstructionFiles returns the list of role instruction filenames created by init.

func SetVersion

func SetVersion(v string)

SetVersion sets the version string displayed by --version.

func WorkflowFiles

func WorkflowFiles() []string

WorkflowFiles returns the list of workflow filenames to install.

Types

type APIError

type APIError struct {
	Err error
}

APIError wraps errors from GitHub API calls.

func (*APIError) Error

func (e *APIError) Error() string

func (*APIError) Unwrap

func (e *APIError) Unwrap() error

type BatchStatus

type BatchStatus struct {
	Number  int    `json:"number"`
	Title   string `json:"title"`
	Total   int    `json:"total"`
	Done    int    `json:"done"`
	Failed  int    `json:"failed"`
	Active  int    `json:"active"`
	Blocked int    `json:"blocked"`
	Ready   int    `json:"ready"`
	Manual  int    `json:"manual"`
}

BatchStatus holds summary info for a batch.

type ConfigError

type ConfigError struct {
	Err error
}

ConfigError wraps errors related to .herdos.yml.

func (*ConfigError) Error

func (e *ConfigError) Error() string

func (*ConfigError) Unwrap

func (e *ConfigError) Unwrap() error

type StatusOutput

type StatusOutput struct {
	Batches []BatchStatus `json:"batches"`
	Workers []WorkerRun   `json:"workers"`
}

StatusOutput is the JSON-serializable status structure.

type WorkerRun

type WorkerRun struct {
	RunID  int64  `json:"run_id"`
	Status string `json:"status"`
	URL    string `json:"url"`
}

WorkerRun holds info about an active workflow run.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL