bson

package
v0.15.6 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandCodec

type CommandCodec struct{}

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

func (CommandCodec) MarshalCommand

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

MarshalCommand marshals a command into bytes in BSON format.

func (CommandCodec) UnmarshalCommand

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