clientdb

package
v0.0.0-...-ffc2b38 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

func NewStore

func NewStore(log *slog.Logger, database db.DB) *Store

func (*Store) AddTransaction

func (s *Store) AddTransaction(ctx context.Context, t client.Transaction) error

func (*Store) ExecUnderTx

func (s *Store) ExecUnderTx(ctx context.Context, fn func(txStore client.Store) error) error

func (*Store) QueryByID

func (s *Store) QueryByID(ctx context.Context, clientID int) (client.Client, error)

func (*Store) QueryTransactions

func (s *Store) QueryTransactions(ctx context.Context, clientID, pageNumber, rowsPerPage int) ([]client.Transaction, error)

func (*Store) UpdateClientBalance

func (s *Store) UpdateClientBalance(ctx context.Context, clientID, balance int) (client.Client, error)

Jump to

Keyboard shortcuts

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