Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OffchainWithdrawal ¶
type OnchainWithdrawal ¶
type Operator ¶
type Operator interface { // web RegisterUser(username, password, addr string) (*User, error) CreateTransfer(trans Transfer) error CreateOffchainWithdraw(from string, withd OffchainWithdrawal) error // plasma blocks ExecuteDeposits() error ExecuteTransfers() error ExecuteOnchainWithdrawals() error ExecuteOffchainWithdrawals() error }
type Storage ¶
type Storage interface { // user IsUsernameAvailable(username string) bool IsUserValid(username, password string) bool CreateUser(user *User) error GetUsersCount() int UserById(id int) (*User, error) UserByAddress(addr string) (*User, error) ReduceBalance(user_id int, value int) error IncreaseBalance(user_id int, value int) error // deposit CreateDeposit(dep *Deposit) error DepositsByUserId(id int) ([]Deposit, error) // transfer CreateTransfer(trans *Transfer) error TransfersByUserId(id int) ([]Transfer, error) // onchain withdraw CreateOnchainWithdraw(withd *OnchainWithdrawal) error OnchainWithdrawalsByUserId(id int) ([]OnchainWithdrawal, error) // offchain withdraw CreateOffchainWithdraw(withd *OffchainWithdrawal) error OffchainWithdrawalsByUserId(id int) ([]OffchainWithdrawal, error) }
Click to show internal directories.
Click to hide internal directories.