postgres

package
v0.0.0-...-3bb572b Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountPgGateway

type AccountPgGateway struct {
	DB *sql.DB
}

func NewAccountPgGateway

func NewAccountPgGateway(db *sql.DB) *AccountPgGateway

func (AccountPgGateway) Create

func (a AccountPgGateway) Create(account *entity.Account) error

func (AccountPgGateway) GetByID

func (a AccountPgGateway) GetByID(ID uuid.UUID) (*entity.Account, error)

func (AccountPgGateway) UpdateBalance

func (a AccountPgGateway) UpdateBalance(ID uuid.UUID, amount decimal.Decimal) error

type CustomerPgGatewayDB

type CustomerPgGatewayDB struct {
	DB *sql.DB
}

func NewCustomerPgGateway

func NewCustomerPgGateway(db *sql.DB) *CustomerPgGatewayDB

func (*CustomerPgGatewayDB) Create

func (c *CustomerPgGatewayDB) Create(customer *entity.Customer) error

func (*CustomerPgGatewayDB) GetByID

func (c *CustomerPgGatewayDB) GetByID(ID uuid.UUID) (*entity.Customer, error)

type TransactionPgGateway

type TransactionPgGateway struct {
	DB *sql.DB
}

func NewTransactionPgGateway

func NewTransactionPgGateway(db *sql.DB) *TransactionPgGateway

func (TransactionPgGateway) Create

func (a TransactionPgGateway) Create(transaction *entity.Transaction) error

func (TransactionPgGateway) GetByID

Jump to

Keyboard shortcuts

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