fix mockgen command

Signed-off-by: c9s <yoanlin93@gmail.com>
This commit is contained in:
c9s 2022-07-06 01:32:05 +08:00
parent f329af2c6b
commit d140012fd5
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54
2 changed files with 41 additions and 559 deletions

View File

@ -74,7 +74,7 @@ func ValidExchangeName(a string) (ExchangeName, error) {
return "", fmt.Errorf("invalid exchange name: %s", a)
}
//go:generate mockgen -destination=mocks/mock_exchange.go -package=mocks -source=exchange.go Exchange
//go:generate mockgen -destination=mocks/mock_exchange.go -package=mocks . Exchange
type Exchange interface {
Name() ExchangeName

View File

@ -1,5 +1,5 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: exchange.go
// Source: github.com/c9s/bbgo/pkg/types (interfaces: Exchange)
// Package mocks is a generated GoMock package.
package mocks
@ -7,9 +7,7 @@ package mocks
import (
context "context"
reflect "reflect"
time "time"
fixedpoint "github.com/c9s/bbgo/pkg/fixedpoint"
types "github.com/c9s/bbgo/pkg/types"
gomock "github.com/golang/mock/gomock"
)
@ -38,10 +36,10 @@ func (m *MockExchange) EXPECT() *MockExchangeMockRecorder {
}
// CancelOrders mocks base method.
func (m *MockExchange) CancelOrders(ctx context.Context, orders ...types.Order) error {
func (m *MockExchange) CancelOrders(arg0 context.Context, arg1 ...types.Order) error {
m.ctrl.T.Helper()
varargs := []interface{}{ctx}
for _, a := range orders {
varargs := []interface{}{arg0}
for _, a := range arg1 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "CancelOrders", varargs...)
@ -50,9 +48,9 @@ func (m *MockExchange) CancelOrders(ctx context.Context, orders ...types.Order)
}
// CancelOrders indicates an expected call of CancelOrders.
func (mr *MockExchangeMockRecorder) CancelOrders(ctx interface{}, orders ...interface{}) *gomock.Call {
func (mr *MockExchangeMockRecorder) CancelOrders(arg0 interface{}, arg1 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{ctx}, orders...)
varargs := append([]interface{}{arg0}, arg1...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelOrders", reflect.TypeOf((*MockExchange)(nil).CancelOrders), varargs...)
}
@ -99,100 +97,100 @@ func (mr *MockExchangeMockRecorder) PlatformFeeCurrency() *gomock.Call {
}
// QueryAccount mocks base method.
func (m *MockExchange) QueryAccount(ctx context.Context) (*types.Account, error) {
func (m *MockExchange) QueryAccount(arg0 context.Context) (*types.Account, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "QueryAccount", ctx)
ret := m.ctrl.Call(m, "QueryAccount", arg0)
ret0, _ := ret[0].(*types.Account)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// QueryAccount indicates an expected call of QueryAccount.
func (mr *MockExchangeMockRecorder) QueryAccount(ctx interface{}) *gomock.Call {
func (mr *MockExchangeMockRecorder) QueryAccount(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryAccount", reflect.TypeOf((*MockExchange)(nil).QueryAccount), ctx)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryAccount", reflect.TypeOf((*MockExchange)(nil).QueryAccount), arg0)
}
// QueryAccountBalances mocks base method.
func (m *MockExchange) QueryAccountBalances(ctx context.Context) (types.BalanceMap, error) {
func (m *MockExchange) QueryAccountBalances(arg0 context.Context) (types.BalanceMap, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "QueryAccountBalances", ctx)
ret := m.ctrl.Call(m, "QueryAccountBalances", arg0)
ret0, _ := ret[0].(types.BalanceMap)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// QueryAccountBalances indicates an expected call of QueryAccountBalances.
func (mr *MockExchangeMockRecorder) QueryAccountBalances(ctx interface{}) *gomock.Call {
func (mr *MockExchangeMockRecorder) QueryAccountBalances(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryAccountBalances", reflect.TypeOf((*MockExchange)(nil).QueryAccountBalances), ctx)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryAccountBalances", reflect.TypeOf((*MockExchange)(nil).QueryAccountBalances), arg0)
}
// QueryKLines mocks base method.
func (m *MockExchange) QueryKLines(ctx context.Context, symbol string, interval types.Interval, options types.KLineQueryOptions) ([]types.KLine, error) {
func (m *MockExchange) QueryKLines(arg0 context.Context, arg1 string, arg2 types.Interval, arg3 types.KLineQueryOptions) ([]types.KLine, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "QueryKLines", ctx, symbol, interval, options)
ret := m.ctrl.Call(m, "QueryKLines", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].([]types.KLine)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// QueryKLines indicates an expected call of QueryKLines.
func (mr *MockExchangeMockRecorder) QueryKLines(ctx, symbol, interval, options interface{}) *gomock.Call {
func (mr *MockExchangeMockRecorder) QueryKLines(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryKLines", reflect.TypeOf((*MockExchange)(nil).QueryKLines), ctx, symbol, interval, options)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryKLines", reflect.TypeOf((*MockExchange)(nil).QueryKLines), arg0, arg1, arg2, arg3)
}
// QueryMarkets mocks base method.
func (m *MockExchange) QueryMarkets(ctx context.Context) (types.MarketMap, error) {
func (m *MockExchange) QueryMarkets(arg0 context.Context) (types.MarketMap, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "QueryMarkets", ctx)
ret := m.ctrl.Call(m, "QueryMarkets", arg0)
ret0, _ := ret[0].(types.MarketMap)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// QueryMarkets indicates an expected call of QueryMarkets.
func (mr *MockExchangeMockRecorder) QueryMarkets(ctx interface{}) *gomock.Call {
func (mr *MockExchangeMockRecorder) QueryMarkets(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryMarkets", reflect.TypeOf((*MockExchange)(nil).QueryMarkets), ctx)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryMarkets", reflect.TypeOf((*MockExchange)(nil).QueryMarkets), arg0)
}
// QueryOpenOrders mocks base method.
func (m *MockExchange) QueryOpenOrders(ctx context.Context, symbol string) ([]types.Order, error) {
func (m *MockExchange) QueryOpenOrders(arg0 context.Context, arg1 string) ([]types.Order, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "QueryOpenOrders", ctx, symbol)
ret := m.ctrl.Call(m, "QueryOpenOrders", arg0, arg1)
ret0, _ := ret[0].([]types.Order)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// QueryOpenOrders indicates an expected call of QueryOpenOrders.
func (mr *MockExchangeMockRecorder) QueryOpenOrders(ctx, symbol interface{}) *gomock.Call {
func (mr *MockExchangeMockRecorder) QueryOpenOrders(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryOpenOrders", reflect.TypeOf((*MockExchange)(nil).QueryOpenOrders), ctx, symbol)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryOpenOrders", reflect.TypeOf((*MockExchange)(nil).QueryOpenOrders), arg0, arg1)
}
// QueryTicker mocks base method.
func (m *MockExchange) QueryTicker(ctx context.Context, symbol string) (*types.Ticker, error) {
func (m *MockExchange) QueryTicker(arg0 context.Context, arg1 string) (*types.Ticker, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "QueryTicker", ctx, symbol)
ret := m.ctrl.Call(m, "QueryTicker", arg0, arg1)
ret0, _ := ret[0].(*types.Ticker)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// QueryTicker indicates an expected call of QueryTicker.
func (mr *MockExchangeMockRecorder) QueryTicker(ctx, symbol interface{}) *gomock.Call {
func (mr *MockExchangeMockRecorder) QueryTicker(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTicker", reflect.TypeOf((*MockExchange)(nil).QueryTicker), ctx, symbol)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTicker", reflect.TypeOf((*MockExchange)(nil).QueryTicker), arg0, arg1)
}
// QueryTickers mocks base method.
func (m *MockExchange) QueryTickers(ctx context.Context, symbol ...string) (map[string]types.Ticker, error) {
func (m *MockExchange) QueryTickers(arg0 context.Context, arg1 ...string) (map[string]types.Ticker, error) {
m.ctrl.T.Helper()
varargs := []interface{}{ctx}
for _, a := range symbol {
varargs := []interface{}{arg0}
for _, a := range arg1 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "QueryTickers", varargs...)
@ -202,17 +200,17 @@ func (m *MockExchange) QueryTickers(ctx context.Context, symbol ...string) (map[
}
// QueryTickers indicates an expected call of QueryTickers.
func (mr *MockExchangeMockRecorder) QueryTickers(ctx interface{}, symbol ...interface{}) *gomock.Call {
func (mr *MockExchangeMockRecorder) QueryTickers(arg0 interface{}, arg1 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{ctx}, symbol...)
varargs := append([]interface{}{arg0}, arg1...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTickers", reflect.TypeOf((*MockExchange)(nil).QueryTickers), varargs...)
}
// SubmitOrders mocks base method.
func (m *MockExchange) SubmitOrders(ctx context.Context, orders ...types.SubmitOrder) (types.OrderSlice, error) {
func (m *MockExchange) SubmitOrders(arg0 context.Context, arg1 ...types.SubmitOrder) (types.OrderSlice, error) {
m.ctrl.T.Helper()
varargs := []interface{}{ctx}
for _, a := range orders {
varargs := []interface{}{arg0}
for _, a := range arg1 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "SubmitOrders", varargs...)
@ -222,524 +220,8 @@ func (m *MockExchange) SubmitOrders(ctx context.Context, orders ...types.SubmitO
}
// SubmitOrders indicates an expected call of SubmitOrders.
func (mr *MockExchangeMockRecorder) SubmitOrders(ctx interface{}, orders ...interface{}) *gomock.Call {
func (mr *MockExchangeMockRecorder) SubmitOrders(arg0 interface{}, arg1 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{ctx}, orders...)
varargs := append([]interface{}{arg0}, arg1...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitOrders", reflect.TypeOf((*MockExchange)(nil).SubmitOrders), varargs...)
}
// MockExchangeOrderQueryService is a mock of ExchangeOrderQueryService interface.
type MockExchangeOrderQueryService struct {
ctrl *gomock.Controller
recorder *MockExchangeOrderQueryServiceMockRecorder
}
// MockExchangeOrderQueryServiceMockRecorder is the mock recorder for MockExchangeOrderQueryService.
type MockExchangeOrderQueryServiceMockRecorder struct {
mock *MockExchangeOrderQueryService
}
// NewMockExchangeOrderQueryService creates a new mock instance.
func NewMockExchangeOrderQueryService(ctrl *gomock.Controller) *MockExchangeOrderQueryService {
mock := &MockExchangeOrderQueryService{ctrl: ctrl}
mock.recorder = &MockExchangeOrderQueryServiceMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockExchangeOrderQueryService) EXPECT() *MockExchangeOrderQueryServiceMockRecorder {
return m.recorder
}
// QueryOrder mocks base method.
func (m *MockExchangeOrderQueryService) QueryOrder(ctx context.Context, q types.OrderQuery) (*types.Order, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "QueryOrder", ctx, q)
ret0, _ := ret[0].(*types.Order)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// QueryOrder indicates an expected call of QueryOrder.
func (mr *MockExchangeOrderQueryServiceMockRecorder) QueryOrder(ctx, q interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryOrder", reflect.TypeOf((*MockExchangeOrderQueryService)(nil).QueryOrder), ctx, q)
}
// MockExchangeTradeService is a mock of ExchangeTradeService interface.
type MockExchangeTradeService struct {
ctrl *gomock.Controller
recorder *MockExchangeTradeServiceMockRecorder
}
// MockExchangeTradeServiceMockRecorder is the mock recorder for MockExchangeTradeService.
type MockExchangeTradeServiceMockRecorder struct {
mock *MockExchangeTradeService
}
// NewMockExchangeTradeService creates a new mock instance.
func NewMockExchangeTradeService(ctrl *gomock.Controller) *MockExchangeTradeService {
mock := &MockExchangeTradeService{ctrl: ctrl}
mock.recorder = &MockExchangeTradeServiceMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockExchangeTradeService) EXPECT() *MockExchangeTradeServiceMockRecorder {
return m.recorder
}
// CancelOrders mocks base method.
func (m *MockExchangeTradeService) CancelOrders(ctx context.Context, orders ...types.Order) error {
m.ctrl.T.Helper()
varargs := []interface{}{ctx}
for _, a := range orders {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "CancelOrders", varargs...)
ret0, _ := ret[0].(error)
return ret0
}
// CancelOrders indicates an expected call of CancelOrders.
func (mr *MockExchangeTradeServiceMockRecorder) CancelOrders(ctx interface{}, orders ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{ctx}, orders...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelOrders", reflect.TypeOf((*MockExchangeTradeService)(nil).CancelOrders), varargs...)
}
// QueryAccount mocks base method.
func (m *MockExchangeTradeService) QueryAccount(ctx context.Context) (*types.Account, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "QueryAccount", ctx)
ret0, _ := ret[0].(*types.Account)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// QueryAccount indicates an expected call of QueryAccount.
func (mr *MockExchangeTradeServiceMockRecorder) QueryAccount(ctx interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryAccount", reflect.TypeOf((*MockExchangeTradeService)(nil).QueryAccount), ctx)
}
// QueryAccountBalances mocks base method.
func (m *MockExchangeTradeService) QueryAccountBalances(ctx context.Context) (types.BalanceMap, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "QueryAccountBalances", ctx)
ret0, _ := ret[0].(types.BalanceMap)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// QueryAccountBalances indicates an expected call of QueryAccountBalances.
func (mr *MockExchangeTradeServiceMockRecorder) QueryAccountBalances(ctx interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryAccountBalances", reflect.TypeOf((*MockExchangeTradeService)(nil).QueryAccountBalances), ctx)
}
// QueryOpenOrders mocks base method.
func (m *MockExchangeTradeService) QueryOpenOrders(ctx context.Context, symbol string) ([]types.Order, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "QueryOpenOrders", ctx, symbol)
ret0, _ := ret[0].([]types.Order)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// QueryOpenOrders indicates an expected call of QueryOpenOrders.
func (mr *MockExchangeTradeServiceMockRecorder) QueryOpenOrders(ctx, symbol interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryOpenOrders", reflect.TypeOf((*MockExchangeTradeService)(nil).QueryOpenOrders), ctx, symbol)
}
// SubmitOrders mocks base method.
func (m *MockExchangeTradeService) SubmitOrders(ctx context.Context, orders ...types.SubmitOrder) (types.OrderSlice, error) {
m.ctrl.T.Helper()
varargs := []interface{}{ctx}
for _, a := range orders {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "SubmitOrders", varargs...)
ret0, _ := ret[0].(types.OrderSlice)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// SubmitOrders indicates an expected call of SubmitOrders.
func (mr *MockExchangeTradeServiceMockRecorder) SubmitOrders(ctx interface{}, orders ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{ctx}, orders...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitOrders", reflect.TypeOf((*MockExchangeTradeService)(nil).SubmitOrders), varargs...)
}
// MockExchangeDefaultFeeRates is a mock of ExchangeDefaultFeeRates interface.
type MockExchangeDefaultFeeRates struct {
ctrl *gomock.Controller
recorder *MockExchangeDefaultFeeRatesMockRecorder
}
// MockExchangeDefaultFeeRatesMockRecorder is the mock recorder for MockExchangeDefaultFeeRates.
type MockExchangeDefaultFeeRatesMockRecorder struct {
mock *MockExchangeDefaultFeeRates
}
// NewMockExchangeDefaultFeeRates creates a new mock instance.
func NewMockExchangeDefaultFeeRates(ctrl *gomock.Controller) *MockExchangeDefaultFeeRates {
mock := &MockExchangeDefaultFeeRates{ctrl: ctrl}
mock.recorder = &MockExchangeDefaultFeeRatesMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockExchangeDefaultFeeRates) EXPECT() *MockExchangeDefaultFeeRatesMockRecorder {
return m.recorder
}
// DefaultFeeRates mocks base method.
func (m *MockExchangeDefaultFeeRates) DefaultFeeRates() types.ExchangeFee {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DefaultFeeRates")
ret0, _ := ret[0].(types.ExchangeFee)
return ret0
}
// DefaultFeeRates indicates an expected call of DefaultFeeRates.
func (mr *MockExchangeDefaultFeeRatesMockRecorder) DefaultFeeRates() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultFeeRates", reflect.TypeOf((*MockExchangeDefaultFeeRates)(nil).DefaultFeeRates))
}
// MockExchangeTradeHistoryService is a mock of ExchangeTradeHistoryService interface.
type MockExchangeTradeHistoryService struct {
ctrl *gomock.Controller
recorder *MockExchangeTradeHistoryServiceMockRecorder
}
// MockExchangeTradeHistoryServiceMockRecorder is the mock recorder for MockExchangeTradeHistoryService.
type MockExchangeTradeHistoryServiceMockRecorder struct {
mock *MockExchangeTradeHistoryService
}
// NewMockExchangeTradeHistoryService creates a new mock instance.
func NewMockExchangeTradeHistoryService(ctrl *gomock.Controller) *MockExchangeTradeHistoryService {
mock := &MockExchangeTradeHistoryService{ctrl: ctrl}
mock.recorder = &MockExchangeTradeHistoryServiceMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockExchangeTradeHistoryService) EXPECT() *MockExchangeTradeHistoryServiceMockRecorder {
return m.recorder
}
// QueryClosedOrders mocks base method.
func (m *MockExchangeTradeHistoryService) QueryClosedOrders(ctx context.Context, symbol string, since, until time.Time, lastOrderID uint64) ([]types.Order, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "QueryClosedOrders", ctx, symbol, since, until, lastOrderID)
ret0, _ := ret[0].([]types.Order)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// QueryClosedOrders indicates an expected call of QueryClosedOrders.
func (mr *MockExchangeTradeHistoryServiceMockRecorder) QueryClosedOrders(ctx, symbol, since, until, lastOrderID interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryClosedOrders", reflect.TypeOf((*MockExchangeTradeHistoryService)(nil).QueryClosedOrders), ctx, symbol, since, until, lastOrderID)
}
// QueryTrades mocks base method.
func (m *MockExchangeTradeHistoryService) QueryTrades(ctx context.Context, symbol string, options *types.TradeQueryOptions) ([]types.Trade, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "QueryTrades", ctx, symbol, options)
ret0, _ := ret[0].([]types.Trade)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// QueryTrades indicates an expected call of QueryTrades.
func (mr *MockExchangeTradeHistoryServiceMockRecorder) QueryTrades(ctx, symbol, options interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTrades", reflect.TypeOf((*MockExchangeTradeHistoryService)(nil).QueryTrades), ctx, symbol, options)
}
// MockExchangeMarketDataService is a mock of ExchangeMarketDataService interface.
type MockExchangeMarketDataService struct {
ctrl *gomock.Controller
recorder *MockExchangeMarketDataServiceMockRecorder
}
// MockExchangeMarketDataServiceMockRecorder is the mock recorder for MockExchangeMarketDataService.
type MockExchangeMarketDataServiceMockRecorder struct {
mock *MockExchangeMarketDataService
}
// NewMockExchangeMarketDataService creates a new mock instance.
func NewMockExchangeMarketDataService(ctrl *gomock.Controller) *MockExchangeMarketDataService {
mock := &MockExchangeMarketDataService{ctrl: ctrl}
mock.recorder = &MockExchangeMarketDataServiceMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockExchangeMarketDataService) EXPECT() *MockExchangeMarketDataServiceMockRecorder {
return m.recorder
}
// NewStream mocks base method.
func (m *MockExchangeMarketDataService) NewStream() types.Stream {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NewStream")
ret0, _ := ret[0].(types.Stream)
return ret0
}
// NewStream indicates an expected call of NewStream.
func (mr *MockExchangeMarketDataServiceMockRecorder) NewStream() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewStream", reflect.TypeOf((*MockExchangeMarketDataService)(nil).NewStream))
}
// QueryKLines mocks base method.
func (m *MockExchangeMarketDataService) QueryKLines(ctx context.Context, symbol string, interval types.Interval, options types.KLineQueryOptions) ([]types.KLine, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "QueryKLines", ctx, symbol, interval, options)
ret0, _ := ret[0].([]types.KLine)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// QueryKLines indicates an expected call of QueryKLines.
func (mr *MockExchangeMarketDataServiceMockRecorder) QueryKLines(ctx, symbol, interval, options interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryKLines", reflect.TypeOf((*MockExchangeMarketDataService)(nil).QueryKLines), ctx, symbol, interval, options)
}
// QueryMarkets mocks base method.
func (m *MockExchangeMarketDataService) QueryMarkets(ctx context.Context) (types.MarketMap, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "QueryMarkets", ctx)
ret0, _ := ret[0].(types.MarketMap)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// QueryMarkets indicates an expected call of QueryMarkets.
func (mr *MockExchangeMarketDataServiceMockRecorder) QueryMarkets(ctx interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryMarkets", reflect.TypeOf((*MockExchangeMarketDataService)(nil).QueryMarkets), ctx)
}
// QueryTicker mocks base method.
func (m *MockExchangeMarketDataService) QueryTicker(ctx context.Context, symbol string) (*types.Ticker, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "QueryTicker", ctx, symbol)
ret0, _ := ret[0].(*types.Ticker)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// QueryTicker indicates an expected call of QueryTicker.
func (mr *MockExchangeMarketDataServiceMockRecorder) QueryTicker(ctx, symbol interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTicker", reflect.TypeOf((*MockExchangeMarketDataService)(nil).QueryTicker), ctx, symbol)
}
// QueryTickers mocks base method.
func (m *MockExchangeMarketDataService) QueryTickers(ctx context.Context, symbol ...string) (map[string]types.Ticker, error) {
m.ctrl.T.Helper()
varargs := []interface{}{ctx}
for _, a := range symbol {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "QueryTickers", varargs...)
ret0, _ := ret[0].(map[string]types.Ticker)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// QueryTickers indicates an expected call of QueryTickers.
func (mr *MockExchangeMarketDataServiceMockRecorder) QueryTickers(ctx interface{}, symbol ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{ctx}, symbol...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTickers", reflect.TypeOf((*MockExchangeMarketDataService)(nil).QueryTickers), varargs...)
}
// MockCustomIntervalProvider is a mock of CustomIntervalProvider interface.
type MockCustomIntervalProvider struct {
ctrl *gomock.Controller
recorder *MockCustomIntervalProviderMockRecorder
}
// MockCustomIntervalProviderMockRecorder is the mock recorder for MockCustomIntervalProvider.
type MockCustomIntervalProviderMockRecorder struct {
mock *MockCustomIntervalProvider
}
// NewMockCustomIntervalProvider creates a new mock instance.
func NewMockCustomIntervalProvider(ctrl *gomock.Controller) *MockCustomIntervalProvider {
mock := &MockCustomIntervalProvider{ctrl: ctrl}
mock.recorder = &MockCustomIntervalProviderMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockCustomIntervalProvider) EXPECT() *MockCustomIntervalProviderMockRecorder {
return m.recorder
}
// IsSupportedInterval mocks base method.
func (m *MockCustomIntervalProvider) IsSupportedInterval(interval types.Interval) bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "IsSupportedInterval", interval)
ret0, _ := ret[0].(bool)
return ret0
}
// IsSupportedInterval indicates an expected call of IsSupportedInterval.
func (mr *MockCustomIntervalProviderMockRecorder) IsSupportedInterval(interval interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsSupportedInterval", reflect.TypeOf((*MockCustomIntervalProvider)(nil).IsSupportedInterval), interval)
}
// SupportedInterval mocks base method.
func (m *MockCustomIntervalProvider) SupportedInterval() map[types.Interval]int {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SupportedInterval")
ret0, _ := ret[0].(map[types.Interval]int)
return ret0
}
// SupportedInterval indicates an expected call of SupportedInterval.
func (mr *MockCustomIntervalProviderMockRecorder) SupportedInterval() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportedInterval", reflect.TypeOf((*MockCustomIntervalProvider)(nil).SupportedInterval))
}
// MockExchangeTransferService is a mock of ExchangeTransferService interface.
type MockExchangeTransferService struct {
ctrl *gomock.Controller
recorder *MockExchangeTransferServiceMockRecorder
}
// MockExchangeTransferServiceMockRecorder is the mock recorder for MockExchangeTransferService.
type MockExchangeTransferServiceMockRecorder struct {
mock *MockExchangeTransferService
}
// NewMockExchangeTransferService creates a new mock instance.
func NewMockExchangeTransferService(ctrl *gomock.Controller) *MockExchangeTransferService {
mock := &MockExchangeTransferService{ctrl: ctrl}
mock.recorder = &MockExchangeTransferServiceMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockExchangeTransferService) EXPECT() *MockExchangeTransferServiceMockRecorder {
return m.recorder
}
// QueryDepositHistory mocks base method.
func (m *MockExchangeTransferService) QueryDepositHistory(ctx context.Context, asset string, since, until time.Time) ([]types.Deposit, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "QueryDepositHistory", ctx, asset, since, until)
ret0, _ := ret[0].([]types.Deposit)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// QueryDepositHistory indicates an expected call of QueryDepositHistory.
func (mr *MockExchangeTransferServiceMockRecorder) QueryDepositHistory(ctx, asset, since, until interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryDepositHistory", reflect.TypeOf((*MockExchangeTransferService)(nil).QueryDepositHistory), ctx, asset, since, until)
}
// QueryWithdrawHistory mocks base method.
func (m *MockExchangeTransferService) QueryWithdrawHistory(ctx context.Context, asset string, since, until time.Time) ([]types.Withdraw, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "QueryWithdrawHistory", ctx, asset, since, until)
ret0, _ := ret[0].([]types.Withdraw)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// QueryWithdrawHistory indicates an expected call of QueryWithdrawHistory.
func (mr *MockExchangeTransferServiceMockRecorder) QueryWithdrawHistory(ctx, asset, since, until interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryWithdrawHistory", reflect.TypeOf((*MockExchangeTransferService)(nil).QueryWithdrawHistory), ctx, asset, since, until)
}
// MockExchangeWithdrawalService is a mock of ExchangeWithdrawalService interface.
type MockExchangeWithdrawalService struct {
ctrl *gomock.Controller
recorder *MockExchangeWithdrawalServiceMockRecorder
}
// MockExchangeWithdrawalServiceMockRecorder is the mock recorder for MockExchangeWithdrawalService.
type MockExchangeWithdrawalServiceMockRecorder struct {
mock *MockExchangeWithdrawalService
}
// NewMockExchangeWithdrawalService creates a new mock instance.
func NewMockExchangeWithdrawalService(ctrl *gomock.Controller) *MockExchangeWithdrawalService {
mock := &MockExchangeWithdrawalService{ctrl: ctrl}
mock.recorder = &MockExchangeWithdrawalServiceMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockExchangeWithdrawalService) EXPECT() *MockExchangeWithdrawalServiceMockRecorder {
return m.recorder
}
// Withdraw mocks base method.
func (m *MockExchangeWithdrawalService) Withdraw(ctx context.Context, asset string, amount fixedpoint.Value, address string, options *types.WithdrawalOptions) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Withdraw", ctx, asset, amount, address, options)
ret0, _ := ret[0].(error)
return ret0
}
// Withdraw indicates an expected call of Withdraw.
func (mr *MockExchangeWithdrawalServiceMockRecorder) Withdraw(ctx, asset, amount, address, options interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Withdraw", reflect.TypeOf((*MockExchangeWithdrawalService)(nil).Withdraw), ctx, asset, amount, address, options)
}
// MockExchangeRewardService is a mock of ExchangeRewardService interface.
type MockExchangeRewardService struct {
ctrl *gomock.Controller
recorder *MockExchangeRewardServiceMockRecorder
}
// MockExchangeRewardServiceMockRecorder is the mock recorder for MockExchangeRewardService.
type MockExchangeRewardServiceMockRecorder struct {
mock *MockExchangeRewardService
}
// NewMockExchangeRewardService creates a new mock instance.
func NewMockExchangeRewardService(ctrl *gomock.Controller) *MockExchangeRewardService {
mock := &MockExchangeRewardService{ctrl: ctrl}
mock.recorder = &MockExchangeRewardServiceMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockExchangeRewardService) EXPECT() *MockExchangeRewardServiceMockRecorder {
return m.recorder
}
// QueryRewards mocks base method.
func (m *MockExchangeRewardService) QueryRewards(ctx context.Context, startTime time.Time) ([]types.Reward, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "QueryRewards", ctx, startTime)
ret0, _ := ret[0].([]types.Reward)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// QueryRewards indicates an expected call of QueryRewards.
func (mr *MockExchangeRewardServiceMockRecorder) QueryRewards(ctx, startTime interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryRewards", reflect.TypeOf((*MockExchangeRewardService)(nil).QueryRewards), ctx, startTime)
}