Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorWasRendered ¶
func ErrorWasRendered() bool
ErrorWasRendered reports whether any Writer.Err has been called in this process. Intended for the CLI entrypoint to suppress double-printing.
Types ¶
type Breadcrumb ¶
type Breadcrumb struct {
Action string `json:"action"`
Cmd string `json:"cmd"`
Description string `json:"description"`
}
Breadcrumb suggests a follow-up action to the user or agent.
type ErrorResponse ¶
type ErrorResponse struct {
OK bool `json:"ok"`
Error string `json:"error"`
Code string `json:"code,omitempty"`
Hint string `json:"hint,omitempty"`
}
ErrorResponse is the JSON envelope for errors.
type Response ¶
type Response struct {
OK bool `json:"ok"`
Data any `json:"data"`
Summary string `json:"summary,omitempty"`
Breadcrumbs []Breadcrumb `json:"breadcrumbs,omitempty"`
}
Response is the standard JSON envelope for successful responses.
type Writer ¶
type Writer struct {
Format Format
}
Writer handles output formatting based on the selected format.
Click to show internal directories.
Click to hide internal directories.