cli

package
v0.0.0-...-62b357f Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExitOK      = 0
	ExitGeneral = 1
	ExitUsage   = 2
	ExitConfig  = 3
	ExitAuth    = 4
	ExitAPI     = 5
	ExitNetwork = 6
)

Variables

This section is empty.

Functions

func Execute

func Execute(ctx context.Context, args []string, stdin io.Reader, stdout, stderr io.Writer) int

func ExecuteWithOptions

func ExecuteWithOptions(ctx context.Context, args []string, opts *Options) int

func NewRootCommand

func NewRootCommand(opts *Options) *cobra.Command

Types

type ExitError

type ExitError struct {
	Code    int
	Message string
	Err     error
}

func (*ExitError) Error

func (e *ExitError) Error() string

func (*ExitError) Unwrap

func (e *ExitError) Unwrap() error

type Options

type Options struct {
	Profile        string
	APIURL         string
	APIKey         string
	ConfigPath     string
	JSON           bool
	NonInteractive bool
	Timeout        time.Duration

	Stdin      io.Reader
	Stdout     io.Writer
	Stderr     io.Writer
	HTTPClient *http.Client
	Getenv     func(string) string
}

Jump to

Keyboard shortcuts

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