Versions in this module Expand all Collapse all v0 v0.4.0 Mar 11, 2026 v0.3.1 Mar 10, 2026 v0.3.0 Mar 10, 2026 v0.2.3 Mar 4, 2026 v0.2.2 Mar 4, 2026 Changes in this version type Response + DisplayData any type ResponseOption + func WithDisplayData(data any) ResponseOption + func WithGroupBy(field string) ResponseOption v0.2.1 Mar 1, 2026 v0.2.0 Mar 1, 2026 Changes in this version type ResponseOption + func WithoutBreadcrumbs() ResponseOption v0.1.1 Feb 25, 2026 v0.1.0 Feb 25, 2026 Changes in this version + const CodeAPI + const CodeAmbiguous + const CodeAuth + const CodeForbidden + const CodeNetwork + const CodeNotFound + const CodeRateLimit + const CodeUsage + const ExitAPI + const ExitAmbiguous + const ExitAuth + const ExitForbidden + const ExitNetwork + const ExitNotFound + const ExitOK + const ExitRateLimit + const ExitUsage + func ExitCodeFor(code string) int + func NormalizeData(data any) any + func TruncationNotice(count, defaultLimit int, all bool, explicitLimit int) string + func TruncationNoticeWithTotal(count, totalCount int) string + type Breadcrumb struct + Action string + Cmd string + Description string + type Error struct + Cause error + Code string + HTTPStatus int + Hint string + Message string + Retryable bool + func AsError(err error) *Error + func ErrAPI(status int, msg string) *Error + func ErrAmbiguous(resource string, matches []string) *Error + func ErrAuth(msg string) *Error + func ErrForbidden(msg string) *Error + func ErrForbiddenScope() *Error + func ErrNetwork(cause error) *Error + func ErrNotFound(resource, identifier string) *Error + func ErrNotFoundHint(resource, identifier, hint string) *Error + func ErrRateLimit(retryAfter int) *Error + func ErrUsage(msg string) *Error + func ErrUsageHint(msg, hint string) *Error + func (e *Error) Error() string + func (e *Error) ExitCode() int + func (e *Error) Unwrap() error + type ErrorResponse struct + Code string + Error string + Hint string + Meta map[string]any + OK bool + type ErrorResponseOption func(*ErrorResponse) + func WithErrorStats(metrics *observability.SessionMetrics) ErrorResponseOption + type Format int + const FormatAuto + const FormatCount + const FormatIDs + const FormatJSON + const FormatMarkdown + const FormatQuiet + const FormatStyled + type MarkdownRenderer struct + func NewMarkdownRenderer(w io.Writer) *MarkdownRenderer + func (r *MarkdownRenderer) RenderError(w io.Writer, resp *ErrorResponse) error + func (r *MarkdownRenderer) RenderResponse(w io.Writer, resp *Response) error + type Options struct + Format Format + Verbose bool + Writer io.Writer + func DefaultOptions() Options + type Renderer struct + Cell lipgloss.Style + CellMuted lipgloss.Style + Data lipgloss.Style + Error lipgloss.Style + Header lipgloss.Style + Hint lipgloss.Style + Muted lipgloss.Style + Subtle lipgloss.Style + Success lipgloss.Style + Summary lipgloss.Style + Warning lipgloss.Style + func NewRenderer(w io.Writer, forceStyled bool) *Renderer + func NewRendererWithTheme(w io.Writer, forceStyled bool, theme tui.Theme) *Renderer + func (r *Renderer) RenderError(w io.Writer, resp *ErrorResponse) error + func (r *Renderer) RenderResponse(w io.Writer, resp *Response) error + type Response struct + Breadcrumbs []Breadcrumb + Context map[string]any + Data any + Entity string + Meta map[string]any + Notice string + OK bool + Summary string + type ResponseOption func(*Response) + func WithBreadcrumbs(b ...Breadcrumb) ResponseOption + func WithContext(key string, value any) ResponseOption + func WithEntity(name string) ResponseOption + func WithMeta(key string, value any) ResponseOption + func WithNotice(s string) ResponseOption + func WithStats(metrics *observability.SessionMetrics) ResponseOption + func WithSummary(s string) ResponseOption + type Writer struct + func New(opts Options) *Writer + func (w *Writer) EffectiveFormat() Format + func (w *Writer) Err(err error, opts ...ErrorResponseOption) error + func (w *Writer) OK(data any, opts ...ResponseOption) error