Documentation
¶
Index ¶
Constants ¶
View Source
const SchemaVersion = "1.0"
SchemaVersion is the JSON output schema version every envelope carries.
Variables ¶
View Source
var Codes = map[string]CodeSpec{ "E_INTEGRITY": {Exit: 1, Retryable: false, Core: true}, "E_IO": {Exit: 1, Retryable: false, Core: true}, "E_UNKNOWN": {Exit: 1, Retryable: false, Core: true}, "E_USAGE": {Exit: 2, Retryable: false, Core: true}, "E_VALIDATION": {Exit: 2, Retryable: false, Core: true}, "E_NOT_FOUND": {Exit: 3, Retryable: false, Core: true}, "E_AUTH": {Exit: 4, Retryable: false, Core: true}, "E_CONFIG": {Exit: 4, Retryable: false, Core: true}, "E_FORBIDDEN": {Exit: 4, Retryable: false, Core: true}, "E_CONFIRMATION_REQUIRED": {Exit: 5, Retryable: false, Core: true}, "E_CONFLICT": {Exit: 6, Retryable: false, Core: true}, "E_NETWORK": {Exit: 7, Retryable: true, Core: true}, "E_RATE_LIMITED": {Exit: 7, Retryable: true, Core: true}, "E_SERVER": {Exit: 7, Retryable: true, Core: true}, "E_TIMEOUT": {Exit: 8, Retryable: true, Core: true}, "E_INTERRUPTED": {Exit: 130, Retryable: true, Core: true}, }
Codes is the frozen canonical error-code table (core + this tool's registered extensions). It is the binding source for code -> exit -> retryable.
View Source
var ErrorEnvelopeKeys = []string{"ok", "schema_version", "error", "meta"}
View Source
var ErrorObjectKeys = []string{"code", "message", "details", "retryable"}
View Source
var MetaOptionalKeys = []string{"notices"}
View Source
var MetaRequiredKeys = []string{"duration_ms"}
View Source
var SuccessEnvelopeKeys = []string{"ok", "schema_version", "data", "meta"}
Canonical envelope key sets (snake_case).
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.