repositories

package
v0.0.0-...-81673a4 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Accounts

type Accounts interface {
	CreateAccount(context.Context, models.Account) (uuid.UUID, error)
	ListOfAccounts(context.Context, models.OffsetLimit) ([]models.Account, error)
	AccountByID(context.Context, uuid.UUID) (*models.Account, error)
	AccountByIDTx(context.Context, Tx, uuid.UUID) (*models.Account, error)
	UpdateAccount(context.Context, Tx, models.Account) error
}

func NewAccountsRepository

func NewAccountsRepository(db *pg.DB) Accounts

type Currencies

type Currencies interface {
	AllCurrencies(context.Context) ([]models.Currency, error)
	CurrencyByNumericCode(context.Context, int) (*models.Currency, error)
}

func NewCurrenciesRepository

func NewCurrenciesRepository(db *pg.DB) Currencies

type ExchangeRates

type ExchangeRates interface {
	ExchangeRateForCurrencies(context.Context, models.ExchangeRateArgs) (decimal.Decimal, error)
}

func NewExchangeRatesRepository

func NewExchangeRatesRepository(db *pg.DB) ExchangeRates

type Payments

type Payments interface {
	AccountPayments(context.Context, uuid.UUID, models.OffsetLimit) ([]models.Payment, error)
	CreatePayment(context.Context, Tx, models.Payment) (uuid.UUID, error)
}

func NewPaymentsRepository

func NewPaymentsRepository(db *pg.DB) Payments

type Tx

type Tx orm.DB

Tx - type alias to avoid go-pg library imports on service layer

type WithTransactionFunc

type WithTransactionFunc func(context.Context, func(Tx) error) error

func NewWithTransactionFunc

func NewWithTransactionFunc(db *pg.DB) WithTransactionFunc

Jump to

Keyboard shortcuts

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