flatbuffers

package
v0.19.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2026 License: MIT Imports: 1 Imported by: 0

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

View Source
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.

View Source
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.

View Source
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

View Source
var (
	// FlatbuffersBadType fires when Marshal cannot extract a byte payload
	// from the argument (not []byte, not a BytesProvider).
	FlatbuffersBadType = errs.Define(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")

	// FlatbuffersBadTarget fires when Unmarshal cannot publish the payload
	// through the target (not *[]byte, not a BytesAcceptor).
	FlatbuffersBadTarget = errs.Define(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")

	// 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.Define(CodeFlatbuffersTruncated, "FLATBUFFERS_TRUNCATED",
		"FlatBuffers buffer is truncated",
		"service/data/codec/flatbuffers: buffer length is invalid for the FlatBuffers wire format")
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL