postgres

package
v0.0.0-...-1a1045e Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FinanceRepo

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

struct for communication with database

func NewFinanceRepo

func NewFinanceRepo(db *sqlx.DB) *FinanceRepo

new struct

func (*FinanceRepo) Close

func (r *FinanceRepo) Close(ctx context.Context) error

close db

func (*FinanceRepo) CreateNewTransaction

func (r *FinanceRepo) CreateNewTransaction(ctx context.Context, idFrom uuid.UUID, operation string, sum float64, idTo uuid.UUID, description string) error

create transaction

func (*FinanceRepo) GetBalance

func (r *FinanceRepo) GetBalance(ctx context.Context, inp *domain.BalanceInput) (float64, error)

user balance

func (*FinanceRepo) GetTransactionsList

func (r *FinanceRepo) GetTransactionsList(ctx context.Context, inp *domain.TransactionsListInput) ([]domain.TransactionsList, error)

list of all transactions by query

func (*FinanceRepo) MakeRemittance

func (r *FinanceRepo) MakeRemittance(ctx context.Context, inp *domain.RemittanceInput) error

transaction from user to user

func (*FinanceRepo) MakeTransaction

func (r *FinanceRepo) MakeTransaction(ctx context.Context, inp *domain.TransactionInput) error

transaction from user

Jump to

Keyboard shortcuts

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