bson

package
v0.15.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2021 License: Apache-2.0 Imports: 11 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandCodec added in v0.15.0

type CommandCodec struct{}

CommandCodec is a codec for marshaling and unmarshaling commands to and from bytes in BSON format.

func (CommandCodec) MarshalCommand added in v0.15.0

func (_ CommandCodec) MarshalCommand(ctx context.Context, cmd eh.Command) ([]byte, error)

MarshalCommand marshals a command into bytes in BSON format.

func (CommandCodec) UnmarshalCommand added in v0.15.0

func (_ CommandCodec) UnmarshalCommand(ctx context.Context, b []byte) (eh.Command, context.Context, error)

UnmarshalCommand unmarshals a command from bytes in BSON format.

type EventCodec

type EventCodec struct{}

EventCodec is a codec for marshaling and unmarshaling events to and from bytes in BSON format.

func (*EventCodec) MarshalEvent

func (c *EventCodec) MarshalEvent(ctx context.Context, event eh.Event) ([]byte, error)

MarshalEvent marshals an event into bytes in BSON format.

func (*EventCodec) UnmarshalEvent

func (c *EventCodec) UnmarshalEvent(ctx context.Context, b []byte) (eh.Event, context.Context, error)

UnmarshalEvent unmarshals an event from bytes in BSON format.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL