Documentation
¶
Index ¶
- type WalletStore
- func (s WalletStore) AddCreditEntry(ctx context.Context, entry domain.CreditEntry) error
- func (s WalletStore) AddDebitEntry(ctx context.Context, entry domain.DebitEntry) error
- func (s WalletStore) Commit(ctx context.Context) error
- func (s WalletStore) GetBalance(ctx context.Context, walletID int) (*domain.WalletBalance, error)
- func (s WalletStore) Rollback(ctx context.Context) error
- func (s WalletStore) SaveBalance(ctx context.Context, balance *domain.WalletBalance) error
- type WalletStoreTxFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WalletStore ¶
type WalletStore struct {
// contains filtered or unexported fields
}
func (WalletStore) AddCreditEntry ¶
func (s WalletStore) AddCreditEntry(ctx context.Context, entry domain.CreditEntry) error
func (WalletStore) AddDebitEntry ¶
func (s WalletStore) AddDebitEntry(ctx context.Context, entry domain.DebitEntry) error
func (WalletStore) GetBalance ¶
func (s WalletStore) GetBalance(ctx context.Context, walletID int) (*domain.WalletBalance, error)
func (WalletStore) SaveBalance ¶
func (s WalletStore) SaveBalance(ctx context.Context, balance *domain.WalletBalance) error
type WalletStoreTxFactory ¶
type WalletStoreTxFactory struct {
// contains filtered or unexported fields
}
func NewWalletStoreTxFactory ¶
func NewWalletStoreTxFactory(db *pgxpool.Pool) *WalletStoreTxFactory
func (WalletStoreTxFactory) NewTx ¶
func (f WalletStoreTxFactory) NewTx(ctx context.Context) (*WalletStore, error)
Click to show internal directories.
Click to hide internal directories.