Documentation
¶
Index ¶
- Variables
- func MigrateSchema(dsn string) error
- func NewDB(cfg *config.DB) (*sqlx.DB, error)
- type BalanceDB
- func (b *BalanceDB) CashOut(ctx context.Context, bl *models.Balance) (int64, error)
- func (b *BalanceDB) CreateBalance(ctx context.Context, userID int) error
- func (b *BalanceDB) GetBalance(ctx context.Context, userID int) (uint64, error)
- func (b *BalanceDB) ListCashedBalance(ctx context.Context) ([]models.Balance, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrOverdraft = errors.New("not enough cash on bank account")
)
Functions ¶
func MigrateSchema ¶
Types ¶
type BalanceDB ¶
type BalanceDB struct {
// contains filtered or unexported fields
}
func (*BalanceDB) CreateBalance ¶
func (*BalanceDB) GetBalance ¶
Click to show internal directories.
Click to hide internal directories.