Documentation
¶
Overview ¶
Package lengthcodec implements the orthogonal length-prefix axis of the Isopace wire engine: Fixed plus LL..LLLLLL variable prefixes in ASCII, BCD, binary and EBCDIC representations. A field's wire behaviour is the pair (LengthCodec, fieldcodec.FieldCodec), so these compose freely with any value codec instead of jPOS's combinatorial IF* class zoo.
Per the iso8583 contract a length prefix carries a LOGICAL UNIT COUNT (digits/characters/octets); the engine converts units to a wire byte span via the value codec's optional WidthCodec.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrTruncated = errors.New("lengthcodec: truncated length prefix") ErrOverflow = errors.New("lengthcodec: length exceeds prefix capacity") ErrBadDigit = errors.New("lengthcodec: non-digit in length prefix") )
Errors returned by the length codecs.
var ( Fixed iso8583.LengthCodec = fixed{} LLVarASCII iso8583.LengthCodec = varLen{/* contains filtered or unexported fields */} LLLVarASCII iso8583.LengthCodec = varLen{/* contains filtered or unexported fields */} LLLLVarASCII iso8583.LengthCodec = varLen{/* contains filtered or unexported fields */} LLLLLVarASCII iso8583.LengthCodec = varLen{/* contains filtered or unexported fields */} LLLLLLVarASCII iso8583.LengthCodec = varLen{/* contains filtered or unexported fields */} LLVarBCD iso8583.LengthCodec = varLen{/* contains filtered or unexported fields */} LLLVarBCD iso8583.LengthCodec = varLen{/* contains filtered or unexported fields */} LLVarBinary iso8583.LengthCodec = varLen{/* contains filtered or unexported fields */} LLLVarBinary iso8583.LengthCodec = varLen{/* contains filtered or unexported fields */} LLVarEBCDIC iso8583.LengthCodec = varLen{/* contains filtered or unexported fields */} LLLVarEBCDIC iso8583.LengthCodec = varLen{/* contains filtered or unexported fields */} )
The catalog: composable length prefixes referenced by name from schemas, YAML, or directly. Each is a stateless singleton.
Functions ¶
func All ¶
func All() []iso8583.LengthCodec
All returns every length codec in the catalog, for registry population.
Types ¶
This section is empty.