db

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2022 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBStore

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

func New

func New(db *sqlx.DB, migrationDriver database.Driver, dbName string) (*DBStore, error)

func (*DBStore) AdDebt

func (d *DBStore) AdDebt(debt *debt.Debt) error

func (*DBStore) AddUser

func (d *DBStore) AddUser(_ context.Context, user *userDomain.User) error

func (*DBStore) GetUser

func (d *DBStore) GetUser(_ context.Context, id string) (*userDomain.User, error)

func (*DBStore) ListDebtsForOrderID

func (d *DBStore) ListDebtsForOrderID(orderID string) ([]*debt.Debt, error)

func (*DBStore) ListUsers

func (d *DBStore) ListUsers(_ context.Context, filter userDomain.ListFilter) ([]*userDomain.User, error)

func (*DBStore) RemoveDebtInOrderID

func (d *DBStore) RemoveDebtInOrderID(orderID, debtID string) error

type ExecError

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

func (*ExecError) Error

func (e *ExecError) Error() string

Jump to

Keyboard shortcuts

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