Documentation
¶
Overview ¶
Package flatbuffers declares the error codes and the sentinels of the FlatBuffers passthrough codec, internal/service/data/codec/flatbuffers — range 0.3.23.* (ADR 0006 service/data/codec/flatbuffers 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 flatbuffers — 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 CodeFlatbuffersBadTarget errs.Code = 0x00_03_17_02 // 0.3.23.2
CodeFlatbuffersBadTarget identifies an Unmarshal call whose target is neither *[]byte nor an implementation of BytesAcceptor.
const CodeFlatbuffersBadType errs.Code = 0x00_03_17_01 // 0.3.23.1
CodeFlatbuffersBadType identifies a Marshal call whose value is neither []byte nor an implementation of BytesProvider.
const CodeFlatbuffersTruncated errs.Code = 0x00_03_17_03 // 0.3.23.3
CodeFlatbuffersTruncated identifies a buffer shorter than the 4-byte root-offset header required by the FlatBuffers wire format, or larger than the package-level CWE-400 ceiling.
Variables ¶
var ( // FlatbuffersBadType fires when Marshal cannot extract a byte payload // from the argument (not []byte, not a BytesProvider). FlatbuffersBadType = errs.Static(CodeFlatbuffersBadType, "FLATBUFFERS_BAD_TYPE", "FlatBuffers codec requires []byte or a BytesProvider value", "service/data/codec/flatbuffers: Marshal argument is not []byte and does not implement BytesProvider", 0, 0) // FlatbuffersBadTarget fires when Unmarshal cannot publish the payload // through the target (not *[]byte, not a BytesAcceptor). FlatbuffersBadTarget = errs.Static(CodeFlatbuffersBadTarget, "FLATBUFFERS_BAD_TARGET", "FlatBuffers codec requires a *[]byte or BytesAcceptor target", "service/data/codec/flatbuffers: Unmarshal target is not *[]byte and does not implement BytesAcceptor", 0, 0) // FlatbuffersTruncated fires when the buffer is shorter than the // 4-byte root-offset header mandated by the FlatBuffers wire format // or larger than the package-level CWE-400 ceiling. FlatbuffersTruncated = errs.Static(CodeFlatbuffersTruncated, "FLATBUFFERS_TRUNCATED", "FlatBuffers buffer is truncated", "service/data/codec/flatbuffers: buffer length is invalid for the FlatBuffers wire format", 0, 0) )
Functions ¶
This section is empty.
Types ¶
This section is empty.