Documentation
¶
Index ¶
- type Codec
- func (j Codec[K]) Decode(data []byte, meta eventsourcing.DecoderMeta[K]) (eventsourcing.Kinder, error)
- func (Codec[K]) Encode(v eventsourcing.Kinder) ([]byte, error)
- func (j *Codec[K]) RegisterFactory(kind eventsourcing.Kind, factory Factory[K])
- func (j *Codec[K]) RegisterUpcaster(kind eventsourcing.Kind, upcaster Upcaster)
- type Factory
- type Upcaster
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Codec ¶
type Codec[K eventsourcing.ID] struct { // contains filtered or unexported fields }
func New ¶
func New[K eventsourcing.ID]() *Codec[K]
func (Codec[K]) Decode ¶
func (j Codec[K]) Decode(data []byte, meta eventsourcing.DecoderMeta[K]) (eventsourcing.Kinder, error)
func (*Codec[K]) RegisterFactory ¶
func (j *Codec[K]) RegisterFactory(kind eventsourcing.Kind, factory Factory[K])
func (*Codec[K]) RegisterUpcaster ¶
func (j *Codec[K]) RegisterUpcaster(kind eventsourcing.Kind, upcaster Upcaster)
type Factory ¶ added in v0.37.0
type Factory[K eventsourcing.ID] func(id K) eventsourcing.Kinder
type Upcaster ¶
type Upcaster func(t eventsourcing.Kinder) (eventsourcing.Kinder, error)
Click to show internal directories.
Click to hide internal directories.