Documentation
¶
Overview ¶
Package pem declares the error codes and the sentinels of the PEM codec, internal/service/data/codec/pem — range 0.3.10.* (ADR 0005 service/data/codec/pem 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 pem — 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 CodePEMMarshalFailed errs.Code = 0x00_03_0A_01 // 0.3.10.1
CodePEMMarshalFailed identifies a failure inside encoding/pem.Encode.
const CodePEMUnmarshalFailed errs.Code = 0x00_03_0A_02 // 0.3.10.2
CodePEMUnmarshalFailed identifies a failure inside encoding/pem.Decode (no PEM block found in input).
const CodePEMValueInvalid errs.Code = 0x00_03_0A_03 // 0.3.10.3
CodePEMValueInvalid identifies a Marshal call that did not receive a *pem.Block or an Unmarshal call whose target is not a **pem.Block.
Variables ¶
var ( // MarshalFailed wraps a failure from encoding/pem.Encode. MarshalFailed = errs.Define(CodePEMMarshalFailed, "MARSHAL_FAILED", "PEM encoding failed", "service/data/codec/pem: encoding/pem.Encode returned an error") // UnmarshalFailed fires when no PEM block could be decoded from the input. UnmarshalFailed = errs.Define(CodePEMUnmarshalFailed, "UNMARSHAL_FAILED", "PEM decoding failed", "service/data/codec/pem: encoding/pem.Decode returned no block") // ValueInvalid fires when the caller does not pass a *pem.Block / **pem.Block. ValueInvalid = errs.Define(CodePEMValueInvalid, "VALUE_INVALID", "PEM codec requires a *pem.Block value", "service/data/codec/pem: Marshal/Unmarshal argument is not *pem.Block") )
Functions ¶
This section is empty.
Types ¶
This section is empty.