Versions in this module Expand all Collapse all v0 v0.3.3 Nov 6, 2026 Changes in this version + const HashAlgorithmSHA256 + const HashAlgorithmSHA512 + const HeaderName + func IsErrorCode(err error, code ErrorCode) bool + func PreflightSigningField(number uint64, recipeBytes int, recipePresent bool, limits RenderLimits) (int, error) + func ValidateSequence(instances []MessageInstance) error + type Collection struct + func NewCollection(items []MessageInstance) (Collection, error) + func (c Collection) ByNumber(number uint64) (MessageInstance, bool) + func (c Collection) HighestNumber() uint64 + func (c Collection) Len() int + func (c Collection) Valid() bool + type Error struct + func (e *Error) Class() ErrorClass + func (e *Error) Code() ErrorCode + func (e *Error) Count() int + func (e *Error) Error() string + func (e *Error) ExpectedNumber() uint64 + func (e *Error) Format(state fmt.State, _ rune) + func (e *Error) GoString() string + func (e *Error) Is(target error) bool + func (e *Error) Limit() int + func (e *Error) LimitName() string + func (e *Error) Location() ErrorLocation + func (e *Error) ObservedNumber() uint64 + func (e *Error) TagName() string + func (e *Error) Unwrap() error + type ErrorClass string + const ErrorClassDuplicate + const ErrorClassInvariant + const ErrorClassLimit + const ErrorClassMalformed + const ErrorClassMissing + func (c ErrorClass) Known() bool + type ErrorCode string + const ErrorCodeDuplicateHashName + const ErrorCodeDuplicateNumber + const ErrorCodeInvalidConstruction + const ErrorCodeInvalidHashBase64 + const ErrorCodeInvalidHashLength + const ErrorCodeInvalidNumber + const ErrorCodeInvalidOptions + const ErrorCodeInvalidRecipeBase64 + const ErrorCodeLimitExceeded + const ErrorCodeMalformedHashSet + const ErrorCodeMissingOrigin + const ErrorCodeMissingRequiredTag + const ErrorCodeRenderInvariant + const ErrorCodeSequenceGap + const ErrorCodeWrongHeaderField + func (c ErrorCode) Known() bool + type ErrorDetails struct + Class ErrorClass + Count int + ExpectedNumber uint64 + Limit int + LimitName LimitName + ObservedNumber uint64 + TagName TagName + type ErrorLocation struct + FieldIndex int + HashIndex int + type HashSelectionStatus string + const HashSelectionStatusMissing + const HashSelectionStatusSelected + const HashSelectionStatusUnsupported + func (s HashSelectionStatus) Known() bool + type HashSet struct + func (h HashSet) BodyHash() (tagvalue.Base64String, bool) + func (h HashSet) BodyHashValue() []byte + func (h HashSet) Format(state fmt.State, _ rune) + func (h HashSet) GoString() string + func (h HashSet) HeaderHash() (tagvalue.Base64String, bool) + func (h HashSet) HeaderHashValue() []byte + func (h HashSet) Known() bool + func (h HashSet) Name() string + func (h HashSet) String() string + type LimitName string + const LimitNameMaxFieldBytes + const LimitNameMaxHashSets + const LimitNameMaxInstances + const LimitNameMaxLineBytes + const LimitNameMaxRecipeBytes + const LimitNameRenderCoherence + func (n LimitName) Known() bool + type Limits struct + MaxHashSets int + MaxInstances int + TagLimits tagvalue.Limits + func DefaultLimits() Limits + func (l Limits) Validate() error + type MessageInstance struct + func Extract(msg rawmsg.Message) ([]MessageInstance, error) + func NewForSigning(request SigningRequest) (MessageInstance, error) + func Parse(field rawmsg.HeaderField) (MessageInstance, error) + func (m MessageInstance) Format(state fmt.State, _ rune) + func (m MessageInstance) GoString() string + func (m MessageInstance) HashLayout() combine.Layout + func (m MessageInstance) HashSets() []HashSet + func (m MessageInstance) HeaderIndex() int + func (m MessageInstance) Number() uint64 + func (m MessageInstance) Recipe() (tagvalue.Base64String, bool) + func (m MessageInstance) Render(limits RenderLimits) ([]byte, error) + func (m MessageInstance) SHA256HashSet() (HashSet, HashSelectionStatus) + func (m MessageInstance) String() string + func (m MessageInstance) SupportedHashSets() ([]HashSet, HashSelectionStatus) + type Parser struct + func NewParser(limits Limits) (Parser, error) + func (p Parser) Extract(msg rawmsg.Message) ([]MessageInstance, error) + func (p Parser) ParseField(field rawmsg.HeaderField) (MessageInstance, error) + type RenderLimits struct + MaxFieldBytes int + MaxLineBytes int + MaxRecipeBytes int + func DefaultRenderLimits() RenderLimits + func (l RenderLimits) Validate() error + type SigningRequest struct + BodyHash []byte + HeaderHash []byte + Number uint64 + Recipe []byte + RecipePresent bool + func (r SigningRequest) Format(state fmt.State, _ rune) + func (r SigningRequest) GoString() string + func (r SigningRequest) String() string + type TagName string + const TagNameHashes + const TagNameNumber + const TagNameRecipe + func (n TagName) Known() bool