mongo

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CollectionName is the name of the collection in the database
	CollectionName = "exchanges"
)

Variables

View Source
var (
	// ErrNilID is returned when the ID is nil
	ErrNilID = fmt.Errorf("ID is nil")
	// ErrNoDocument is returned when no document is found
	ErrNoDocument = fmt.Errorf("no document found")
)

Functions

This section is empty.

Types

type Adapter

type Adapter struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, c config.Mongo) (*Adapter, error)

func (*Adapter) CreateExchanges

func (a *Adapter) CreateExchanges(ctx context.Context, exchanges ...exchange.Exchange) error

func (*Adapter) CreateIndexes

func (a *Adapter) CreateIndexes() error

func (*Adapter) DeleteExchanges

func (a *Adapter) DeleteExchanges(ctx context.Context, names ...string) error

func (*Adapter) ReadExchanges

func (a *Adapter) ReadExchanges(ctx context.Context, names ...string) ([]exchange.Exchange, error)

func (*Adapter) Reset

func (a *Adapter) Reset(ctx context.Context) error

func (*Adapter) UpdateExchanges

func (a *Adapter) UpdateExchanges(ctx context.Context, exchanges ...exchange.Exchange) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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