cli

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

Package cli wires Cobra commands, global flags, and command-level helpers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(ctx context.Context) error

Execute runs the CLI with the given context. The context carries signal cancellation from main, so Ctrl-C aborts an in-flight paginated walk.

Types

type APIError added in v0.4.0

type APIError struct {
	Status int
	Detail string
	Fields []FieldError
	Raw    []byte
}

APIError is a non-2xx API response rendered for humans.

The API is Django REST Framework, which returns a small number of predictable error shapes. Parsing them into fields beats dumping raw JSON at the user, which is what this replaced.

func (*APIError) Error added in v0.4.0

func (e *APIError) Error() string

type FieldError added in v0.4.0

type FieldError struct {
	Field    string
	Messages []string
}

FieldError is one field's validation messages.

Jump to

Keyboard shortcuts

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