services

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: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BalanceService

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

func NewBalanceService

func NewBalanceService(storage BalanceStorage, log logger.Logger) *BalanceService

func (*BalanceService) GetBalance

func (s *BalanceService) GetBalance(ctx context.Context, userID models.UserID) (models.Account, error)

type BalanceStorage

type BalanceStorage interface {
	// GetInvoices(context.Context, models.UserID) ([]models.Invoice, error)
	GetBalanceForUser(context.Context, models.UserID) (models.Account, error)
}

type SplitTheBillService

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

func NewSplitTheBillService

func NewSplitTheBillService(storage SplitTheBillStorage) *SplitTheBillService

func (*SplitTheBillService) SaveBill

func (s *SplitTheBillService) SaveBill(ctx context.Context, userID models.UserID, bill models.Bill) (models.BillID, error)

type SplitTheBillStorage

type SplitTheBillStorage interface {
	// User
	CreateUser(context.Context, string) (models.UserID, error)

	// Bill
	SaveSplittedBill(context.Context, models.UserID, models.Bill) (models.BillID, error)
	ListUserBills(context.Context, models.UserID) ([]models.Bill, error)
	GetBills(context.Context, []models.BillID) ([]models.Bill, error)
	DeleteBills(context.Context, []models.BillID) ([]models.Bill, error)
}

Jump to

Keyboard shortcuts

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