mongorepository

package
v0.0.0-...-4752a79 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2017 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMongoFundingRepository

func NewMongoFundingRepository(collection *mgo.Collection) usecases.FundingRepository

NewMongoFundingRepository create a new mongo db funding repository

func NewMongoTransactionRepository

func NewMongoTransactionRepository(collection *mgo.Collection) usecases.TransactionRepository

NewMongoTransactionRepository create a new mongo db transaction repository

Types

type MongoFundingRepository

type MongoFundingRepository struct {
	Collection *mgo.Collection
}

MongoFundingRepository is the mongodb implementation of the funding repository

func (*MongoFundingRepository) FindByID

func (repository *MongoFundingRepository) FindByID(id string) *domain.Funding

FindByID returns one funding to the database

func (*MongoFundingRepository) FindByPeriod

func (repository *MongoFundingRepository) FindByPeriod(start time.Time, end time.Time) (result []*domain.Funding)

FindByPeriod returns funding in a specific period

func (*MongoFundingRepository) Store

func (repository *MongoFundingRepository) Store(funding *domain.Funding) string

Store a funding inside the database

type MongoTransactionRepository

type MongoTransactionRepository struct {
	Collection *mgo.Collection
}

MongoTransactionRepository is the mongodb implementation of the transaction repository

func (*MongoTransactionRepository) FindByFundingAndInterval

func (repository *MongoTransactionRepository) FindByFundingAndInterval(funding *domain.Funding, start time.Time, end time.Time) usecases.TransactionList

FindByFundingAndInterval find transactions by funding in a determined interval

func (*MongoTransactionRepository) FindByID

func (repository *MongoTransactionRepository) FindByID(id string) *domain.Transaction

FindByID returns one transaction to the database

func (*MongoTransactionRepository) Store

func (repository *MongoTransactionRepository) Store(transaction *domain.Transaction) string

Store a transaction inside the database

Jump to

Keyboard shortcuts

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