Documentation
¶
Overview ¶
Package msgpack declares the error codes and the sentinels of the MessagePack codec, internal/service/data/codec/msgpack — range 0.3.7.* (ADR 0005 service/data/codec/msgpack block).
The codes live in the core at the path that mirrors the package emitting them (ADR 0160 §2) and keep the values they were allocated with: the LL byte 3 records the layer that allocated the range, not the directory that declares it today (ADR 0160 §3). Nothing here encodes or decodes — the mechanism, and the constructors that attach a failure's detail, stay in the service package.
Package msgpack — the sentinel *errs.Error values, one per code. Each Reason derives from its var name or from its Code constant (ADR 0020); the Public and Private texts are the ones the service package always emitted, so moving the declaration changed no rendering.
Index ¶
Constants ¶
const CodeMsgPackDepthExceeded errs.Code = 0x00_03_07_06 // 0.3.7.6
CodeMsgPackDepthExceeded identifies input refused for a depth bound: containers nested past maxDepth. Its reason is the family's DEPTH_EXCEEDED (#894).
const CodeMsgPackDuplicateKey errs.Code = 0x00_03_07_03 // 0.3.7.3
CodeMsgPackDuplicateKey identifies a document NewStrict's instance refused because one of its maps repeats a key.
const CodeMsgPackMarshalFailed errs.Code = 0x00_03_07_01 // 0.3.7.1
CodeMsgPackMarshalFailed identifies an encode failure: a value MessagePack cannot represent, a marshal method's error, a nesting past the depth limit, or a writer's error on the streaming path.
const CodeMsgPackSizeExceeded errs.Code = 0x00_03_07_05 // 0.3.7.5
CodeMsgPackSizeExceeded identifies input refused for a size bound: input past maxMsgPackBytes. Its reason is the family's SIZE_EXCEEDED (#894).
const CodeMsgPackUnknownMember errs.Code = 0x00_03_07_04 // 0.3.7.4
CodeMsgPackUnknownMember identifies a document NewStrict's instance refused because it carries a member no field of the target struct claims.
const CodeMsgPackUnmarshalFailed errs.Code = 0x00_03_07_02 // 0.3.7.2
CodeMsgPackUnmarshalFailed identifies a decode failure: malformed or truncated input, an input over the size or depth limit, trailing bytes, or a value that does not fit its Go target.
Variables ¶
var ( // MarshalFailed is the sentinel of an encode failure. MarshalFailed = errs.Static(CodeMsgPackMarshalFailed, "MARSHAL_FAILED", "MessagePack encoding failed", "service/data/codec/msgpack: Marshal/Append/Encode failed", 0, 0) // UnmarshalFailed is the sentinel of a decode failure. UnmarshalFailed = errs.Static(CodeMsgPackUnmarshalFailed, "UNMARSHAL_FAILED", "MessagePack decoding failed", "service/data/codec/msgpack: Unmarshal/Decode failed", 0, 0) // DuplicateKey is the strict refusal of a map that repeats a key. DuplicateKey = errs.Static(CodeMsgPackDuplicateKey, "DUPLICATE_KEY", "MessagePack document repeats a map key", "service/data/codec/msgpack: NewStrict refused a map holding two equal keys", 0, 0) // UnknownMember is the strict refusal of a member no struct field claims. UnknownMember = errs.Static(CodeMsgPackUnknownMember, "UNKNOWN_MEMBER", "MessagePack document carries an unknown member", "service/data/codec/msgpack: NewStrict refused a member no field of the struct claims", 0, 0) // SizeExceeded is the refusal of input past a size bound: input past maxMsgPackBytes. SizeExceeded = errs.Static(CodeMsgPackSizeExceeded, "SIZE_EXCEEDED", "MsgPack input exceeds a size limit", "service/data/codec/msgpack: the input exceeds a size bound", 0, 0) // DepthExceeded is the refusal of input past a depth bound: containers nested past maxDepth. DepthExceeded = errs.Static(CodeMsgPackDepthExceeded, "DEPTH_EXCEEDED", "MsgPack input nests too deeply", "service/data/codec/msgpack: the input exceeds a depth bound", 0, 0) )
Functions ¶
This section is empty.
Types ¶
This section is empty.