mongo

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2024 License: CC0-1.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMongoSender

func NewMongoSender(ctx context.Context, config interface{}) (event.Sender, error)

func NewMongoWriter

func NewMongoWriter(ctx context.Context, config interface{}) (event.Writer, error)

Types

type MongoOutbox

type MongoOutbox struct {
	ID        string    `bson:"_id,omitempty"`
	Topic     string    `bson:"topic,omitempty"`
	Key       string    `bson:"key,omitempty"`
	Value     string    `bson:"value,omitempty"`
	CreatedAt time.Time `bson:"created_at,omitempty"`
}

func FromOutbox

func FromOutbox(out *event.OutboxRecord) *MongoOutbox

type MongoSender

type MongoSender struct {
	Collection string      `json:"collection" mapstructure:"collection"`
	Connection interface{} `json:"connection" mapstructure:"connection"`
	// contains filtered or unexported fields
}

func NewMongoOutbox

func NewMongoOutbox(ctx context.Context, config interface{}) (*MongoSender, error)

func (*MongoSender) Delete

func (m *MongoSender) Delete(ctx context.Context, message *event.EventMessage) error

func (*MongoSender) Send

func (m *MongoSender) Send(ctx context.Context, message *event.EventMessage) error

Jump to

Keyboard shortcuts

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