Documentation
¶
Overview ¶
Package envelope provides the standard JSON response wrapper for all --json output.
Index ¶
Constants ¶
View Source
const SchemaVersion = "v1"
SchemaVersion is the public contract version. Consumers decoding this envelope should branch on major-version changes (v1 -> v2) and expect additive changes within a version. Adding a field is backward-compatible (unknown fields are ignored by Go's json decoder). Renaming or removing a field is a breaking change and requires a major-version bump.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Envelope ¶
type Envelope struct {
SchemaVersion string `json:"schema_version"`
Command string `json:"command"`
Status string `json:"status"`
Warnings []Issue `json:"warnings"`
Errors []Issue `json:"errors"`
Result interface{} `json:"result"`
Meta Meta `json:"meta"`
}
Envelope is the standard JSON response wrapper for all --json output.
func (*Envelope) AddWarning ¶
AddWarning adds a structured warning and updates status.
Click to show internal directories.
Click to hide internal directories.