mocks

package
v0.0.0-...-5ae7496 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2020 License: MIT Imports: 6 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) FindOrCreate

func (_m *AccountDao) FindOrCreate(addr string) (*types.Account, error)

FindOrCreate provides a mock function with given fields: addr

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 string) (*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 string, token string) (*types.TokenBalance, error)

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

func (*AccountDao) GetTokenBalances

func (_m *AccountDao) GetTokenBalances(owner string) (map[string]*types.TokenBalance, error)

GetTokenBalances provides a mock function with given fields: owner

func (*AccountDao) UpdateBalance

func (_m *AccountDao) UpdateBalance(owner string, token string, balance int64) error

UpdateBalance provides a mock function with given fields: owner, token, balance

func (*AccountDao) UpdateTokenBalance

func (_m *AccountDao) UpdateTokenBalance(owner string, token string, 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) FindOrCreate

func (_m *AccountService) FindOrCreate(address string) (*types.Account, error)

FindOrCreate provides a mock function with given fields: address

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(address string) (*types.Account, error)

GetByAddress provides a mock function with given fields: address

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 string, token string) (*types.TokenBalance, error)

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

func (*AccountService) GetTokenBalances

func (_m *AccountService) GetTokenBalances(owner string) (map[string]*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 InfoService

type InfoService struct {
	mock.Mock
}

InfoService is an autogenerated mock type for the InfoService type

func (*InfoService) GetExchangeData

func (_m *InfoService) GetExchangeData() (*types.ExchangeData, error)

GetExchangeData provides a mock function with given fields:

func (*InfoService) GetExchangeStats

func (_m *InfoService) GetExchangeStats() (*types.ExchangeStats, error)

GetExchangeStats provides a mock function with given fields:

func (*InfoService) GetPairStats

func (_m *InfoService) GetPairStats() (*types.PairStats, error)

GetPairStats provides a mock function with given fields:

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.PairAssets, 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(c *ws.Client, p *types.SubscriptionPayload)

Subscribe provides a mock function with given fields: c, p

func (*OHLCVService) Unsubscribe

func (_m *OHLCVService) Unsubscribe(c *ws.Client)

Unsubscribe provides a mock function with given fields: c

func (*OHLCVService) UnsubscribeChannel

func (_m *OHLCVService) UnsubscribeChannel(c *ws.Client, p *types.SubscriptionPayload)

UnsubscribeChannel provides a mock function with given fields: c, p

type ObyteProvider

type ObyteProvider struct {
	mock.Mock
}

ObyteProvider is an autogenerated mock type for the ObyteProvider type

func (*ObyteProvider) AddOrder

func (_m *ObyteProvider) AddOrder(signedOrder *interface{}) (string, error)

AddOrder provides a mock function with given fields: signedOrder

func (*ObyteProvider) Asset

func (_m *ObyteProvider) Asset(symbol string) (string, error)

Asset provides a mock function with given fields: symbol

func (*ObyteProvider) BalanceOf

func (_m *ObyteProvider) BalanceOf(owner string, token string) (int64, error)

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

func (*ObyteProvider) CancelOrder

func (_m *ObyteProvider) CancelOrder(signedCancel *interface{}) error

CancelOrder provides a mock function with given fields: signedCancel

func (*ObyteProvider) Decimals

func (_m *ObyteProvider) Decimals(token string) (uint8, error)

Decimals provides a mock function with given fields: token

func (*ObyteProvider) ExecuteTrade

func (_m *ObyteProvider) ExecuteTrade(m *types.Matches) ([]string, error)

ExecuteTrade provides a mock function with given fields: m

func (*ObyteProvider) GetAuthorizedAddresses

func (_m *ObyteProvider) GetAuthorizedAddresses(address string) ([]string, error)

GetAuthorizedAddresses provides a mock function with given fields: address

func (*ObyteProvider) GetBalances

func (_m *ObyteProvider) GetBalances(owner string) map[string]int64

GetBalances provides a mock function with given fields: owner

func (*ObyteProvider) GetFees

func (_m *ObyteProvider) GetFees() (float64, float64)

GetFees provides a mock function with given fields:

func (*ObyteProvider) GetOperatorAddress

func (_m *ObyteProvider) GetOperatorAddress() string

GetOperatorAddress provides a mock function with given fields:

func (*ObyteProvider) ListenToEvents

func (_m *ObyteProvider) ListenToEvents() (chan map[string]interface{}, error)

ListenToEvents provides a mock function with given fields:

func (*ObyteProvider) Symbol

func (_m *ObyteProvider) Symbol(token string) (string, error)

Symbol provides a mock function with given fields: token

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 string, qt string) (map[string]interface{}, error)

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

func (*OrderBookService) GetRawOrderBook

func (_m *OrderBookService) GetRawOrderBook(bt string, qt string) (*types.RawOrderBook, error)

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

func (*OrderBookService) SubscribeOrderBook

func (_m *OrderBookService) SubscribeOrderBook(c *ws.Client, bt string, qt string)

SubscribeOrderBook provides a mock function with given fields: c, bt, qt

func (*OrderBookService) SubscribeRawOrderBook

func (_m *OrderBookService) SubscribeRawOrderBook(c *ws.Client, bt string, qt string)

SubscribeRawOrderBook provides a mock function with given fields: c, bt, qt

func (*OrderBookService) UnsubscribeOrderBook

func (_m *OrderBookService) UnsubscribeOrderBook(c *ws.Client)

UnsubscribeOrderBook provides a mock function with given fields: c

func (*OrderBookService) UnsubscribeOrderBookChannel

func (_m *OrderBookService) UnsubscribeOrderBookChannel(c *ws.Client, bt string, qt string)

UnsubscribeOrderBookChannel provides a mock function with given fields: c, bt, qt

func (*OrderBookService) UnsubscribeRawOrderBook

func (_m *OrderBookService) UnsubscribeRawOrderBook(c *ws.Client)

UnsubscribeRawOrderBook provides a mock function with given fields: c

func (*OrderBookService) UnsubscribeRawOrderBookChannel

func (_m *OrderBookService) UnsubscribeRawOrderBookChannel(c *ws.Client, bt string, qt string)

UnsubscribeRawOrderBookChannel provides a mock function with given fields: c, bt, qt

type OrderDao

type OrderDao struct {
	mock.Mock
}

OrderDao is an autogenerated mock type for the OrderDao type

func (*OrderDao) Aggregate

func (_m *OrderDao) Aggregate(q []bson.M) ([]*types.OrderData, error)

Aggregate provides a mock function with given fields: q

func (*OrderDao) Create

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

Create provides a mock function with given fields: o

func (*OrderDao) Delete

func (_m *OrderDao) Delete(orders ...*types.Order) error

Delete provides a mock function with given fields: orders

func (*OrderDao) DeleteByHashes

func (_m *OrderDao) DeleteByHashes(hashes ...string) error

DeleteByHashes provides a mock function with given fields: hashes

func (*OrderDao) Drop

func (_m *OrderDao) Drop() error

Drop provides a mock function with given fields:

func (*OrderDao) FindAndModify

func (_m *OrderDao) FindAndModify(h string, o *types.Order) (*types.Order, error)

FindAndModify provides a mock function with given fields: h, o

func (*OrderDao) GetByHash

func (_m *OrderDao) GetByHash(h string) (*types.Order, error)

GetByHash provides a mock function with given fields: h

func (*OrderDao) GetByHashes

func (_m *OrderDao) GetByHashes(hashes []string) ([]*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 string, limit ...int) ([]*types.Order, error)

GetByUserAddress provides a mock function with given fields: addr, limit

func (*OrderDao) GetCurrentByUserAddress

func (_m *OrderDao) GetCurrentByUserAddress(a string, limit ...int) ([]*types.Order, error)

GetCurrentByUserAddress provides a mock function with given fields: a, limit

func (*OrderDao) GetCurrentByUserAddressAndSignerAddress

func (_m *OrderDao) GetCurrentByUserAddressAndSignerAddress(address string, signer string) ([]*types.Order, error)

GetCurrentByUserAddressAndSignerAddress provides a mock function with given fields: address, signer

func (*OrderDao) GetExpiredOrders

func (_m *OrderDao) GetExpiredOrders() ([]*types.Order, error)

GetExpiredOrders provides a mock function with given fields:

func (*OrderDao) GetHistoryByUserAddress

func (_m *OrderDao) GetHistoryByUserAddress(a string, limit ...int) ([]*types.Order, error)

GetHistoryByUserAddress provides a mock function with given fields: a, limit

func (*OrderDao) GetMatchingBuyOrders

func (_m *OrderDao) GetMatchingBuyOrders(o *types.Order) ([]*types.Order, error)

GetMatchingBuyOrders provides a mock function with given fields: o

func (*OrderDao) GetMatchingSellOrders

func (_m *OrderDao) GetMatchingSellOrders(o *types.Order) ([]*types.Order, error)

GetMatchingSellOrders provides a mock function with given fields: o

func (*OrderDao) GetOrderBook

func (_m *OrderDao) GetOrderBook(_a0 *types.Pair) ([]map[string]interface{}, []map[string]interface{}, error)

GetOrderBook provides a mock function with given fields: _a0

func (*OrderDao) GetOrderBookPrice

func (_m *OrderDao) GetOrderBookPrice(p *types.Pair, pp float64, side string) (int64, string, error)

GetOrderBookPrice provides a mock function with given fields: p, pp, side

func (*OrderDao) GetRawOrderBook

func (_m *OrderDao) GetRawOrderBook(_a0 *types.Pair) ([]*types.Order, error)

GetRawOrderBook provides a mock function with given fields: _a0

func (*OrderDao) GetUserLockedBalance

func (_m *OrderDao) GetUserLockedBalance(account string, token string) (int64, []*types.Order, 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(h string, o *types.Order) error

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

func (*OrderDao) UpdateByHash

func (_m *OrderDao) UpdateByHash(h string, o *types.Order) error

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

func (*OrderDao) UpdateOrderFilledAmount

func (_m *OrderDao) UpdateOrderFilledAmount(h string, value int64) error

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

func (*OrderDao) UpdateOrderFilledAmounts

func (_m *OrderDao) UpdateOrderFilledAmounts(h []string, values []int64) ([]*types.Order, error)

UpdateOrderFilledAmounts provides a mock function with given fields: h, values

func (*OrderDao) UpdateOrderStatus

func (_m *OrderDao) UpdateOrderStatus(h string, status string) error

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

func (*OrderDao) UpdateOrderStatusesByHashes

func (_m *OrderDao) UpdateOrderStatusesByHashes(status string, hashes ...string) ([]*types.Order, error)

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

func (*OrderDao) Upsert

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

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

func (*OrderDao) UpsertByHash

func (_m *OrderDao) UpsertByHash(h string, o *types.Order) error

UpsertByHash provides a mock function with given fields: h, o

type OrderService

type OrderService struct {
	mock.Mock
}

OrderService is an autogenerated mock type for the OrderService type

func (*OrderService) AdjustBalancesForUncommittedTrades

func (_m *OrderService) AdjustBalancesForUncommittedTrades(address string, balances map[string]int64) map[string]int64

AdjustBalancesForUncommittedTrades provides a mock function with given fields: address, balances

func (*OrderService) CancelExpiredOrders

func (_m *OrderService) CancelExpiredOrders()

CancelExpiredOrders provides a mock function with given fields:

func (*OrderService) CancelOrder

func (_m *OrderService) CancelOrder(oc *types.OrderCancel) error

CancelOrder provides a mock function with given fields: oc

func (*OrderService) CancelOrdersSignedByRevokedSigner

func (_m *OrderService) CancelOrdersSignedByRevokedSigner(address string, signer string)

CancelOrdersSignedByRevokedSigner provides a mock function with given fields: address, signer

func (*OrderService) CheckIfBalancesAreSufficientAndCancel

func (_m *OrderService) CheckIfBalancesAreSufficientAndCancel(address string, balances map[string]int64)

CheckIfBalancesAreSufficientAndCancel provides a mock function with given fields: address, balances

func (*OrderService) FixOrderStatus

func (_m *OrderService) FixOrderStatus(o *types.Order)

FixOrderStatus provides a mock function with given fields: o

func (*OrderService) GetByHash

func (_m *OrderService) GetByHash(h string) (*types.Order, error)

GetByHash provides a mock function with given fields: h

func (*OrderService) GetByHashes

func (_m *OrderService) GetByHashes(hashes []string) ([]*types.Order, error)

GetByHashes provides a mock function with given fields: hashes

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(a string, limit ...int) ([]*types.Order, error)

GetByUserAddress provides a mock function with given fields: a, limit

func (*OrderService) GetCurrentByUserAddress

func (_m *OrderService) GetCurrentByUserAddress(a string, limit ...int) ([]*types.Order, error)

GetCurrentByUserAddress provides a mock function with given fields: a, limit

func (*OrderService) GetHistoryByUserAddress

func (_m *OrderService) GetHistoryByUserAddress(a string, limit ...int) ([]*types.Order, error)

GetHistoryByUserAddress provides a mock function with given fields: a, limit

func (*OrderService) GetSenderAddresses

func (_m *OrderService) GetSenderAddresses(oc *types.OrderCancel) (string, string, error)

GetSenderAddresses provides a mock function with given fields: oc

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

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

func (_m *PairDao) GetByAsset(baseToken string, quoteToken string) (*types.Pair, error)

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

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

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

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

func (*PairDao) GetDefaultPairs

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

GetDefaultPairs provides a mock function with given fields:

func (*PairDao) GetListedPairs

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

GetListedPairs provides a mock function with given fields:

func (*PairDao) GetUnlistedPairs

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

GetUnlistedPairs provides a mock function with given fields:

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

func (_m *PairService) CreatePairs(token string) ([]*types.Pair, error)

CreatePairs provides a mock function with given fields: token

func (*PairService) GetAll

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

GetAll provides a mock function with given fields:

func (*PairService) GetAllExactTokenPairData

func (_m *PairService) GetAllExactTokenPairData() ([]*types.PairData, error)

GetAllExactTokenPairData provides a mock function with given fields:

func (*PairService) GetAllSimplifiedTokenPairData

func (_m *PairService) GetAllSimplifiedTokenPairData() ([]*types.SimplifiedPairAPIData, error)

GetAllSimplifiedTokenPairData provides a mock function with given fields:

func (*PairService) GetAllTokenPairData

func (_m *PairService) GetAllTokenPairData() ([]*types.PairAPIData, error)

GetAllTokenPairData provides a mock function with given fields:

func (*PairService) GetByAsset

func (_m *PairService) GetByAsset(bt string, qt string) (*types.Pair, error)

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

func (*PairService) GetByID

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

GetByID provides a mock function with given fields: id

func (*PairService) GetListedPairs

func (_m *PairService) GetListedPairs() ([]types.Pair, error)

GetListedPairs provides a mock function with given fields:

func (*PairService) GetTokenPairData

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

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

func (*PairService) GetUnlistedPairs

func (_m *PairService) GetUnlistedPairs() ([]types.Pair, error)

GetUnlistedPairs provides a mock function with given fields:

type PriceService

type PriceService struct {
	mock.Mock
}

PriceService is an autogenerated mock type for the PriceService type

func (*PriceService) GetDollarMarketPrices

func (_m *PriceService) GetDollarMarketPrices(baseCurrencies []string) (map[string]float64, error)

GetDollarMarketPrices provides a mock function with given fields: baseCurrencies

func (*PriceService) GetMultipleMarketPrices

func (_m *PriceService) GetMultipleMarketPrices(baseCurrencies []string, quoteCurrencies []string) (map[string]map[string]float64, error)

GetMultipleMarketPrices provides a mock function with given fields: baseCurrencies, quoteCurrencies

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

func (_m *TokenDao) GetByAsset(asset string) (*types.Token, error)

GetByAsset provides a mock function with given fields: asset

func (*TokenDao) GetByAssetOrSymbol

func (_m *TokenDao) GetByAssetOrSymbol(assetOrSymbol string) (*types.Token, error)

GetByAssetOrSymbol provides a mock function with given fields: assetOrSymbol

func (*TokenDao) GetByID

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

GetByID provides a mock function with given fields: id

func (*TokenDao) GetBySymbol

func (_m *TokenDao) GetBySymbol(symbol string) (*types.Token, error)

GetBySymbol provides a mock function with given fields: symbol

func (*TokenDao) GetListedBaseTokens

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

GetListedBaseTokens provides a mock function with given fields:

func (*TokenDao) GetListedTokens

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

GetListedTokens provides a mock function with given fields:

func (*TokenDao) GetQuoteTokens

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

GetQuoteTokens provides a mock function with given fields:

func (*TokenDao) GetUnlistedTokens

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

GetUnlistedTokens 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) CheckByAssetOrSymbol

func (_m *TokenService) CheckByAssetOrSymbol(a string) (*types.Token, error)

CheckByAssetOrSymbol provides a mock function with given fields: a

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

func (_m *TokenService) GetByAsset(a string) (*types.Token, error)

GetByAsset provides a mock function with given fields: a

func (*TokenService) GetByAssetOrSymbol

func (_m *TokenService) GetByAssetOrSymbol(a string) (*types.Token, error)

GetByAssetOrSymbol provides a mock function with given fields: a

func (*TokenService) GetByID

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

GetByID provides a mock function with given fields: id

func (*TokenService) GetBySymbol

func (_m *TokenService) GetBySymbol(s string) (*types.Token, error)

GetBySymbol provides a mock function with given fields: s

func (*TokenService) GetListedBaseTokens

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

GetListedBaseTokens provides a mock function with given fields:

func (*TokenService) GetListedTokens

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

GetListedTokens provides a mock function with given fields:

func (*TokenService) GetQuoteTokens

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

GetQuoteTokens provides a mock function with given fields:

func (*TokenService) GetUnlistedTokens

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

GetUnlistedTokens 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) FindAndModify

func (_m *TradeDao) FindAndModify(h string, t *types.Trade) (*types.Trade, error)

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

func (*TradeDao) GetAll

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

GetAll provides a mock function with given fields:

func (*TradeDao) GetAllTradesByPairAssets

func (_m *TradeDao) GetAllTradesByPairAssets(bt string, qt string) ([]*types.Trade, error)

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

func (*TradeDao) GetByHash

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

GetByHash provides a mock function with given fields: h

func (*TradeDao) GetByHashes

func (_m *TradeDao) GetByHashes(hashes []string) ([]*types.Trade, error)

GetByHashes provides a mock function with given fields: hashes

func (*TradeDao) GetByMakerOrderHash

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

GetByMakerOrderHash provides a mock function with given fields: h

func (*TradeDao) GetByOrderHashes

func (_m *TradeDao) GetByOrderHashes(hashes []string) ([]*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 string) ([]*types.Trade, error)

GetByTakerOrderHash provides a mock function with given fields: h

func (*TradeDao) GetByTriggerUnitHash

func (_m *TradeDao) GetByTriggerUnitHash(h string) ([]*types.Trade, error)

GetByTriggerUnitHash provides a mock function with given fields: h

func (*TradeDao) GetByUserAddress

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

GetByUserAddress provides a mock function with given fields: a

func (*TradeDao) GetErroredTradeCount

func (_m *TradeDao) GetErroredTradeCount(start time.Time, end time.Time) (int, error)

GetErroredTradeCount provides a mock function with given fields: start, end

func (*TradeDao) GetNTradesByPairAssets

func (_m *TradeDao) GetNTradesByPairAssets(bt string, qt string, n int) ([]*types.Trade, error)

GetNTradesByPairAssets provides a mock function with given fields: bt, qt, n

func (*TradeDao) GetSortedTrades

func (_m *TradeDao) GetSortedTrades(bt string, qt string, n int) ([]*types.Trade, error)

GetSortedTrades provides a mock function with given fields: bt, qt, n

func (*TradeDao) GetSortedTradesByUserAddress

func (_m *TradeDao) GetSortedTradesByUserAddress(a string, limit ...int) ([]*types.Trade, error)

GetSortedTradesByUserAddress provides a mock function with given fields: a, limit

func (*TradeDao) GetTradesByPairAssets

func (_m *TradeDao) GetTradesByPairAssets(bt string, qt string, n int) ([]*types.Trade, error)

GetTradesByPairAssets provides a mock function with given fields: bt, qt, n

func (*TradeDao) GetUncommittedTradesByUserAddress

func (_m *TradeDao) GetUncommittedTradesByUserAddress(a string) []*types.Trade

GetUncommittedTradesByUserAddress provides a mock function with given fields: a

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 string, t *types.Trade) error

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

func (*TradeDao) UpdateTradeStatus

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

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

func (*TradeDao) UpdateTradeStatuses

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

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

func (*TradeDao) UpdateTradeStatusesByOrderHashes

func (_m *TradeDao) UpdateTradeStatusesByOrderHashes(status string, hashes ...string) ([]*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) GetAllTradesByPairAssets

func (_m *TradeService) GetAllTradesByPairAssets(bt string, qt string) ([]*types.Trade, error)

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

func (*TradeService) GetByHash

func (_m *TradeService) GetByHash(h string) (*types.Trade, error)

GetByHash provides a mock function with given fields: h

func (*TradeService) GetByHashes

func (_m *TradeService) GetByHashes(hashes []string) ([]*types.Trade, error)

GetByHashes provides a mock function with given fields: hashes

func (*TradeService) GetByMakerOrderHash

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

GetByMakerOrderHash provides a mock function with given fields: h

func (*TradeService) GetByOrderHashes

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

GetByOrderHashes provides a mock function with given fields: h

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 string) ([]*types.Trade, error)

GetByTakerOrderHash provides a mock function with given fields: h

func (*TradeService) GetByTriggerUnitHash

func (_m *TradeService) GetByTriggerUnitHash(h string) ([]*types.Trade, error)

GetByTriggerUnitHash provides a mock function with given fields: h

func (*TradeService) GetByUserAddress

func (_m *TradeService) GetByUserAddress(a string) ([]*types.Trade, error)

GetByUserAddress provides a mock function with given fields: a

func (*TradeService) GetSortedTrades

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

GetSortedTrades provides a mock function with given fields: bt, qt, n

func (*TradeService) GetSortedTradesByUserAddress

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

GetSortedTradesByUserAddress provides a mock function with given fields: a, limit

func (*TradeService) Subscribe

func (_m *TradeService) Subscribe(c *ws.Client, bt string, qt string)

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

func (*TradeService) Unsubscribe

func (_m *TradeService) Unsubscribe(c *ws.Client)

Unsubscribe provides a mock function with given fields: c

func (*TradeService) UnsubscribeChannel

func (_m *TradeService) UnsubscribeChannel(c *ws.Client, bt string, qt string)

UnsubscribeChannel provides a mock function with given fields: c, bt, qt

func (*TradeService) UpdatePendingTrade

func (_m *TradeService) UpdatePendingTrade(t *types.Trade, txh string) (*types.Trade, error)

UpdatePendingTrade provides a mock function with given fields: t, txh

func (*TradeService) UpdateSuccessfulTrade

func (_m *TradeService) UpdateSuccessfulTrade(t *types.Trade) (*types.Trade, error)

UpdateSuccessfulTrade provides a mock function with given fields: t

func (*TradeService) UpdateTradeStatus

func (_m *TradeService) UpdateTradeStatus(t *types.Trade, status string) (*types.Trade, error)

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

func (*TradeService) UpdateTradeTxHash

func (_m *TradeService) UpdateTradeTxHash(tr *types.Trade, txh string) error

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

type ValidatorService

type ValidatorService struct {
	mock.Mock
}

ValidatorService is an autogenerated mock type for the ValidatorService type

func (*ValidatorService) ValidateAvailableBalance

func (_m *ValidatorService) ValidateAvailableBalance(o *types.Order, uncommittedDeltas map[string]int64, balanceLockedInMemoryOrders int64) error

ValidateAvailableBalance provides a mock function with given fields: o, uncommittedDeltas, balanceLockedInMemoryOrders

func (*ValidatorService) ValidateBalance

func (_m *ValidatorService) ValidateBalance(o *types.Order) error

ValidateBalance provides a mock function with given fields: o

func (*ValidatorService) ValidateOperatorAddress

func (_m *ValidatorService) ValidateOperatorAddress(o *types.Order) error

ValidateOperatorAddress provides a mock function with given fields: o

Jump to

Keyboard shortcuts

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