Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Serializer ¶
type Serializer struct {
// contains filtered or unexported fields
}
Serializer de/serializes events which have been bound to the serializer.
func New ¶
func New(events ...es.Event) (*Serializer, error)
New constructs a new gob serializer and populates it with the specified events. Bind may be subsequently called to add more events.
func (*Serializer) Bind ¶
func (s *Serializer) Bind(events ...es.Event) error
Bind registers the specified events with the serializer. Bind may be called multiple times.
func (*Serializer) MarshalAll ¶
MarshalAll is a utility that marshals all the events provided into a History object
func (*Serializer) MarshalEvent ¶
MarshalEvent marshals the event into a Record which can be stored.
func (*Serializer) UnmarshalEvent ¶
UnmarshalEvent converts the persistent type, Record, into an Event instance
Click to show internal directories.
Click to hide internal directories.