Documentation
¶
Overview ¶
Package output provides a consistent JSON envelope for all CLI output. Every response follows the same schema so AI Agents can reliably parse output.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrintError ¶
PrintError outputs an error response and returns the appropriate exit code.
func PrintRawError ¶
PrintRawError creates a CLIError from raw parameters and prints it. Returns the exit code.
func PrintSuccess ¶
func PrintSuccess(data interface{}, pagination *Pagination)
PrintSuccess outputs a successful response with data and optional pagination.
Types ¶
type ErrorDetail ¶
ErrorDetail contains structured error information.
type Pagination ¶
type Pagination struct {
HasNextPage bool `json:"hasNextPage"`
EndCursor string `json:"endCursor,omitempty"`
}
Pagination contains cursor-based pagination info.
type Response ¶
type Response struct {
Success bool `json:"success"`
Data interface{} `json:"data,omitempty"`
Pagination *Pagination `json:"pagination,omitempty"`
Error *ErrorDetail `json:"error,omitempty"`
}
Response is the standard JSON envelope for all CLI output.
Click to show internal directories.
Click to hide internal directories.