Documentation ¶
Index ¶
- type AccountAlreadyExistsError
- type AccountNotFoundError
- type AccountUnderFundedError
- type Accounts
- func (a *Accounts) BalanceOf(signer string) (float64, error)
- func (a *Accounts) CreateAccount(signer string) error
- func (a *Accounts) Deposit(signer string, amount float64) *Tx
- func (a *Accounts) Send(sender string, recipient string, amount float64) ([]*Tx, error)
- func (a *Accounts) Withdraw(signer string, amount float64) (*Tx, error)
- type Tx
- type TxAction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountAlreadyExistsError ¶
type AccountAlreadyExistsError struct {
// contains filtered or unexported fields
}
func (*AccountAlreadyExistsError) Error ¶
func (e *AccountAlreadyExistsError) Error() string
func (*AccountAlreadyExistsError) HTTPCode ¶
func (e *AccountAlreadyExistsError) HTTPCode() int
type AccountNotFoundError ¶
type AccountNotFoundError struct {
// contains filtered or unexported fields
}
func (*AccountNotFoundError) Error ¶
func (e *AccountNotFoundError) Error() string
func (*AccountNotFoundError) HTTPCode ¶
func (e *AccountNotFoundError) HTTPCode() int
type AccountUnderFundedError ¶
type AccountUnderFundedError struct {
// contains filtered or unexported fields
}
func (*AccountUnderFundedError) Error ¶
func (e *AccountUnderFundedError) Error() string
func (*AccountUnderFundedError) HTTPCode ¶
func (e *AccountUnderFundedError) HTTPCode() int
type Accounts ¶
type Accounts struct { // Stores the total balance of each account. Accounts map[string]float64 `json:"accounts"` }
func NewAccounts ¶
func NewAccounts() *Accounts
func (*Accounts) CreateAccount ¶
Click to show internal directories.
Click to hide internal directories.