mocks

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountDao

type AccountDao struct {
	mock.Mock
}

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

func (_m *AccountDao) GetByAddress(owner common.Address) (*types.Account, error)

GetByAddress provides a mock function with given fields: owner

func (*AccountDao) GetByID

func (_m *AccountDao) GetByID(id bson.ObjectId) (*types.Account, error)

GetByID provides a mock function with given fields: id

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

type AccountService struct {
	mock.Mock
}

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

func (_m *AccountService) GetByAddress(a common.Address) (*types.Account, error)

GetByAddress provides a mock function with given fields: a

func (*AccountService) GetByID

func (_m *AccountService) GetByID(id bson.ObjectId) (*types.Account, error)

GetByID provides a mock function with given fields: id

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 Engine

type Engine struct {
	mock.Mock
}

Engine is an autogenerated mock type for the Engine type

func (*Engine) HandleOrders

func (_m *Engine) HandleOrders(msg *rabbitmq.Message) error

HandleOrders provides a mock function with given fields: msg

type Ethereum

type Ethereum struct {
	mock.Mock
}

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) BalanceOf

func (_m *Ethereum) BalanceOf(owner common.Address, token common.Address) (*big.Int, error)

BalanceOf provides a mock function with given fields: owner, token

func (*Ethereum) ExchangeAllowance

func (_m *Ethereum) ExchangeAllowance(owner common.Address, token common.Address) (*big.Int, error)

ExchangeAllowance provides a mock function with given fields: owner, token

func (*Ethereum) GetBalanceAt

func (_m *Ethereum) GetBalanceAt(a common.Address) (*big.Int, error)

GetBalanceAt provides a mock function with given fields: a

func (*Ethereum) GetPendingNonceAt

func (_m *Ethereum) GetPendingNonceAt(a common.Address) (uint64, error)

GetPendingNonceAt provides a mock function with given fields: a

func (*Ethereum) WaitMined

func (_m *Ethereum) WaitMined(tx *types.Transaction) (*types.Receipt, error)

WaitMined provides a mock function with given fields: tx

type EthereumClient

type EthereumClient struct {
	mock.Mock
}

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

func (_m *EthereumClient) EstimateGas(ctx context.Context, call ethereum.CallMsg) (uint64, error)

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

func (_m *EthereumClient) SuggestGasPrice(ctx context.Context) (*big.Int, error)

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

type EthereumProvider struct {
	mock.Mock
}

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

func (_m *EthereumProvider) BalanceOf(owner common.Address, token common.Address) (*big.Int, error)

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

func (_m *EthereumProvider) GetBalanceAt(a common.Address) (*big.Int, error)

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

func (*EthereumProvider) WaitMined

func (_m *EthereumProvider) WaitMined(hash common.Hash) (*types.Receipt, error)

WaitMined provides a mock function with given fields: hash

type EthereumService

type EthereumService struct {
	mock.Mock
}

EthereumService is an autogenerated mock type for the EthereumService type

func (*EthereumService) GetBalanceAt

func (_m *EthereumService) GetBalanceAt(a common.Address) (*big.Int, error)

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

type Exchange struct {
	mock.Mock
}

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

func (_m *Exchange) FeeAccount() (common.Address, error)

FeeAccount provides a mock function with given fields:

func (*Exchange) GetAddress

func (_m *Exchange) GetAddress() common.Address

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

func (_m *Exchange) GetTxCallOptions() *bind.CallOpts

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) Operator

func (_m *Exchange) Operator(a common.Address) (bool, error)

Operator provides a mock function with given fields: a

func (*Exchange) PrintErrors

func (_m *Exchange) PrintErrors() error

PrintErrors provides a mock function with given fields:

func (*Exchange) PrintTrades

func (_m *Exchange) PrintTrades() error

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

func (*Exchange) Trade

func (_m *Exchange) Trade(o *types.Order, t *types.Trade, txOpts *bind.TransactOpts) (*coretypes.Transaction, error)

Trade provides a mock function with given fields: o, t, txOpts

type OHLCVService

type OHLCVService struct {
	mock.Mock
}

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

func (*OHLCVService) Subscribe

func (_m *OHLCVService) Subscribe(conn *ws.Client, bt common.Address, qt common.Address, p *types.Params)

Subscribe provides a mock function with given fields: conn, bt, qt, p

func (*OHLCVService) Unsubscribe

func (_m *OHLCVService) Unsubscribe(conn *ws.Client, bt common.Address, qt common.Address, p *types.Params)

Unsubscribe provides a mock function with given fields: conn, bt, qt, p

type OrderBookService

type OrderBookService struct {
	mock.Mock
}

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

func (_m *OrderBookService) Subscribe(conn *ws.Client, bt common.Address, qt common.Address)

Subscribe provides a mock function with given fields: conn, bt, qt

func (*OrderBookService) Unsubscribe

func (_m *OrderBookService) Unsubscribe(conn *ws.Client, bt common.Address, qt common.Address)

Unsubscribe provides a mock function with given fields: conn, bt, qt

type OrderDao

type OrderDao struct {
	mock.Mock
}

OrderDao is an autogenerated mock type for the OrderDao type

func (*OrderDao) Create

func (_m *OrderDao) Create(o *types.Order) error

Create provides a mock function with given fields: o

func (*OrderDao) Drop

func (_m *OrderDao) Drop() error

Drop provides a mock function with given fields:

func (*OrderDao) GetByHash

func (_m *OrderDao) GetByHash(hash common.Hash) (*types.Order, error)

GetByHash provides a mock function with given fields: hash

func (*OrderDao) GetByHashes

func (_m *OrderDao) GetByHashes(hashes []common.Hash) ([]*types.Order, error)

GetByHashes provides a mock function with given fields: hashes

func (*OrderDao) GetByID

func (_m *OrderDao) GetByID(id bson.ObjectId) (*types.Order, error)

GetByID provides a mock function with given fields: id

func (*OrderDao) GetByUserAddress

func (_m *OrderDao) GetByUserAddress(addr common.Address) ([]*types.Order, error)

GetByUserAddress provides a mock function with given fields: addr

func (*OrderDao) GetCurrentByUserAddress

func (_m *OrderDao) GetCurrentByUserAddress(addr common.Address) ([]*types.Order, error)

GetCurrentByUserAddress provides a mock function with given fields: addr

func (*OrderDao) GetHistoryByUserAddress

func (_m *OrderDao) GetHistoryByUserAddress(addr common.Address) ([]*types.Order, error)

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) Update

func (_m *OrderDao) Update(id bson.ObjectId, o *types.Order) error

Update provides a mock function with given fields: id, o

func (*OrderDao) UpdateAllByHash

func (_m *OrderDao) UpdateAllByHash(hash common.Hash, o *types.Order) error

UpdateAllByHash provides a mock function with given fields: hash, o

func (*OrderDao) UpdateByHash

func (_m *OrderDao) UpdateByHash(hash common.Hash, o *types.Order) error

UpdateByHash provides a mock function with given fields: hash, o

func (*OrderDao) UpdateOrderFilledAmount

func (_m *OrderDao) UpdateOrderFilledAmount(hash common.Hash, value *big.Int) error

UpdateOrderFilledAmount provides a mock function with given fields: hash, value

func (*OrderDao) UpdateOrderStatus

func (_m *OrderDao) UpdateOrderStatus(hash common.Hash, status string) error

UpdateOrderStatus provides a mock function with given fields: hash, status

type OrderService

type OrderService struct {
	mock.Mock
}

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) GetByHash

func (_m *OrderService) GetByHash(hash common.Hash) (*types.Order, error)

GetByHash provides a mock function with given fields: hash

func (*OrderService) GetByID

func (_m *OrderService) GetByID(id bson.ObjectId) (*types.Order, error)

GetByID provides a mock function with given fields: id

func (*OrderService) GetByUserAddress

func (_m *OrderService) GetByUserAddress(addr common.Address) ([]*types.Order, error)

GetByUserAddress provides a mock function with given fields: addr

func (*OrderService) GetCurrentByUserAddress

func (_m *OrderService) GetCurrentByUserAddress(addr common.Address) ([]*types.Order, error)

GetCurrentByUserAddress provides a mock function with given fields: addr

func (*OrderService) GetHistoryByUserAddress

func (_m *OrderService) GetHistoryByUserAddress(addr common.Address) ([]*types.Order, error)

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

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

func (_m *OrderService) RollbackTrade(o *types.Order, t *types.Trade) error

RollbackTrade provides a mock function with given fields: o, t

type PairDao

type PairDao struct {
	mock.Mock
}

PairDao is an autogenerated mock type for the PairDao type

func (*PairDao) Create

func (_m *PairDao) Create(o *types.Pair) error

Create provides a mock function with given fields: o

func (*PairDao) GetActivePairs

func (_m *PairDao) GetActivePairs() ([]*types.Pair, error)

GetActivePairs provides a mock function with given fields:

func (*PairDao) GetAll

func (_m *PairDao) GetAll() ([]types.Pair, error)

GetAll provides a mock function with given fields:

func (*PairDao) GetByID

func (_m *PairDao) GetByID(id bson.ObjectId) (*types.Pair, error)

GetByID provides a mock function with given fields: id

func (*PairDao) GetByName

func (_m *PairDao) GetByName(name string) (*types.Pair, error)

GetByName provides a mock function with given fields: name

func (*PairDao) GetByTokenAddress

func (_m *PairDao) GetByTokenAddress(baseToken common.Address, quoteToken common.Address) (*types.Pair, error)

GetByTokenAddress provides a mock function with given fields: baseToken, quoteToken

func (*PairDao) GetByTokenSymbols

func (_m *PairDao) GetByTokenSymbols(baseTokenSymbol string, quoteTokenSymbol string) (*types.Pair, error)

GetByTokenSymbols provides a mock function with given fields: baseTokenSymbol, quoteTokenSymbol

type PairService

type PairService struct {
	mock.Mock
}

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) GetByID

func (_m *PairService) GetByID(id bson.ObjectId) (*types.Pair, error)

GetByID provides a mock function with given fields: id

func (*PairService) GetByTokenAddress

func (_m *PairService) GetByTokenAddress(bt common.Address, qt common.Address) (*types.Pair, error)

GetByTokenAddress provides a mock function with given fields: bt, qt

func (*PairService) GetTokenPairData

func (_m *PairService) GetTokenPairData(bt, qt common.Address) ([]*types.Tick, error)

type TokenDao

type TokenDao struct {
	mock.Mock
}

TokenDao is an autogenerated mock type for the TokenDao type

func (*TokenDao) Create

func (_m *TokenDao) Create(token *types.Token) error

Create provides a mock function with given fields: token

func (*TokenDao) Drop

func (_m *TokenDao) Drop() error

Drop provides a mock function with given fields:

func (*TokenDao) GetAll

func (_m *TokenDao) GetAll() ([]types.Token, error)

GetAll provides a mock function with given fields:

func (*TokenDao) GetBaseTokens

func (_m *TokenDao) GetBaseTokens() ([]types.Token, error)

GetBaseTokens provides a mock function with given fields:

func (*TokenDao) GetByAddress

func (_m *TokenDao) GetByAddress(owner common.Address) (*types.Token, error)

GetByAddress provides a mock function with given fields: owner

func (*TokenDao) GetByID

func (_m *TokenDao) GetByID(id bson.ObjectId) (*types.Token, error)

GetByID provides a mock function with given fields: id

func (*TokenDao) GetQuoteTokens

func (_m *TokenDao) GetQuoteTokens() ([]types.Token, error)

GetQuoteTokens provides a mock function with given fields:

type TokenService

type TokenService struct {
	mock.Mock
}

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

func (_m *TokenService) GetByAddress(addr common.Address) (*types.Token, error)

GetByAddress provides a mock function with given fields: addr

func (*TokenService) GetByID

func (_m *TokenService) GetByID(id bson.ObjectId) (*types.Token, error)

GetByID provides a mock function with given fields: id

func (*TokenService) GetQuoteTokens

func (_m *TokenService) GetQuoteTokens() ([]types.Token, error)

GetQuoteTokens provides a mock function with given fields:

type TradeDao

type TradeDao struct {
	mock.Mock
}

TradeDao is an autogenerated mock type for the TradeDao type

func (*TradeDao) Aggregate

func (_m *TradeDao) Aggregate(q []bson.M) ([]*types.Tick, error)

Aggregate provides a mock function with given fields: q

func (*TradeDao) Create

func (_m *TradeDao) Create(o ...*types.Trade) error

Create provides a mock function with given fields: o

func (*TradeDao) Drop

func (_m *TradeDao) Drop()

Drop provides a mock function with given fields:

func (*TradeDao) GetAll

func (_m *TradeDao) GetAll() ([]types.Trade, error)

GetAll provides a mock function with given fields:

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) GetByHash

func (_m *TradeDao) GetByHash(h common.Hash) (*types.Trade, error)

GetByHash provides a mock function with given fields: h

func (*TradeDao) GetByMakerOrderHash

func (_m *TradeDao) GetByMakerOrderHash(h common.Hash) ([]*types.Trade, error)

GetByMakerOrderHash provides a mock function with given fields: h

func (*TradeDao) GetByOrderHashes

func (_m *TradeDao) GetByOrderHashes(hashes []common.Hash) ([]*types.Trade, error)

GetByOrderHashes provides a mock function with given fields: hashes

func (*TradeDao) GetByPairName

func (_m *TradeDao) GetByPairName(name string) ([]*types.Trade, error)

GetByPairName provides a mock function with given fields: name

func (*TradeDao) GetByTakerOrderHash

func (_m *TradeDao) GetByTakerOrderHash(h common.Hash) ([]*types.Trade, error)

GetByTakerOrderHash provides a mock function with given fields: h

func (*TradeDao) GetByUserAddress

func (_m *TradeDao) GetByUserAddress(a common.Address) ([]*types.Trade, error)

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) Update

func (_m *TradeDao) Update(t *types.Trade) error

Update provides a mock function with given fields: t

func (*TradeDao) UpdateByHash

func (_m *TradeDao) UpdateByHash(h common.Hash, t *types.Trade) error

UpdateByHash provides a mock function with given fields: h, t

func (*TradeDao) UpdateTradeStatus

func (_m *TradeDao) UpdateTradeStatus(h common.Hash, status string) error

UpdateTradeStatus provides a mock function with given fields: h, status

func (*TradeDao) UpdateTradeStatuses

func (_m *TradeDao) UpdateTradeStatuses(status string, hashes ...common.Hash) ([]*types.Trade, error)

UpdateTradeStatuses provides a mock function with given fields: status, hashes

func (*TradeDao) UpdateTradeStatusesByOrderHashes

func (_m *TradeDao) UpdateTradeStatusesByOrderHashes(status string, hashes ...common.Hash) ([]*types.Trade, error)

UpdateTradeStatusesByOrderHashes provides a mock function with given fields: status, hashes

type TradeService

type TradeService struct {
	mock.Mock
}

TradeService is an autogenerated mock type for the TradeService type

func (*TradeService) GetAllTradesByPairAddress

func (_m *TradeService) GetAllTradesByPairAddress(bt, qt common.Address) ([]*types.Trade, error)

func (*TradeService) GetByHash

func (_m *TradeService) GetByHash(hash common.Hash) (*types.Trade, error)

GetByHash provides a mock function with given fields: hash

func (*TradeService) GetByMakerOrderHash

func (_m *TradeService) GetByMakerOrderHash(h common.Hash) ([]*types.Trade, error)

GetTrades provides a mock function with given fields: bt, qt

func (*TradeService) GetByOrderHash

func (_m *TradeService) GetByOrderHash(hash common.Hash) ([]*types.Trade, error)

GetByOrderHash provides a mock function with given fields: hash

func (*TradeService) GetByOrderHashes

func (_m *TradeService) GetByOrderHashes(h []common.Hash) ([]*types.Trade, error)

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 (_m *TradeService) GetByTakerOrderHash(h common.Hash) ([]*types.Trade, error)

func (*TradeService) GetByUserAddress

func (_m *TradeService) GetByUserAddress(addr common.Address) ([]*types.Trade, error)

GetByUserAddress provides a mock function with given fields: addr

func (*TradeService) GetSortedTrades

func (_m *TradeService) GetSortedTrades(bt, qt common.Address, n int) ([]*types.Trade, error)

func (*TradeService) GetSortedTradesByUserAddress

func (_m *TradeService) GetSortedTradesByUserAddress(a common.Address, limit ...int) ([]*types.Trade, error)

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

func (_m *TradeService) UpdateTradeTxHash(tr *types.Trade, txHash common.Hash) error

UpdateTradeTxHash provides a mock function with given fields: tr, txHash

type TxService

type TxService struct {
	mock.Mock
}

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

func (_m *TxService) GetTxCallOptions() *bind.CallOpts

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

func (_m *TxService) SetTxSender(w *types.Wallet)

SetTxSender provides a mock function with given fields: w

type WalletDao

type WalletDao struct {
	mock.Mock
}

WalletDao is an autogenerated mock type for the WalletDao type

func (*WalletDao) Create

func (_m *WalletDao) Create(wallet *types.Wallet) error

Create provides a mock function with given fields: wallet

func (*WalletDao) GetAll

func (_m *WalletDao) GetAll() ([]types.Wallet, error)

GetAll provides a mock function with given fields:

func (*WalletDao) GetByAddress

func (_m *WalletDao) GetByAddress(addr common.Address) (*types.Wallet, error)

GetByAddress provides a mock function with given fields: addr

func (*WalletDao) GetByID

func (_m *WalletDao) GetByID(id bson.ObjectId) (*types.Wallet, error)

GetByID provides a mock function with given fields: id

func (*WalletDao) GetDefaultAdminWallet

func (_m *WalletDao) GetDefaultAdminWallet() (*types.Wallet, error)

GetDefaultAdminWallet provides a mock function with given fields:

func (*WalletDao) GetOperatorWallets

func (_m *WalletDao) GetOperatorWallets() ([]*types.Wallet, error)

GetOperatorWallets provides a mock function with given fields:

type WalletService

type WalletService struct {
	mock.Mock
}

WalletService is an autogenerated mock type for the WalletService type

func (*WalletService) CreateAdminWallet

func (_m *WalletService) CreateAdminWallet(a common.Address) (*types.Wallet, error)

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

func (_m *WalletService) GetByAddress(a common.Address) (*types.Wallet, error)

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:

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL