Documentation ¶
Index ¶
- type AccountDao
- func (_m *AccountDao) Create(account *types.Account) error
- func (_m *AccountDao) Drop()
- func (_m *AccountDao) GetAll() ([]types.Account, error)
- func (_m *AccountDao) GetByAddress(owner common.Address) (*types.Account, error)
- func (_m *AccountDao) GetByID(id bson.ObjectId) (*types.Account, error)
- func (_m *AccountDao) GetTokenBalance(owner common.Address, token common.Address) (*types.TokenBalance, error)
- func (_m *AccountDao) GetTokenBalances(owner common.Address) (map[common.Address]*types.TokenBalance, error)
- func (_m *AccountDao) UpdateBalance(owner common.Address, token common.Address, balance *big.Int) error
- func (_m *AccountDao) UpdateTokenBalance(owner common.Address, token common.Address, tokenBalance *types.TokenBalance) error
- type AccountService
- func (_m *AccountService) Create(account *types.Account) error
- func (_m *AccountService) GetAll() ([]types.Account, error)
- func (_m *AccountService) GetByAddress(a common.Address) (*types.Account, error)
- func (_m *AccountService) GetByID(id bson.ObjectId) (*types.Account, error)
- func (_m *AccountService) GetTokenBalance(owner common.Address, token common.Address) (*types.TokenBalance, error)
- func (_m *AccountService) GetTokenBalances(owner common.Address) (map[common.Address]*types.TokenBalance, error)
- type Engine
- type Ethereum
- func (_m *Ethereum) Allowance(owner common.Address, spender common.Address, token common.Address) (*big.Int, error)
- func (_m *Ethereum) BalanceOf(owner common.Address, token common.Address) (*big.Int, error)
- func (_m *Ethereum) ExchangeAllowance(owner common.Address, token common.Address) (*big.Int, error)
- func (_m *Ethereum) GetBalanceAt(a common.Address) (*big.Int, error)
- func (_m *Ethereum) GetPendingNonceAt(a common.Address) (uint64, error)
- func (_m *Ethereum) WaitMined(tx *types.Transaction) (*types.Receipt, error)
- type EthereumClient
- func (_m *EthereumClient) BalanceAt(ctx context.Context, contract common.Address, blockNumber *big.Int) (*big.Int, error)
- func (_m *EthereumClient) CallContract(ctx context.Context, call ethereum.CallMsg, blockNumber *big.Int) ([]byte, error)
- func (_m *EthereumClient) CodeAt(ctx context.Context, contract common.Address, blockNumber *big.Int) ([]byte, error)
- func (_m *EthereumClient) EstimateGas(ctx context.Context, call ethereum.CallMsg) (uint64, error)
- func (_m *EthereumClient) FilterLogs(ctx context.Context, query ethereum.FilterQuery) ([]types.Log, error)
- func (_m *EthereumClient) PendingCodeAt(ctx context.Context, account common.Address) ([]byte, error)
- func (_m *EthereumClient) PendingNonceAt(ctx context.Context, account common.Address) (uint64, error)
- func (_m *EthereumClient) SendTransaction(ctx context.Context, tx *types.Transaction) error
- func (_m *EthereumClient) SubscribeFilterLogs(ctx context.Context, query ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error)
- func (_m *EthereumClient) SuggestGasPrice(ctx context.Context) (*big.Int, error)
- func (_m *EthereumClient) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error)
- type EthereumProvider
- func (_m *EthereumProvider) Allowance(owner common.Address, spender common.Address, token common.Address) (*big.Int, error)
- func (_m *EthereumProvider) BalanceOf(owner common.Address, token common.Address) (*big.Int, error)
- func (_m *EthereumProvider) ExchangeAllowance(owner common.Address, token common.Address) (*big.Int, error)
- func (_m *EthereumProvider) GetBalanceAt(a common.Address) (*big.Int, error)
- func (_m *EthereumProvider) GetPendingNonceAt(a common.Address) (uint64, error)
- func (_m *EthereumProvider) WaitMined(hash common.Hash) (*types.Receipt, error)
- type EthereumService
- type Exchange
- func (_m *Exchange) CallTrade(o *types.Order, t *types.Trade, call *ethereum.CallMsg) (uint64, error)
- func (_m *Exchange) FeeAccount() (common.Address, error)
- func (_m *Exchange) GetAddress() common.Address
- func (_m *Exchange) GetErrorEvents(logs chan *contractsinterfaces.ExchangeLogError) error
- func (_m *Exchange) GetTrades(logs chan *contractsinterfaces.ExchangeLogTrade) error
- func (_m *Exchange) GetTxCallOptions() *bind.CallOpts
- func (_m *Exchange) ListenToErrors() (chan *contractsinterfaces.ExchangeLogError, error)
- func (_m *Exchange) ListenToTrades() (chan *contractsinterfaces.ExchangeLogTrade, error)
- func (_m *Exchange) Operator(a common.Address) (bool, error)
- func (_m *Exchange) PrintErrors() error
- func (_m *Exchange) PrintTrades() error
- func (_m *Exchange) SetFeeAccount(a common.Address, txOpts *bind.TransactOpts) (*coretypes.Transaction, error)
- func (_m *Exchange) SetOperator(a common.Address, isOperator bool, txOpts *bind.TransactOpts) (*coretypes.Transaction, error)
- func (_m *Exchange) Trade(o *types.Order, t *types.Trade, txOpts *bind.TransactOpts) (*coretypes.Transaction, error)
- type OHLCVService
- func (_m *OHLCVService) GetOHLCV(p []types.PairAddresses, duration int64, unit string, timeInterval ...int64) ([]*types.Tick, error)
- func (_m *OHLCVService) Subscribe(conn *ws.Client, bt common.Address, qt common.Address, p *types.Params)
- func (_m *OHLCVService) Unsubscribe(conn *ws.Client, bt common.Address, qt common.Address, p *types.Params)
- type OrderBookService
- type OrderDao
- func (_m *OrderDao) Create(o *types.Order) error
- func (_m *OrderDao) Drop() error
- func (_m *OrderDao) GetByHash(hash common.Hash) (*types.Order, error)
- func (_m *OrderDao) GetByHashes(hashes []common.Hash) ([]*types.Order, error)
- func (_m *OrderDao) GetByID(id bson.ObjectId) (*types.Order, error)
- func (_m *OrderDao) GetByUserAddress(addr common.Address) ([]*types.Order, error)
- func (_m *OrderDao) GetCurrentByUserAddress(addr common.Address) ([]*types.Order, error)
- func (_m *OrderDao) GetHistoryByUserAddress(addr common.Address) ([]*types.Order, error)
- func (_m *OrderDao) GetUserLockedBalance(account common.Address, token common.Address) (*big.Int, error)
- func (_m *OrderDao) Update(id bson.ObjectId, o *types.Order) error
- func (_m *OrderDao) UpdateAllByHash(hash common.Hash, o *types.Order) error
- func (_m *OrderDao) UpdateByHash(hash common.Hash, o *types.Order) error
- func (_m *OrderDao) UpdateOrderFilledAmount(hash common.Hash, value *big.Int) error
- func (_m *OrderDao) UpdateOrderStatus(hash common.Hash, status string) error
- type OrderService
- func (_m *OrderService) CancelOrder(oc *types.OrderCancel) error
- func (_m *OrderService) CancelTrades(trades []*types.Trade) error
- func (_m *OrderService) GetByHash(hash common.Hash) (*types.Order, error)
- func (_m *OrderService) GetByID(id bson.ObjectId) (*types.Order, error)
- func (_m *OrderService) GetByUserAddress(addr common.Address) ([]*types.Order, error)
- func (_m *OrderService) GetCurrentByUserAddress(addr common.Address) ([]*types.Order, error)
- func (_m *OrderService) GetHistoryByUserAddress(addr common.Address) ([]*types.Order, error)
- func (_m *OrderService) HandleEngineResponse(res *types.EngineResponse) error
- func (_m *OrderService) NewOrder(o *types.Order) error
- func (_m *OrderService) RelayOrderUpdate(res *types.EngineResponse)
- func (_m *OrderService) RelayTradeUpdate(res *types.EngineResponse)
- func (_m *OrderService) RelayUpdateOverSocket(res *types.EngineResponse)
- func (_m *OrderService) Rollback(res *types.EngineResponse) *types.EngineResponse
- func (_m *OrderService) RollbackOrder(o *types.Order) error
- func (_m *OrderService) RollbackTrade(o *types.Order, t *types.Trade) error
- type PairDao
- func (_m *PairDao) Create(o *types.Pair) error
- func (_m *PairDao) GetActivePairs() ([]*types.Pair, error)
- func (_m *PairDao) GetAll() ([]types.Pair, error)
- func (_m *PairDao) GetByID(id bson.ObjectId) (*types.Pair, error)
- func (_m *PairDao) GetByName(name string) (*types.Pair, error)
- func (_m *PairDao) GetByTokenAddress(baseToken common.Address, quoteToken common.Address) (*types.Pair, error)
- func (_m *PairDao) GetByTokenSymbols(baseTokenSymbol string, quoteTokenSymbol string) (*types.Pair, error)
- type PairService
- func (_m *PairService) Create(pair *types.Pair) error
- func (_m *PairService) GetAll() ([]*types.Pair, error)
- func (_m *PairService) GetAllTokenPairData() ([]*types.Tick, error)
- func (_m *PairService) GetByID(id bson.ObjectId) (*types.Pair, error)
- func (_m *PairService) GetByTokenAddress(bt common.Address, qt common.Address) (*types.Pair, error)
- func (_m *PairService) GetTokenPairData(bt, qt common.Address) ([]*types.Tick, error)
- type TokenDao
- func (_m *TokenDao) Create(token *types.Token) error
- func (_m *TokenDao) Drop() error
- func (_m *TokenDao) GetAll() ([]types.Token, error)
- func (_m *TokenDao) GetBaseTokens() ([]types.Token, error)
- func (_m *TokenDao) GetByAddress(owner common.Address) (*types.Token, error)
- func (_m *TokenDao) GetByID(id bson.ObjectId) (*types.Token, error)
- func (_m *TokenDao) GetQuoteTokens() ([]types.Token, error)
- type TokenService
- func (_m *TokenService) Create(token *types.Token) error
- func (_m *TokenService) GetAll() ([]types.Token, error)
- func (_m *TokenService) GetBaseTokens() ([]types.Token, error)
- func (_m *TokenService) GetByAddress(addr common.Address) (*types.Token, error)
- func (_m *TokenService) GetByID(id bson.ObjectId) (*types.Token, error)
- func (_m *TokenService) GetQuoteTokens() ([]types.Token, error)
- type TradeDao
- func (_m *TradeDao) Aggregate(q []bson.M) ([]*types.Tick, error)
- func (_m *TradeDao) Create(o ...*types.Trade) error
- func (_m *TradeDao) Drop()
- func (_m *TradeDao) GetAll() ([]types.Trade, error)
- func (_m *TradeDao) GetAllTradesByPairAddress(bt common.Address, qt common.Address) ([]*types.Trade, error)
- func (_m *TradeDao) GetByHash(h common.Hash) (*types.Trade, error)
- func (_m *TradeDao) GetByMakerOrderHash(h common.Hash) ([]*types.Trade, error)
- func (_m *TradeDao) GetByOrderHashes(hashes []common.Hash) ([]*types.Trade, error)
- func (_m *TradeDao) GetByPairName(name string) ([]*types.Trade, error)
- func (_m *TradeDao) GetByTakerOrderHash(h common.Hash) ([]*types.Trade, error)
- func (_m *TradeDao) GetByUserAddress(a common.Address) ([]*types.Trade, error)
- func (_m *TradeDao) GetNTradesByPairAddress(bt common.Address, qt common.Address, n int) ([]*types.Trade, error)
- func (_m *TradeDao) GetSortedTrades(bt common.Address, qt common.Address, n int) ([]*types.Trade, error)
- func (_m *TradeDao) GetTradesByPairAddress(bt common.Address, qt common.Address, n int) ([]*types.Trade, error)
- func (_m *TradeDao) Update(t *types.Trade) error
- func (_m *TradeDao) UpdateByHash(h common.Hash, t *types.Trade) error
- func (_m *TradeDao) UpdateTradeStatus(h common.Hash, status string) error
- func (_m *TradeDao) UpdateTradeStatuses(status string, hashes ...common.Hash) ([]*types.Trade, error)
- func (_m *TradeDao) UpdateTradeStatusesByOrderHashes(status string, hashes ...common.Hash) ([]*types.Trade, error)
- type TradeService
- func (_m *TradeService) GetAllTradesByPairAddress(bt, qt common.Address) ([]*types.Trade, error)
- func (_m *TradeService) GetByHash(hash common.Hash) (*types.Trade, error)
- func (_m *TradeService) GetByMakerOrderHash(h common.Hash) ([]*types.Trade, error)
- func (_m *TradeService) GetByOrderHash(hash common.Hash) ([]*types.Trade, error)
- func (_m *TradeService) GetByOrderHashes(h []common.Hash) ([]*types.Trade, error)
- func (_m *TradeService) GetByPairAddress(bt common.Address, qt common.Address) ([]*types.Trade, error)
- func (_m *TradeService) GetByPairName(p string) ([]*types.Trade, error)
- func (_m *TradeService) GetByTakerOrderHash(h common.Hash) ([]*types.Trade, error)
- func (_m *TradeService) GetByUserAddress(addr common.Address) ([]*types.Trade, error)
- func (_m *TradeService) GetSortedTrades(bt, qt common.Address, n int) ([]*types.Trade, error)
- func (_m *TradeService) GetSortedTradesByUserAddress(a common.Address, limit ...int) ([]*types.Trade, error)
- func (_m *TradeService) Unsubscribe(c *ws.Client)
- func (_m *TradeService) UnsubscribeChannel(c *ws.Client, bt, qt common.Address)
- func (_m *TradeService) UpdateTradeTxHash(tr *types.Trade, txHash common.Hash) error
- type TxService
- func (_m *TxService) GetCustomTxSendOptions(w *types.Wallet) *bind.TransactOpts
- func (_m *TxService) GetTxCallOptions() *bind.CallOpts
- func (_m *TxService) GetTxDefaultSendOptions() (*bind.TransactOpts, error)
- func (_m *TxService) GetTxSendOptions() (*bind.TransactOpts, error)
- func (_m *TxService) SetTxSender(w *types.Wallet)
- type WalletDao
- func (_m *WalletDao) Create(wallet *types.Wallet) error
- func (_m *WalletDao) GetAll() ([]types.Wallet, error)
- func (_m *WalletDao) GetByAddress(addr common.Address) (*types.Wallet, error)
- func (_m *WalletDao) GetByID(id bson.ObjectId) (*types.Wallet, error)
- func (_m *WalletDao) GetDefaultAdminWallet() (*types.Wallet, error)
- func (_m *WalletDao) GetOperatorWallets() ([]*types.Wallet, error)
- type WalletService
- func (_m *WalletService) CreateAdminWallet(a common.Address) (*types.Wallet, error)
- func (_m *WalletService) GetAll() ([]types.Wallet, error)
- func (_m *WalletService) GetByAddress(a common.Address) (*types.Wallet, error)
- func (_m *WalletService) GetDefaultAdminWallet() (*types.Wallet, error)
- func (_m *WalletService) GetOperatorWallets() ([]*types.Wallet, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountDao ¶
AccountDao is an autogenerated mock type for the AccountDao type
func (*AccountDao) Create ¶
func (_m *AccountDao) Create(account *types.Account) error
Create provides a mock function with given fields: account
func (*AccountDao) Drop ¶
func (_m *AccountDao) Drop()
Drop provides a mock function with given fields:
func (*AccountDao) GetAll ¶
func (_m *AccountDao) GetAll() ([]types.Account, error)
GetAll provides a mock function with given fields:
func (*AccountDao) GetByAddress ¶
GetByAddress provides a mock function with given fields: owner
func (*AccountDao) GetTokenBalance ¶
func (_m *AccountDao) GetTokenBalance(owner common.Address, token common.Address) (*types.TokenBalance, error)
GetTokenBalance provides a mock function with given fields: owner, token
func (*AccountDao) GetTokenBalances ¶
func (_m *AccountDao) GetTokenBalances(owner common.Address) (map[common.Address]*types.TokenBalance, error)
GetTokenBalances provides a mock function with given fields: owner
func (*AccountDao) UpdateBalance ¶
func (_m *AccountDao) UpdateBalance(owner common.Address, token common.Address, balance *big.Int) error
UpdateBalance provides a mock function with given fields: owner, token, balance
func (*AccountDao) UpdateTokenBalance ¶
func (_m *AccountDao) UpdateTokenBalance(owner common.Address, token common.Address, tokenBalance *types.TokenBalance) error
UpdateTokenBalance provides a mock function with given fields: owner, token, tokenBalance
type AccountService ¶
AccountService is an autogenerated mock type for the AccountService type
func (*AccountService) Create ¶
func (_m *AccountService) Create(account *types.Account) error
Create provides a mock function with given fields: account
func (*AccountService) GetAll ¶
func (_m *AccountService) GetAll() ([]types.Account, error)
GetAll provides a mock function with given fields:
func (*AccountService) GetByAddress ¶
GetByAddress provides a mock function with given fields: a
func (*AccountService) GetTokenBalance ¶
func (_m *AccountService) GetTokenBalance(owner common.Address, token common.Address) (*types.TokenBalance, error)
GetTokenBalance provides a mock function with given fields: owner, token
func (*AccountService) GetTokenBalances ¶
func (_m *AccountService) GetTokenBalances(owner common.Address) (map[common.Address]*types.TokenBalance, error)
GetTokenBalances provides a mock function with given fields: owner
type Ethereum ¶
Ethereum is an autogenerated mock type for the Ethereum type
func (*Ethereum) Allowance ¶
func (_m *Ethereum) Allowance(owner common.Address, spender common.Address, token common.Address) (*big.Int, error)
Allowance provides a mock function with given fields: owner, spender, token
func (*Ethereum) ExchangeAllowance ¶
ExchangeAllowance provides a mock function with given fields: owner, token
func (*Ethereum) GetBalanceAt ¶
GetBalanceAt provides a mock function with given fields: a
func (*Ethereum) GetPendingNonceAt ¶
GetPendingNonceAt provides a mock function with given fields: a
type EthereumClient ¶
EthereumClient is an autogenerated mock type for the EthereumClient type
func (*EthereumClient) BalanceAt ¶
func (_m *EthereumClient) BalanceAt(ctx context.Context, contract common.Address, blockNumber *big.Int) (*big.Int, error)
BalanceAt provides a mock function with given fields: ctx, contract, blockNumber
func (*EthereumClient) CallContract ¶
func (_m *EthereumClient) CallContract(ctx context.Context, call ethereum.CallMsg, blockNumber *big.Int) ([]byte, error)
CallContract provides a mock function with given fields: ctx, call, blockNumber
func (*EthereumClient) CodeAt ¶
func (_m *EthereumClient) CodeAt(ctx context.Context, contract common.Address, blockNumber *big.Int) ([]byte, error)
CodeAt provides a mock function with given fields: ctx, contract, blockNumber
func (*EthereumClient) EstimateGas ¶
EstimateGas provides a mock function with given fields: ctx, call
func (*EthereumClient) FilterLogs ¶
func (_m *EthereumClient) FilterLogs(ctx context.Context, query ethereum.FilterQuery) ([]types.Log, error)
FilterLogs provides a mock function with given fields: ctx, query
func (*EthereumClient) PendingCodeAt ¶
func (_m *EthereumClient) PendingCodeAt(ctx context.Context, account common.Address) ([]byte, error)
PendingCodeAt provides a mock function with given fields: ctx, account
func (*EthereumClient) PendingNonceAt ¶
func (_m *EthereumClient) PendingNonceAt(ctx context.Context, account common.Address) (uint64, error)
PendingNonceAt provides a mock function with given fields: ctx, account
func (*EthereumClient) SendTransaction ¶
func (_m *EthereumClient) SendTransaction(ctx context.Context, tx *types.Transaction) error
SendTransaction provides a mock function with given fields: ctx, tx
func (*EthereumClient) SubscribeFilterLogs ¶
func (_m *EthereumClient) SubscribeFilterLogs(ctx context.Context, query ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error)
SubscribeFilterLogs provides a mock function with given fields: ctx, query, ch
func (*EthereumClient) SuggestGasPrice ¶
SuggestGasPrice provides a mock function with given fields: ctx
func (*EthereumClient) TransactionReceipt ¶
func (_m *EthereumClient) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error)
TransactionReceipt provides a mock function with given fields: ctx, txHash
type EthereumProvider ¶
EthereumProvider is an autogenerated mock type for the EthereumProvider type
func (*EthereumProvider) Allowance ¶
func (_m *EthereumProvider) Allowance(owner common.Address, spender common.Address, token common.Address) (*big.Int, error)
Allowance provides a mock function with given fields: owner, spender, token
func (*EthereumProvider) BalanceOf ¶
BalanceOf provides a mock function with given fields: owner, token
func (*EthereumProvider) ExchangeAllowance ¶
func (_m *EthereumProvider) ExchangeAllowance(owner common.Address, token common.Address) (*big.Int, error)
ExchangeAllowance provides a mock function with given fields: owner, token
func (*EthereumProvider) GetBalanceAt ¶
GetBalanceAt provides a mock function with given fields: a
func (*EthereumProvider) GetPendingNonceAt ¶
func (_m *EthereumProvider) GetPendingNonceAt(a common.Address) (uint64, error)
GetPendingNonceAt provides a mock function with given fields: a
type EthereumService ¶
EthereumService is an autogenerated mock type for the EthereumService type
func (*EthereumService) GetBalanceAt ¶
GetBalanceAt provides a mock function with given fields: a
func (*EthereumService) GetPendingNonceAt ¶
func (_m *EthereumService) GetPendingNonceAt(a common.Address) (uint64, error)
GetPendingNonceAt provides a mock function with given fields: a
func (*EthereumService) WaitMined ¶
func (_m *EthereumService) WaitMined(tx *types.Transaction) (*types.Receipt, error)
WaitMined provides a mock function with given fields: tx
type Exchange ¶
Exchange is an autogenerated mock type for the Exchange type
func (*Exchange) CallTrade ¶
func (_m *Exchange) CallTrade(o *types.Order, t *types.Trade, call *ethereum.CallMsg) (uint64, error)
CallTrade provides a mock function with given fields: o, t, call
func (*Exchange) FeeAccount ¶
FeeAccount provides a mock function with given fields:
func (*Exchange) GetAddress ¶
GetAddress provides a mock function with given fields:
func (*Exchange) GetErrorEvents ¶
func (_m *Exchange) GetErrorEvents(logs chan *contractsinterfaces.ExchangeLogError) error
GetErrorEvents provides a mock function with given fields: logs
func (*Exchange) GetTrades ¶
func (_m *Exchange) GetTrades(logs chan *contractsinterfaces.ExchangeLogTrade) error
GetTrades provides a mock function with given fields: logs
func (*Exchange) GetTxCallOptions ¶
GetTxCallOptions provides a mock function with given fields:
func (*Exchange) ListenToErrors ¶
func (_m *Exchange) ListenToErrors() (chan *contractsinterfaces.ExchangeLogError, error)
ListenToErrors provides a mock function with given fields:
func (*Exchange) ListenToTrades ¶
func (_m *Exchange) ListenToTrades() (chan *contractsinterfaces.ExchangeLogTrade, error)
ListenToTrades provides a mock function with given fields:
func (*Exchange) PrintErrors ¶
PrintErrors provides a mock function with given fields:
func (*Exchange) PrintTrades ¶
PrintTrades provides a mock function with given fields:
func (*Exchange) SetFeeAccount ¶
func (_m *Exchange) SetFeeAccount(a common.Address, txOpts *bind.TransactOpts) (*coretypes.Transaction, error)
SetFeeAccount provides a mock function with given fields: a, txOpts
func (*Exchange) SetOperator ¶
func (_m *Exchange) SetOperator(a common.Address, isOperator bool, txOpts *bind.TransactOpts) (*coretypes.Transaction, error)
SetOperator provides a mock function with given fields: a, isOperator, txOpts
type OHLCVService ¶
OHLCVService is an autogenerated mock type for the OHLCVService type
func (*OHLCVService) GetOHLCV ¶
func (_m *OHLCVService) GetOHLCV(p []types.PairAddresses, duration int64, unit string, timeInterval ...int64) ([]*types.Tick, error)
GetOHLCV provides a mock function with given fields: p, duration, unit, timeInterval
type OrderBookService ¶
OrderBookService is an autogenerated mock type for the OrderBookService type
func (*OrderBookService) GetOrderBook ¶
func (_m *OrderBookService) GetOrderBook(bt common.Address, qt common.Address) (map[string]interface{}, error)
GetOrderBook provides a mock function with given fields: bt, qt
func (*OrderBookService) Subscribe ¶
Subscribe provides a mock function with given fields: conn, bt, qt
func (*OrderBookService) Unsubscribe ¶
Unsubscribe provides a mock function with given fields: conn, bt, qt
type OrderDao ¶
OrderDao is an autogenerated mock type for the OrderDao type
func (*OrderDao) GetByHashes ¶
GetByHashes provides a mock function with given fields: hashes
func (*OrderDao) GetByUserAddress ¶
GetByUserAddress provides a mock function with given fields: addr
func (*OrderDao) GetCurrentByUserAddress ¶
GetCurrentByUserAddress provides a mock function with given fields: addr
func (*OrderDao) GetHistoryByUserAddress ¶
GetHistoryByUserAddress provides a mock function with given fields: addr
func (*OrderDao) GetUserLockedBalance ¶
func (_m *OrderDao) GetUserLockedBalance(account common.Address, token common.Address) (*big.Int, error)
GetUserLockedBalance provides a mock function with given fields: account, token
func (*OrderDao) UpdateAllByHash ¶
UpdateAllByHash provides a mock function with given fields: hash, o
func (*OrderDao) UpdateByHash ¶
UpdateByHash provides a mock function with given fields: hash, o
func (*OrderDao) UpdateOrderFilledAmount ¶
UpdateOrderFilledAmount provides a mock function with given fields: hash, value
type OrderService ¶
OrderService is an autogenerated mock type for the OrderService type
func (*OrderService) CancelOrder ¶
func (_m *OrderService) CancelOrder(oc *types.OrderCancel) error
CancelOrder provides a mock function with given fields: oc
func (*OrderService) CancelTrades ¶
func (_m *OrderService) CancelTrades(trades []*types.Trade) error
CancelTrades provides a mock function with given fields: trades
func (*OrderService) GetByUserAddress ¶
GetByUserAddress provides a mock function with given fields: addr
func (*OrderService) GetCurrentByUserAddress ¶
GetCurrentByUserAddress provides a mock function with given fields: addr
func (*OrderService) GetHistoryByUserAddress ¶
GetHistoryByUserAddress provides a mock function with given fields: addr
func (*OrderService) HandleEngineResponse ¶
func (_m *OrderService) HandleEngineResponse(res *types.EngineResponse) error
HandleEngineResponse provides a mock function with given fields: res
func (*OrderService) NewOrder ¶
func (_m *OrderService) NewOrder(o *types.Order) error
NewOrder provides a mock function with given fields: o
func (*OrderService) RelayOrderUpdate ¶
func (_m *OrderService) RelayOrderUpdate(res *types.EngineResponse)
RelayOrderUpdate provides a mock function with given fields: res
func (*OrderService) RelayTradeUpdate ¶
func (_m *OrderService) RelayTradeUpdate(res *types.EngineResponse)
RelayTradeUpdate provides a mock function with given fields: res
func (*OrderService) RelayUpdateOverSocket ¶
func (_m *OrderService) RelayUpdateOverSocket(res *types.EngineResponse)
RelayUpdateOverSocket provides a mock function with given fields: res
func (*OrderService) Rollback ¶
func (_m *OrderService) Rollback(res *types.EngineResponse) *types.EngineResponse
Rollback provides a mock function with given fields: res
func (*OrderService) RollbackOrder ¶
func (_m *OrderService) RollbackOrder(o *types.Order) error
RollbackOrder provides a mock function with given fields: o
func (*OrderService) RollbackTrade ¶
RollbackTrade provides a mock function with given fields: o, t
type PairDao ¶
PairDao is an autogenerated mock type for the PairDao type
func (*PairDao) GetActivePairs ¶
GetActivePairs provides a mock function with given fields:
type PairService ¶
PairService is an autogenerated mock type for the PairService type
func (*PairService) Create ¶
func (_m *PairService) Create(pair *types.Pair) error
Create provides a mock function with given fields: pair
func (*PairService) GetAll ¶
func (_m *PairService) GetAll() ([]*types.Pair, error)
GetAll provides a mock function with given fields:
func (*PairService) GetAllTokenPairData ¶
func (_m *PairService) GetAllTokenPairData() ([]*types.Tick, error)
func (*PairService) GetByTokenAddress ¶
GetByTokenAddress provides a mock function with given fields: bt, qt
func (*PairService) GetTokenPairData ¶
type TokenDao ¶
TokenDao is an autogenerated mock type for the TokenDao type
func (*TokenDao) GetBaseTokens ¶
GetBaseTokens provides a mock function with given fields:
func (*TokenDao) GetByAddress ¶
GetByAddress provides a mock function with given fields: owner
type TokenService ¶
TokenService is an autogenerated mock type for the TokenService type
func (*TokenService) Create ¶
func (_m *TokenService) Create(token *types.Token) error
Create provides a mock function with given fields: token
func (*TokenService) GetAll ¶
func (_m *TokenService) GetAll() ([]types.Token, error)
GetAll provides a mock function with given fields:
func (*TokenService) GetBaseTokens ¶
func (_m *TokenService) GetBaseTokens() ([]types.Token, error)
GetBaseTokens provides a mock function with given fields:
func (*TokenService) GetByAddress ¶
GetByAddress provides a mock function with given fields: addr
func (*TokenService) GetQuoteTokens ¶
func (_m *TokenService) GetQuoteTokens() ([]types.Token, error)
GetQuoteTokens provides a mock function with given fields:
type TradeDao ¶
TradeDao is an autogenerated mock type for the TradeDao type
func (*TradeDao) GetAllTradesByPairAddress ¶
func (_m *TradeDao) GetAllTradesByPairAddress(bt common.Address, qt common.Address) ([]*types.Trade, error)
GetAllTradesByPairAddress provides a mock function with given fields: bt, qt
func (*TradeDao) GetByMakerOrderHash ¶
GetByMakerOrderHash provides a mock function with given fields: h
func (*TradeDao) GetByOrderHashes ¶
GetByOrderHashes provides a mock function with given fields: hashes
func (*TradeDao) GetByPairName ¶
GetByPairName provides a mock function with given fields: name
func (*TradeDao) GetByTakerOrderHash ¶
GetByTakerOrderHash provides a mock function with given fields: h
func (*TradeDao) GetByUserAddress ¶
GetByUserAddress provides a mock function with given fields: a
func (*TradeDao) GetNTradesByPairAddress ¶
func (_m *TradeDao) GetNTradesByPairAddress(bt common.Address, qt common.Address, n int) ([]*types.Trade, error)
GetNTradesByPairAddress provides a mock function with given fields: bt, qt, n
func (*TradeDao) GetSortedTrades ¶
func (_m *TradeDao) GetSortedTrades(bt common.Address, qt common.Address, n int) ([]*types.Trade, error)
GetSortedTrades provides a mock function with given fields: bt, qt, n
func (*TradeDao) GetTradesByPairAddress ¶
func (_m *TradeDao) GetTradesByPairAddress(bt common.Address, qt common.Address, n int) ([]*types.Trade, error)
GetTradesByPairAddress provides a mock function with given fields: bt, qt, n
func (*TradeDao) UpdateByHash ¶
UpdateByHash provides a mock function with given fields: h, t
func (*TradeDao) UpdateTradeStatus ¶
UpdateTradeStatus provides a mock function with given fields: h, status
type TradeService ¶
TradeService is an autogenerated mock type for the TradeService type
func (*TradeService) GetAllTradesByPairAddress ¶
func (*TradeService) GetByMakerOrderHash ¶
GetTrades provides a mock function with given fields: bt, qt
func (*TradeService) GetByOrderHash ¶
GetByOrderHash provides a mock function with given fields: hash
func (*TradeService) GetByOrderHashes ¶
func (*TradeService) GetByPairAddress ¶
func (_m *TradeService) GetByPairAddress(bt common.Address, qt common.Address) ([]*types.Trade, error)
GetByPairAddress provides a mock function with given fields: bt, qt
func (*TradeService) GetByPairName ¶
func (_m *TradeService) GetByPairName(p string) ([]*types.Trade, error)
GetByPairName provides a mock function with given fields: p
func (*TradeService) GetByTakerOrderHash ¶
func (*TradeService) GetByUserAddress ¶
GetByUserAddress provides a mock function with given fields: addr
func (*TradeService) GetSortedTrades ¶
func (*TradeService) GetSortedTradesByUserAddress ¶
func (*TradeService) Unsubscribe ¶
func (_m *TradeService) Unsubscribe(c *ws.Client)
Subscribe provides a mock function with given fields: conn, bt, qt
func (*TradeService) UnsubscribeChannel ¶
func (_m *TradeService) UnsubscribeChannel(c *ws.Client, bt, qt common.Address)
Unsubscribe provides a mock function with given fields: conn, bt, qt
func (*TradeService) UpdateTradeTxHash ¶
UpdateTradeTxHash provides a mock function with given fields: tr, txHash
type TxService ¶
TxService is an autogenerated mock type for the TxService type
func (*TxService) GetCustomTxSendOptions ¶
func (_m *TxService) GetCustomTxSendOptions(w *types.Wallet) *bind.TransactOpts
GetCustomTxSendOptions provides a mock function with given fields: w
func (*TxService) GetTxCallOptions ¶
GetTxCallOptions provides a mock function with given fields:
func (*TxService) GetTxDefaultSendOptions ¶
func (_m *TxService) GetTxDefaultSendOptions() (*bind.TransactOpts, error)
GetTxDefaultSendOptions provides a mock function with given fields:
func (*TxService) GetTxSendOptions ¶
func (_m *TxService) GetTxSendOptions() (*bind.TransactOpts, error)
GetTxSendOptions provides a mock function with given fields:
func (*TxService) SetTxSender ¶
SetTxSender provides a mock function with given fields: w
type WalletDao ¶
WalletDao is an autogenerated mock type for the WalletDao type
func (*WalletDao) GetByAddress ¶
GetByAddress provides a mock function with given fields: addr
func (*WalletDao) GetDefaultAdminWallet ¶
GetDefaultAdminWallet provides a mock function with given fields:
type WalletService ¶
WalletService is an autogenerated mock type for the WalletService type
func (*WalletService) CreateAdminWallet ¶
CreateAdminWallet provides a mock function with given fields: a
func (*WalletService) GetAll ¶
func (_m *WalletService) GetAll() ([]types.Wallet, error)
GetAll provides a mock function with given fields:
func (*WalletService) GetByAddress ¶
GetByAddress provides a mock function with given fields: a
func (*WalletService) GetDefaultAdminWallet ¶
func (_m *WalletService) GetDefaultAdminWallet() (*types.Wallet, error)
GetDefaultAdminWallet provides a mock function with given fields:
func (*WalletService) GetOperatorWallets ¶
func (_m *WalletService) GetOperatorWallets() ([]*types.Wallet, error)
GetOperatorWallets provides a mock function with given fields:
Source Files ¶
- account_dao.go
- account_service.go
- engine.go
- ethereum.go
- ethereum_client.go
- ethereum_service.go
- exchange.go
- ohlcv_service.go
- order_dao.go
- order_service.go
- orderbook_service.go
- pair_dao.go
- pair_service.go
- provider.go
- token_dao.go
- token_service.go
- trade_dao.go
- trade_service.go
- tx_service.go
- wallet_dao.go
- wallet_service.go