db

package
v0.0.0-...-62c273f Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoDatabaseInterface

type MongoDatabaseInterface interface {
	Collection(name string, opts ...*options.CollectionOptions) *mongo.Collection
}

MongoDatabaseInterface is an interface that describes the mongodb driver.

type TransactionClient

type TransactionClient interface {
	GetAccountsTransactions(dataDescription string) (*[]models.Transaction, error)
	Shutdown()
}

TransactionClient provides an interface by which to interact with a database.

func NewTransactionDatabaseClient

func NewTransactionDatabaseClient(cfg *config.Config) TransactionClient

NewTransactionDatabaseClient returns a new implementation of the Client interface.

type TransactionDatabaseClient

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

TransactionDatabaseClient is a concrete implementation of the Client interface.

func (*TransactionDatabaseClient) GetAccountsTransactions

func (c *TransactionDatabaseClient) GetAccountsTransactions(dataDescription string) (*[]models.Transaction, error)

GetAccountsTransactions returns a slice of Transaction which are retrieved from a mongoDB.

func (*TransactionDatabaseClient) Shutdown

func (c *TransactionDatabaseClient) Shutdown()

Shutdown is a hook that can be used to clean up db resources.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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