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.
Click to show internal directories.
Click to hide internal directories.