Documentation
¶
Overview ¶
Package hyphence is dodder's facade over the external hyphence format library (github.com/amarbel-llc/hyphence/go/hyphence), pre-filling madder's TypeStruct / markl.Id into the library's four leading generic type parameters (T, PT, D, PD). dodder's typed blobs are always keyed by a madder TypeStruct and a madder markl.Id digest, so this exposes the same one-parameter API (`TypedBlob[BLOB]`, `CoderToTypedBlob[BLOB]`, …) that madder's now-deleted go/pkgs/hyphence facade provided.
madder extracted hyphence into a standalone repo and dropped its pre-filled facade in madder go/v0.4.0 (madder #253). Recreating the facade here keeps dodder's ~26 consumer call sites unchanged — they only swap the import path from github.com/amarbel-llc/madder/go/pkgs/hyphence to this package.
Generic type aliases require Go 1.24+ (dodder is on 1.26).
Index ¶
- Constants
- func DecodeFromFileInto[BLOB any, BLOB_PTR interfaces.Ptr[BLOB]](typedBlob *TypedBlob[BLOB], coders CoderToTypedBlob[BLOB], path string) error
- func EncodeToFile[BLOB any, BLOB_PTR interfaces.Ptr[BLOB]](coders CoderToTypedBlob[BLOB], typedBlob *TypedBlob[BLOB], path string) error
- type Coder
- type CoderToTypedBlob
- type CoderTommy
- type CoderTypeMapWithoutType
- type Decoder
- type DecoderTypeMapWithoutType
- type Encoder
- type EncoderTypeMapWithoutType
- type MetadataWriterTo
- type Reader
- type TommyBlobDecoder
- type TommyBlobEncoder
- type TypedBlob
- type TypedBlobEmpty
- type TypedMetadataCoder
- type Writer
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func DecodeFromFileInto ¶
func EncodeToFile ¶
func EncodeToFile[BLOB any, BLOB_PTR interfaces.Ptr[BLOB]]( coders CoderToTypedBlob[BLOB], typedBlob *TypedBlob[BLOB], path string, ) error
Generic function wrappers — Go cannot alias generic functions (golang/go#52654), so these re-fix the four leading type params and forward to the external library. BLOB_PTR is inferred from its interfaces.Ptr[BLOB] constraint's core type, as it was through madder's deleted facade.
Types ¶
type Coder ¶
Single-BLOB-parameter generics — the library does not parameterize these by the type/digest types, so they pass through unchanged.
type CoderToTypedBlob ¶
type CoderToTypedBlob[BLOB any] = ext.CoderToTypedBlob[mad_ids.TypeStruct, *mad_ids.TypeStruct, markl.Id, *markl.Id, BLOB]
Five-parameter generics, pre-filled with T=mad_ids.TypeStruct, PT=*mad_ids.TypeStruct, D=markl.Id, PD=*markl.Id.
type CoderTommy ¶
type CoderTommy[BLOB any, BLOB_PTR interfaces.Ptr[BLOB]] = ext.CoderTommy[BLOB, BLOB_PTR]
BLOB + pointer coders, passed through unchanged.
type CoderTypeMapWithoutType ¶
type CoderTypeMapWithoutType[BLOB any] = ext.CoderTypeMapWithoutType[mad_ids.TypeStruct, *mad_ids.TypeStruct, markl.Id, *markl.Id, BLOB]
Five-parameter generics, pre-filled with T=mad_ids.TypeStruct, PT=*mad_ids.TypeStruct, D=markl.Id, PD=*markl.Id.
type Decoder ¶
Single-BLOB-parameter generics — the library does not parameterize these by the type/digest types, so they pass through unchanged.
type DecoderTypeMapWithoutType ¶
type DecoderTypeMapWithoutType[BLOB any] = ext.DecoderTypeMapWithoutType[mad_ids.TypeStruct, *mad_ids.TypeStruct, markl.Id, *markl.Id, BLOB]
Five-parameter generics, pre-filled with T=mad_ids.TypeStruct, PT=*mad_ids.TypeStruct, D=markl.Id, PD=*markl.Id.
type Encoder ¶
Single-BLOB-parameter generics — the library does not parameterize these by the type/digest types, so they pass through unchanged.
type EncoderTypeMapWithoutType ¶
type EncoderTypeMapWithoutType[BLOB any] = ext.EncoderTypeMapWithoutType[mad_ids.TypeStruct, *mad_ids.TypeStruct, markl.Id, *markl.Id, BLOB]
Five-parameter generics, pre-filled with T=mad_ids.TypeStruct, PT=*mad_ids.TypeStruct, D=markl.Id, PD=*markl.Id.
type TommyBlobDecoder ¶
type TommyBlobDecoder[BLOB any, BLOB_PTR interfaces.Ptr[BLOB]] = ext.TommyBlobDecoder[BLOB, BLOB_PTR]
BLOB + pointer coders, passed through unchanged.
type TommyBlobEncoder ¶
type TommyBlobEncoder[BLOB any, BLOB_PTR interfaces.Ptr[BLOB]] = ext.TommyBlobEncoder[BLOB, BLOB_PTR]
BLOB + pointer coders, passed through unchanged.
type TypedBlob ¶
type TypedBlob[BLOB any] = ext.TypedBlob[mad_ids.TypeStruct, *mad_ids.TypeStruct, markl.Id, *markl.Id, BLOB]
Five-parameter generics, pre-filled with T=mad_ids.TypeStruct, PT=*mad_ids.TypeStruct, D=markl.Id, PD=*markl.Id.
func DecodeFromFile ¶
type TypedBlobEmpty ¶
type TypedBlobEmpty = ext.TypedBlob[mad_ids.TypeStruct, *mad_ids.TypeStruct, markl.Id, *markl.Id, struct{}]
TypedBlobEmpty is a header-only typed blob (no blob payload, BLOB=struct{}).
type TypedMetadataCoder ¶
type TypedMetadataCoder[BLOB any] = ext.TypedMetadataCoder[mad_ids.TypeStruct, *mad_ids.TypeStruct, markl.Id, *markl.Id, BLOB]
Five-parameter generics, pre-filled with T=mad_ids.TypeStruct, PT=*mad_ids.TypeStruct, D=markl.Id, PD=*markl.Id.
Source Files
¶
- main.go