Documentation
¶
Overview ¶
Package baseenc declares the error codes and the sentinels of the base-N codec family (base64, base64url, base32, base16, hex, ascii85, base45, base58, base62), internal/service/data/codec/baseenc — range 0.3.24.* (ADR 0006 service/data/codec/baseenc 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 baseenc — 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 CodeBaseEncDecodeFailed errs.Code = 0x00_03_18_03 // 0.3.24.3
CodeBaseEncDecodeFailed identifies a base-N decode failure (malformed input rejected by the stdlib encoding/{hex,base32,base64,ascii85} decoders).
const CodeBaseEncMarshalFailed errs.Code = 0x00_03_18_01 // 0.3.24.1
CodeBaseEncMarshalFailed identifies a JSON-encode failure that happens before the base-N step in the universal "flatten to JSON, then base-N" pipeline.
const CodeBaseEncSizeExceeded errs.Code = 0x00_03_18_04 // 0.3.24.4
CodeBaseEncSizeExceeded identifies an Unmarshal input whose length exceeds the 10 MiB hard cap (CWE-400 memory-exhaustion defence).
const CodeBaseEncUnmarshalFailed errs.Code = 0x00_03_18_02 // 0.3.24.2
CodeBaseEncUnmarshalFailed identifies a JSON-decode failure that happens after the base-N step in the universal "base-N decode, then JSON" pipeline.
Variables ¶
var ( // BaseEncMarshalFailed wraps a JSON-side failure before base-N encoding. BaseEncMarshalFailed = errs.Static(CodeBaseEncMarshalFailed, "BASE_ENC_MARSHAL_FAILED", "base-N encoding failed", "service/data/codec/baseenc: encoding/json.Marshal returned an error before the base-N step", 0, 0) // BaseEncUnmarshalFailed wraps a JSON-side failure after base-N decoding. BaseEncUnmarshalFailed = errs.Static(CodeBaseEncUnmarshalFailed, "BASE_ENC_UNMARSHAL_FAILED", "base-N decoding failed", "service/data/codec/baseenc: encoding/json.Unmarshal returned an error after the base-N step", 0, 0) // BaseEncDecodeFailed wraps a malformed base-N input rejected by the // stdlib decoder. BaseEncDecodeFailed = errs.Static(CodeBaseEncDecodeFailed, "BASE_ENC_DECODE_FAILED", "base-N decoding failed", "service/data/codec/baseenc: stdlib base-N decoder rejected the input bytes", 0, 0) // BaseEncSizeExceeded fires when an Unmarshal input exceeds the 10 MiB cap. BaseEncSizeExceeded = errs.Static(CodeBaseEncSizeExceeded, "BASE_ENC_SIZE_EXCEEDED", "base-N input exceeds size limit", "service/data/codec/baseenc: len(data) exceeds maxBaseEncBytes (CWE-400 defence)", 0, 0) )
Functions ¶
This section is empty.
Types ¶
This section is empty.