pgsql

package
v0.0.0-...-b4821ab Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDB

func GetDB(uri string) (*sqlx.DB, error)

func PgxCreateDB

func PgxCreateDB(uri string) (*sqlx.DB, error)

Types

type Storage

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

func NewStorage

func NewStorage(dsn string) (*Storage, error)

func (*Storage) Close

func (s *Storage) Close(context.Context) error

func (*Storage) CreateUser

func (s *Storage) CreateUser(ctx context.Context, title string) (models.UserID, error)

func (*Storage) DeleteBills

func (s *Storage) DeleteBills(ctx context.Context, billIDs []models.BillID) ([]models.Bill, error)

func (*Storage) GetBills

func (s *Storage) GetBills(ctx context.Context, billIDs []models.BillID) ([]models.Bill, error)

func (*Storage) GetUserAccount

func (s *Storage) GetUserAccount(ctx context.Context, userID models.UserID) (models.Account, error)

func (*Storage) GetUserBalances

func (s *Storage) GetUserBalances(ctx context.Context, userID models.UserID) (map[models.UserID]models.Money, error)

func (*Storage) ListUserBills

func (s *Storage) ListUserBills(ctx context.Context, userID models.UserID) ([]models.Bill, error)

func (*Storage) SaveSplittedBill

func (s *Storage) SaveSplittedBill(ctx context.Context, ownerID models.UserID, bill models.Bill) (models.BillID, error)

Jump to

Keyboard shortcuts

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