Documentation
¶
Overview ¶
Package response provides a structured success-response helper that is symmetric with the error envelope in cmd/internal/errors. When the active --output mode is json or yaml the helper marshals a SuccessEnvelope to stdout; otherwise it falls back to the plain-text logger.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ResultDetail ¶
type ResultDetail struct {
Message string `json:"message" yaml:"message"`
Data map[string]any `json:"data,omitempty" yaml:"data,omitempty"`
}
ResultDetail is the structured body inside a SuccessEnvelope.
type SuccessEnvelope ¶
type SuccessEnvelope struct {
Result ResultDetail `json:"result" yaml:"result"`
}
SuccessEnvelope is the top-level JSON/YAML payload for structured success responses.
Click to show internal directories.
Click to hide internal directories.