postgres

package
v0.0.0-...-03b8b43 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2024 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 AccountsPostgres

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

func NewAccountsPostgres

func NewAccountsPostgres(pos *PostgresDB) *AccountsPostgres

func (*AccountsPostgres) Create

func (r *AccountsPostgres) Create(amount float64) (int, error)

func (*AccountsPostgres) Deposit

func (r *AccountsPostgres) Deposit(accountId int, amount float64) error

func (*AccountsPostgres) GetInfo

func (r *AccountsPostgres) GetInfo(accountId int) (models.Account, error)

func (*AccountsPostgres) Withdraw

func (r *AccountsPostgres) Withdraw(accountId int, amount float64) error

type PostgresDB

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

func NewPostgresDB

func NewPostgresDB(dsn string) (*PostgresDB, error)

Jump to

Keyboard shortcuts

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