Documentation ¶
Index ¶
- type Account
- type Gateway
- func (g *Gateway) GetAccountsForTransfer(ctx context.Context, fromID, toID int64) (from, to Account, err error)
- func (g *Gateway) OpenAccount(ctx context.Context, initialAmmount int) (Account, error)
- func (g *Gateway) RunInTransaction(ctx context.Context, txFn func(context.Context) (interface{}, error)) (interface{}, error)
- func (g *Gateway) UpdateBalance(ctx context.Context, a Account) (Account, error)
- type MockDB
- type MockGateway
- func (g *MockGateway) GetAccountsForTransfer(ctx context.Context, fromID, toID int64) (from, to Account, err error)
- func (g *MockGateway) OpenAccount(ctx context.Context, initialAmmount int) (Account, error)
- func (g *MockGateway) RunInTransaction(ctx context.Context, txFn func(context.Context) (interface{}, error)) (interface{}, error)
- func (g *MockGateway) UpdateBalance(ctx context.Context, a Account) (Account, error)
- type Provider
- type Repository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Gateway ¶
type Gateway struct {
// contains filtered or unexported fields
}
Gateway ...
func (*Gateway) GetAccountsForTransfer ¶
func (g *Gateway) GetAccountsForTransfer(ctx context.Context, fromID, toID int64) (from, to Account, err error)
GetAccountsForTransfer ...
func (*Gateway) OpenAccount ¶
OpenAccount ...
type MockGateway ¶
type MockGateway struct {
// contains filtered or unexported fields
}
MockGateway ...
func (*MockGateway) GetAccountsForTransfer ¶
func (g *MockGateway) GetAccountsForTransfer(ctx context.Context, fromID, toID int64) (from, to Account, err error)
GetAccountsForTransfer ...
func (*MockGateway) OpenAccount ¶
OpenAccount ...
func (*MockGateway) RunInTransaction ¶
func (g *MockGateway) RunInTransaction(ctx context.Context, txFn func(context.Context) (interface{}, error)) (interface{}, error)
RunInTransaction ...
func (*MockGateway) UpdateBalance ¶
UpdateBalance ...
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider ...
func (*Provider) OpenAccount ¶
OpenAccount ...
type Repository ¶
type Repository interface { RunInTransaction(context.Context, func(context.Context) (interface{}, error)) (interface{}, error) OpenAccount(ctx context.Context, initialAmmount int) (Account, error) GetAccountsForTransfer(ctx context.Context, fromID, toID int64) (from, to Account, err error) UpdateBalance(ctx context.Context, a Account) (Account, error) }
Repository ...
Click to show internal directories.
Click to hide internal directories.