c4c0b9bd32
added CI * onlywherenecessary * export * dockersocketoverride * disablecleanup * networkfromenv * fullsuite * ci * dockerhost * name * network * buildfirst * rm * caches * additionalcaches * additionalcaches * cachenix * nix * requiredprofile * nonixcache * nobuild * moremem * rmgomodules * buildfirst * faster * clean
1979 lines
75 KiB
Go
1979 lines
75 KiB
Go
// Code generated by mockery v2.52.3. DO NOT EDIT.
|
|
|
|
package queryapimock
|
|
|
|
import (
|
|
context "context"
|
|
http "net/http"
|
|
|
|
io "io"
|
|
|
|
mock "github.com/stretchr/testify/mock"
|
|
|
|
queryapi "queryorchestration/pkg/queryAPI"
|
|
)
|
|
|
|
// MockClientInterface is an autogenerated mock type for the ClientInterface type
|
|
type MockClientInterface struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type MockClientInterface_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *MockClientInterface) EXPECT() *MockClientInterface_Expecter {
|
|
return &MockClientInterface_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// CreateClient provides a mock function with given fields: ctx, body, reqEditors
|
|
func (_m *MockClientInterface) CreateClient(ctx context.Context, body queryapi.CreateClientJSONRequestBody, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) {
|
|
_va := make([]interface{}, len(reqEditors))
|
|
for _i := range reqEditors {
|
|
_va[_i] = reqEditors[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, body)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CreateClient")
|
|
}
|
|
|
|
var r0 *http.Response
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, queryapi.CreateClientJSONRequestBody, ...queryapi.RequestEditorFn) (*http.Response, error)); ok {
|
|
return rf(ctx, body, reqEditors...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, queryapi.CreateClientJSONRequestBody, ...queryapi.RequestEditorFn) *http.Response); ok {
|
|
r0 = rf(ctx, body, reqEditors...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*http.Response)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, queryapi.CreateClientJSONRequestBody, ...queryapi.RequestEditorFn) error); ok {
|
|
r1 = rf(ctx, body, reqEditors...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockClientInterface_CreateClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateClient'
|
|
type MockClientInterface_CreateClient_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CreateClient is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - body queryapi.CreateClientJSONRequestBody
|
|
// - reqEditors ...queryapi.RequestEditorFn
|
|
func (_e *MockClientInterface_Expecter) CreateClient(ctx interface{}, body interface{}, reqEditors ...interface{}) *MockClientInterface_CreateClient_Call {
|
|
return &MockClientInterface_CreateClient_Call{Call: _e.mock.On("CreateClient",
|
|
append([]interface{}{ctx, body}, reqEditors...)...)}
|
|
}
|
|
|
|
func (_c *MockClientInterface_CreateClient_Call) Run(run func(ctx context.Context, body queryapi.CreateClientJSONRequestBody, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_CreateClient_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]queryapi.RequestEditorFn, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(queryapi.RequestEditorFn)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(queryapi.CreateClientJSONRequestBody), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_CreateClient_Call) Return(_a0 *http.Response, _a1 error) *MockClientInterface_CreateClient_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_CreateClient_Call) RunAndReturn(run func(context.Context, queryapi.CreateClientJSONRequestBody, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_CreateClient_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CreateClientWithBody provides a mock function with given fields: ctx, contentType, body, reqEditors
|
|
func (_m *MockClientInterface) CreateClientWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) {
|
|
_va := make([]interface{}, len(reqEditors))
|
|
for _i := range reqEditors {
|
|
_va[_i] = reqEditors[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, contentType, body)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CreateClientWithBody")
|
|
}
|
|
|
|
var r0 *http.Response
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, io.Reader, ...queryapi.RequestEditorFn) (*http.Response, error)); ok {
|
|
return rf(ctx, contentType, body, reqEditors...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, io.Reader, ...queryapi.RequestEditorFn) *http.Response); ok {
|
|
r0 = rf(ctx, contentType, body, reqEditors...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*http.Response)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, string, io.Reader, ...queryapi.RequestEditorFn) error); ok {
|
|
r1 = rf(ctx, contentType, body, reqEditors...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockClientInterface_CreateClientWithBody_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateClientWithBody'
|
|
type MockClientInterface_CreateClientWithBody_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CreateClientWithBody is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - contentType string
|
|
// - body io.Reader
|
|
// - reqEditors ...queryapi.RequestEditorFn
|
|
func (_e *MockClientInterface_Expecter) CreateClientWithBody(ctx interface{}, contentType interface{}, body interface{}, reqEditors ...interface{}) *MockClientInterface_CreateClientWithBody_Call {
|
|
return &MockClientInterface_CreateClientWithBody_Call{Call: _e.mock.On("CreateClientWithBody",
|
|
append([]interface{}{ctx, contentType, body}, reqEditors...)...)}
|
|
}
|
|
|
|
func (_c *MockClientInterface_CreateClientWithBody_Call) Run(run func(ctx context.Context, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_CreateClientWithBody_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]queryapi.RequestEditorFn, len(args)-3)
|
|
for i, a := range args[3:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(queryapi.RequestEditorFn)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(string), args[2].(io.Reader), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_CreateClientWithBody_Call) Return(_a0 *http.Response, _a1 error) *MockClientInterface_CreateClientWithBody_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_CreateClientWithBody_Call) RunAndReturn(run func(context.Context, string, io.Reader, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_CreateClientWithBody_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CreateQuery provides a mock function with given fields: ctx, body, reqEditors
|
|
func (_m *MockClientInterface) CreateQuery(ctx context.Context, body queryapi.CreateQueryJSONRequestBody, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) {
|
|
_va := make([]interface{}, len(reqEditors))
|
|
for _i := range reqEditors {
|
|
_va[_i] = reqEditors[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, body)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CreateQuery")
|
|
}
|
|
|
|
var r0 *http.Response
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, queryapi.CreateQueryJSONRequestBody, ...queryapi.RequestEditorFn) (*http.Response, error)); ok {
|
|
return rf(ctx, body, reqEditors...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, queryapi.CreateQueryJSONRequestBody, ...queryapi.RequestEditorFn) *http.Response); ok {
|
|
r0 = rf(ctx, body, reqEditors...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*http.Response)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, queryapi.CreateQueryJSONRequestBody, ...queryapi.RequestEditorFn) error); ok {
|
|
r1 = rf(ctx, body, reqEditors...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockClientInterface_CreateQuery_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateQuery'
|
|
type MockClientInterface_CreateQuery_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CreateQuery is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - body queryapi.CreateQueryJSONRequestBody
|
|
// - reqEditors ...queryapi.RequestEditorFn
|
|
func (_e *MockClientInterface_Expecter) CreateQuery(ctx interface{}, body interface{}, reqEditors ...interface{}) *MockClientInterface_CreateQuery_Call {
|
|
return &MockClientInterface_CreateQuery_Call{Call: _e.mock.On("CreateQuery",
|
|
append([]interface{}{ctx, body}, reqEditors...)...)}
|
|
}
|
|
|
|
func (_c *MockClientInterface_CreateQuery_Call) Run(run func(ctx context.Context, body queryapi.CreateQueryJSONRequestBody, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_CreateQuery_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]queryapi.RequestEditorFn, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(queryapi.RequestEditorFn)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(queryapi.CreateQueryJSONRequestBody), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_CreateQuery_Call) Return(_a0 *http.Response, _a1 error) *MockClientInterface_CreateQuery_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_CreateQuery_Call) RunAndReturn(run func(context.Context, queryapi.CreateQueryJSONRequestBody, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_CreateQuery_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CreateQueryWithBody provides a mock function with given fields: ctx, contentType, body, reqEditors
|
|
func (_m *MockClientInterface) CreateQueryWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) {
|
|
_va := make([]interface{}, len(reqEditors))
|
|
for _i := range reqEditors {
|
|
_va[_i] = reqEditors[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, contentType, body)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CreateQueryWithBody")
|
|
}
|
|
|
|
var r0 *http.Response
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, io.Reader, ...queryapi.RequestEditorFn) (*http.Response, error)); ok {
|
|
return rf(ctx, contentType, body, reqEditors...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, io.Reader, ...queryapi.RequestEditorFn) *http.Response); ok {
|
|
r0 = rf(ctx, contentType, body, reqEditors...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*http.Response)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, string, io.Reader, ...queryapi.RequestEditorFn) error); ok {
|
|
r1 = rf(ctx, contentType, body, reqEditors...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockClientInterface_CreateQueryWithBody_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateQueryWithBody'
|
|
type MockClientInterface_CreateQueryWithBody_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CreateQueryWithBody is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - contentType string
|
|
// - body io.Reader
|
|
// - reqEditors ...queryapi.RequestEditorFn
|
|
func (_e *MockClientInterface_Expecter) CreateQueryWithBody(ctx interface{}, contentType interface{}, body interface{}, reqEditors ...interface{}) *MockClientInterface_CreateQueryWithBody_Call {
|
|
return &MockClientInterface_CreateQueryWithBody_Call{Call: _e.mock.On("CreateQueryWithBody",
|
|
append([]interface{}{ctx, contentType, body}, reqEditors...)...)}
|
|
}
|
|
|
|
func (_c *MockClientInterface_CreateQueryWithBody_Call) Run(run func(ctx context.Context, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_CreateQueryWithBody_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]queryapi.RequestEditorFn, len(args)-3)
|
|
for i, a := range args[3:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(queryapi.RequestEditorFn)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(string), args[2].(io.Reader), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_CreateQueryWithBody_Call) Return(_a0 *http.Response, _a1 error) *MockClientInterface_CreateQueryWithBody_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_CreateQueryWithBody_Call) RunAndReturn(run func(context.Context, string, io.Reader, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_CreateQueryWithBody_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ExportState provides a mock function with given fields: ctx, id, reqEditors
|
|
func (_m *MockClientInterface) ExportState(ctx context.Context, id queryapi.ExportID, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) {
|
|
_va := make([]interface{}, len(reqEditors))
|
|
for _i := range reqEditors {
|
|
_va[_i] = reqEditors[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, id)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ExportState")
|
|
}
|
|
|
|
var r0 *http.Response
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, queryapi.ExportID, ...queryapi.RequestEditorFn) (*http.Response, error)); ok {
|
|
return rf(ctx, id, reqEditors...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, queryapi.ExportID, ...queryapi.RequestEditorFn) *http.Response); ok {
|
|
r0 = rf(ctx, id, reqEditors...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*http.Response)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, queryapi.ExportID, ...queryapi.RequestEditorFn) error); ok {
|
|
r1 = rf(ctx, id, reqEditors...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockClientInterface_ExportState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExportState'
|
|
type MockClientInterface_ExportState_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ExportState is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - id queryapi.ExportID
|
|
// - reqEditors ...queryapi.RequestEditorFn
|
|
func (_e *MockClientInterface_Expecter) ExportState(ctx interface{}, id interface{}, reqEditors ...interface{}) *MockClientInterface_ExportState_Call {
|
|
return &MockClientInterface_ExportState_Call{Call: _e.mock.On("ExportState",
|
|
append([]interface{}{ctx, id}, reqEditors...)...)}
|
|
}
|
|
|
|
func (_c *MockClientInterface_ExportState_Call) Run(run func(ctx context.Context, id queryapi.ExportID, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_ExportState_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]queryapi.RequestEditorFn, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(queryapi.RequestEditorFn)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(queryapi.ExportID), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_ExportState_Call) Return(_a0 *http.Response, _a1 error) *MockClientInterface_ExportState_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_ExportState_Call) RunAndReturn(run func(context.Context, queryapi.ExportID, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_ExportState_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetClient provides a mock function with given fields: ctx, id, reqEditors
|
|
func (_m *MockClientInterface) GetClient(ctx context.Context, id queryapi.ClientID, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) {
|
|
_va := make([]interface{}, len(reqEditors))
|
|
for _i := range reqEditors {
|
|
_va[_i] = reqEditors[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, id)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetClient")
|
|
}
|
|
|
|
var r0 *http.Response
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) (*http.Response, error)); ok {
|
|
return rf(ctx, id, reqEditors...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) *http.Response); ok {
|
|
r0 = rf(ctx, id, reqEditors...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*http.Response)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) error); ok {
|
|
r1 = rf(ctx, id, reqEditors...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockClientInterface_GetClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetClient'
|
|
type MockClientInterface_GetClient_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetClient is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - id queryapi.ClientID
|
|
// - reqEditors ...queryapi.RequestEditorFn
|
|
func (_e *MockClientInterface_Expecter) GetClient(ctx interface{}, id interface{}, reqEditors ...interface{}) *MockClientInterface_GetClient_Call {
|
|
return &MockClientInterface_GetClient_Call{Call: _e.mock.On("GetClient",
|
|
append([]interface{}{ctx, id}, reqEditors...)...)}
|
|
}
|
|
|
|
func (_c *MockClientInterface_GetClient_Call) Run(run func(ctx context.Context, id queryapi.ClientID, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_GetClient_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]queryapi.RequestEditorFn, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(queryapi.RequestEditorFn)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(queryapi.ClientID), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_GetClient_Call) Return(_a0 *http.Response, _a1 error) *MockClientInterface_GetClient_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_GetClient_Call) RunAndReturn(run func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_GetClient_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetCollectorByClientId provides a mock function with given fields: ctx, id, reqEditors
|
|
func (_m *MockClientInterface) GetCollectorByClientId(ctx context.Context, id queryapi.ClientID, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) {
|
|
_va := make([]interface{}, len(reqEditors))
|
|
for _i := range reqEditors {
|
|
_va[_i] = reqEditors[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, id)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetCollectorByClientId")
|
|
}
|
|
|
|
var r0 *http.Response
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) (*http.Response, error)); ok {
|
|
return rf(ctx, id, reqEditors...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) *http.Response); ok {
|
|
r0 = rf(ctx, id, reqEditors...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*http.Response)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) error); ok {
|
|
r1 = rf(ctx, id, reqEditors...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockClientInterface_GetCollectorByClientId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCollectorByClientId'
|
|
type MockClientInterface_GetCollectorByClientId_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetCollectorByClientId is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - id queryapi.ClientID
|
|
// - reqEditors ...queryapi.RequestEditorFn
|
|
func (_e *MockClientInterface_Expecter) GetCollectorByClientId(ctx interface{}, id interface{}, reqEditors ...interface{}) *MockClientInterface_GetCollectorByClientId_Call {
|
|
return &MockClientInterface_GetCollectorByClientId_Call{Call: _e.mock.On("GetCollectorByClientId",
|
|
append([]interface{}{ctx, id}, reqEditors...)...)}
|
|
}
|
|
|
|
func (_c *MockClientInterface_GetCollectorByClientId_Call) Run(run func(ctx context.Context, id queryapi.ClientID, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_GetCollectorByClientId_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]queryapi.RequestEditorFn, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(queryapi.RequestEditorFn)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(queryapi.ClientID), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_GetCollectorByClientId_Call) Return(_a0 *http.Response, _a1 error) *MockClientInterface_GetCollectorByClientId_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_GetCollectorByClientId_Call) RunAndReturn(run func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_GetCollectorByClientId_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetDocument provides a mock function with given fields: ctx, id, reqEditors
|
|
func (_m *MockClientInterface) GetDocument(ctx context.Context, id queryapi.DocumentID, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) {
|
|
_va := make([]interface{}, len(reqEditors))
|
|
for _i := range reqEditors {
|
|
_va[_i] = reqEditors[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, id)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetDocument")
|
|
}
|
|
|
|
var r0 *http.Response
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, queryapi.DocumentID, ...queryapi.RequestEditorFn) (*http.Response, error)); ok {
|
|
return rf(ctx, id, reqEditors...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, queryapi.DocumentID, ...queryapi.RequestEditorFn) *http.Response); ok {
|
|
r0 = rf(ctx, id, reqEditors...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*http.Response)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, queryapi.DocumentID, ...queryapi.RequestEditorFn) error); ok {
|
|
r1 = rf(ctx, id, reqEditors...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockClientInterface_GetDocument_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDocument'
|
|
type MockClientInterface_GetDocument_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetDocument is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - id queryapi.DocumentID
|
|
// - reqEditors ...queryapi.RequestEditorFn
|
|
func (_e *MockClientInterface_Expecter) GetDocument(ctx interface{}, id interface{}, reqEditors ...interface{}) *MockClientInterface_GetDocument_Call {
|
|
return &MockClientInterface_GetDocument_Call{Call: _e.mock.On("GetDocument",
|
|
append([]interface{}{ctx, id}, reqEditors...)...)}
|
|
}
|
|
|
|
func (_c *MockClientInterface_GetDocument_Call) Run(run func(ctx context.Context, id queryapi.DocumentID, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_GetDocument_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]queryapi.RequestEditorFn, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(queryapi.RequestEditorFn)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(queryapi.DocumentID), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_GetDocument_Call) Return(_a0 *http.Response, _a1 error) *MockClientInterface_GetDocument_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_GetDocument_Call) RunAndReturn(run func(context.Context, queryapi.DocumentID, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_GetDocument_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetHomePage provides a mock function with given fields: ctx, reqEditors
|
|
func (_m *MockClientInterface) GetHomePage(ctx context.Context, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) {
|
|
_va := make([]interface{}, len(reqEditors))
|
|
for _i := range reqEditors {
|
|
_va[_i] = reqEditors[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetHomePage")
|
|
}
|
|
|
|
var r0 *http.Response
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, ...queryapi.RequestEditorFn) (*http.Response, error)); ok {
|
|
return rf(ctx, reqEditors...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, ...queryapi.RequestEditorFn) *http.Response); ok {
|
|
r0 = rf(ctx, reqEditors...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*http.Response)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, ...queryapi.RequestEditorFn) error); ok {
|
|
r1 = rf(ctx, reqEditors...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockClientInterface_GetHomePage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetHomePage'
|
|
type MockClientInterface_GetHomePage_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetHomePage is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - reqEditors ...queryapi.RequestEditorFn
|
|
func (_e *MockClientInterface_Expecter) GetHomePage(ctx interface{}, reqEditors ...interface{}) *MockClientInterface_GetHomePage_Call {
|
|
return &MockClientInterface_GetHomePage_Call{Call: _e.mock.On("GetHomePage",
|
|
append([]interface{}{ctx}, reqEditors...)...)}
|
|
}
|
|
|
|
func (_c *MockClientInterface_GetHomePage_Call) Run(run func(ctx context.Context, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_GetHomePage_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]queryapi.RequestEditorFn, len(args)-1)
|
|
for i, a := range args[1:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(queryapi.RequestEditorFn)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_GetHomePage_Call) Return(_a0 *http.Response, _a1 error) *MockClientInterface_GetHomePage_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_GetHomePage_Call) RunAndReturn(run func(context.Context, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_GetHomePage_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetQuery provides a mock function with given fields: ctx, id, reqEditors
|
|
func (_m *MockClientInterface) GetQuery(ctx context.Context, id queryapi.QueryID, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) {
|
|
_va := make([]interface{}, len(reqEditors))
|
|
for _i := range reqEditors {
|
|
_va[_i] = reqEditors[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, id)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetQuery")
|
|
}
|
|
|
|
var r0 *http.Response
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, queryapi.QueryID, ...queryapi.RequestEditorFn) (*http.Response, error)); ok {
|
|
return rf(ctx, id, reqEditors...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, queryapi.QueryID, ...queryapi.RequestEditorFn) *http.Response); ok {
|
|
r0 = rf(ctx, id, reqEditors...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*http.Response)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, queryapi.QueryID, ...queryapi.RequestEditorFn) error); ok {
|
|
r1 = rf(ctx, id, reqEditors...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockClientInterface_GetQuery_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetQuery'
|
|
type MockClientInterface_GetQuery_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetQuery is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - id queryapi.QueryID
|
|
// - reqEditors ...queryapi.RequestEditorFn
|
|
func (_e *MockClientInterface_Expecter) GetQuery(ctx interface{}, id interface{}, reqEditors ...interface{}) *MockClientInterface_GetQuery_Call {
|
|
return &MockClientInterface_GetQuery_Call{Call: _e.mock.On("GetQuery",
|
|
append([]interface{}{ctx, id}, reqEditors...)...)}
|
|
}
|
|
|
|
func (_c *MockClientInterface_GetQuery_Call) Run(run func(ctx context.Context, id queryapi.QueryID, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_GetQuery_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]queryapi.RequestEditorFn, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(queryapi.RequestEditorFn)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(queryapi.QueryID), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_GetQuery_Call) Return(_a0 *http.Response, _a1 error) *MockClientInterface_GetQuery_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_GetQuery_Call) RunAndReturn(run func(context.Context, queryapi.QueryID, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_GetQuery_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetStatusByClientId provides a mock function with given fields: ctx, id, reqEditors
|
|
func (_m *MockClientInterface) GetStatusByClientId(ctx context.Context, id queryapi.ClientID, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) {
|
|
_va := make([]interface{}, len(reqEditors))
|
|
for _i := range reqEditors {
|
|
_va[_i] = reqEditors[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, id)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetStatusByClientId")
|
|
}
|
|
|
|
var r0 *http.Response
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) (*http.Response, error)); ok {
|
|
return rf(ctx, id, reqEditors...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) *http.Response); ok {
|
|
r0 = rf(ctx, id, reqEditors...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*http.Response)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) error); ok {
|
|
r1 = rf(ctx, id, reqEditors...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockClientInterface_GetStatusByClientId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStatusByClientId'
|
|
type MockClientInterface_GetStatusByClientId_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetStatusByClientId is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - id queryapi.ClientID
|
|
// - reqEditors ...queryapi.RequestEditorFn
|
|
func (_e *MockClientInterface_Expecter) GetStatusByClientId(ctx interface{}, id interface{}, reqEditors ...interface{}) *MockClientInterface_GetStatusByClientId_Call {
|
|
return &MockClientInterface_GetStatusByClientId_Call{Call: _e.mock.On("GetStatusByClientId",
|
|
append([]interface{}{ctx, id}, reqEditors...)...)}
|
|
}
|
|
|
|
func (_c *MockClientInterface_GetStatusByClientId_Call) Run(run func(ctx context.Context, id queryapi.ClientID, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_GetStatusByClientId_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]queryapi.RequestEditorFn, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(queryapi.RequestEditorFn)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(queryapi.ClientID), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_GetStatusByClientId_Call) Return(_a0 *http.Response, _a1 error) *MockClientInterface_GetStatusByClientId_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_GetStatusByClientId_Call) RunAndReturn(run func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_GetStatusByClientId_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ListDocumentsByClientId provides a mock function with given fields: ctx, id, reqEditors
|
|
func (_m *MockClientInterface) ListDocumentsByClientId(ctx context.Context, id queryapi.ClientID, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) {
|
|
_va := make([]interface{}, len(reqEditors))
|
|
for _i := range reqEditors {
|
|
_va[_i] = reqEditors[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, id)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ListDocumentsByClientId")
|
|
}
|
|
|
|
var r0 *http.Response
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) (*http.Response, error)); ok {
|
|
return rf(ctx, id, reqEditors...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) *http.Response); ok {
|
|
r0 = rf(ctx, id, reqEditors...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*http.Response)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) error); ok {
|
|
r1 = rf(ctx, id, reqEditors...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockClientInterface_ListDocumentsByClientId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListDocumentsByClientId'
|
|
type MockClientInterface_ListDocumentsByClientId_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ListDocumentsByClientId is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - id queryapi.ClientID
|
|
// - reqEditors ...queryapi.RequestEditorFn
|
|
func (_e *MockClientInterface_Expecter) ListDocumentsByClientId(ctx interface{}, id interface{}, reqEditors ...interface{}) *MockClientInterface_ListDocumentsByClientId_Call {
|
|
return &MockClientInterface_ListDocumentsByClientId_Call{Call: _e.mock.On("ListDocumentsByClientId",
|
|
append([]interface{}{ctx, id}, reqEditors...)...)}
|
|
}
|
|
|
|
func (_c *MockClientInterface_ListDocumentsByClientId_Call) Run(run func(ctx context.Context, id queryapi.ClientID, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_ListDocumentsByClientId_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]queryapi.RequestEditorFn, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(queryapi.RequestEditorFn)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(queryapi.ClientID), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_ListDocumentsByClientId_Call) Return(_a0 *http.Response, _a1 error) *MockClientInterface_ListDocumentsByClientId_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_ListDocumentsByClientId_Call) RunAndReturn(run func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_ListDocumentsByClientId_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ListQueries provides a mock function with given fields: ctx, reqEditors
|
|
func (_m *MockClientInterface) ListQueries(ctx context.Context, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) {
|
|
_va := make([]interface{}, len(reqEditors))
|
|
for _i := range reqEditors {
|
|
_va[_i] = reqEditors[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ListQueries")
|
|
}
|
|
|
|
var r0 *http.Response
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, ...queryapi.RequestEditorFn) (*http.Response, error)); ok {
|
|
return rf(ctx, reqEditors...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, ...queryapi.RequestEditorFn) *http.Response); ok {
|
|
r0 = rf(ctx, reqEditors...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*http.Response)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, ...queryapi.RequestEditorFn) error); ok {
|
|
r1 = rf(ctx, reqEditors...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockClientInterface_ListQueries_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListQueries'
|
|
type MockClientInterface_ListQueries_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ListQueries is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - reqEditors ...queryapi.RequestEditorFn
|
|
func (_e *MockClientInterface_Expecter) ListQueries(ctx interface{}, reqEditors ...interface{}) *MockClientInterface_ListQueries_Call {
|
|
return &MockClientInterface_ListQueries_Call{Call: _e.mock.On("ListQueries",
|
|
append([]interface{}{ctx}, reqEditors...)...)}
|
|
}
|
|
|
|
func (_c *MockClientInterface_ListQueries_Call) Run(run func(ctx context.Context, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_ListQueries_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]queryapi.RequestEditorFn, len(args)-1)
|
|
for i, a := range args[1:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(queryapi.RequestEditorFn)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_ListQueries_Call) Return(_a0 *http.Response, _a1 error) *MockClientInterface_ListQueries_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_ListQueries_Call) RunAndReturn(run func(context.Context, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_ListQueries_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Login provides a mock function with given fields: ctx, reqEditors
|
|
func (_m *MockClientInterface) Login(ctx context.Context, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) {
|
|
_va := make([]interface{}, len(reqEditors))
|
|
for _i := range reqEditors {
|
|
_va[_i] = reqEditors[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Login")
|
|
}
|
|
|
|
var r0 *http.Response
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, ...queryapi.RequestEditorFn) (*http.Response, error)); ok {
|
|
return rf(ctx, reqEditors...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, ...queryapi.RequestEditorFn) *http.Response); ok {
|
|
r0 = rf(ctx, reqEditors...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*http.Response)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, ...queryapi.RequestEditorFn) error); ok {
|
|
r1 = rf(ctx, reqEditors...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockClientInterface_Login_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Login'
|
|
type MockClientInterface_Login_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Login is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - reqEditors ...queryapi.RequestEditorFn
|
|
func (_e *MockClientInterface_Expecter) Login(ctx interface{}, reqEditors ...interface{}) *MockClientInterface_Login_Call {
|
|
return &MockClientInterface_Login_Call{Call: _e.mock.On("Login",
|
|
append([]interface{}{ctx}, reqEditors...)...)}
|
|
}
|
|
|
|
func (_c *MockClientInterface_Login_Call) Run(run func(ctx context.Context, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_Login_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]queryapi.RequestEditorFn, len(args)-1)
|
|
for i, a := range args[1:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(queryapi.RequestEditorFn)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_Login_Call) Return(_a0 *http.Response, _a1 error) *MockClientInterface_Login_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_Login_Call) RunAndReturn(run func(context.Context, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_Login_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// LoginCallback provides a mock function with given fields: ctx, params, reqEditors
|
|
func (_m *MockClientInterface) LoginCallback(ctx context.Context, params *queryapi.LoginCallbackParams, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) {
|
|
_va := make([]interface{}, len(reqEditors))
|
|
for _i := range reqEditors {
|
|
_va[_i] = reqEditors[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, params)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for LoginCallback")
|
|
}
|
|
|
|
var r0 *http.Response
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *queryapi.LoginCallbackParams, ...queryapi.RequestEditorFn) (*http.Response, error)); ok {
|
|
return rf(ctx, params, reqEditors...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *queryapi.LoginCallbackParams, ...queryapi.RequestEditorFn) *http.Response); ok {
|
|
r0 = rf(ctx, params, reqEditors...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*http.Response)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *queryapi.LoginCallbackParams, ...queryapi.RequestEditorFn) error); ok {
|
|
r1 = rf(ctx, params, reqEditors...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockClientInterface_LoginCallback_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoginCallback'
|
|
type MockClientInterface_LoginCallback_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// LoginCallback is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - params *queryapi.LoginCallbackParams
|
|
// - reqEditors ...queryapi.RequestEditorFn
|
|
func (_e *MockClientInterface_Expecter) LoginCallback(ctx interface{}, params interface{}, reqEditors ...interface{}) *MockClientInterface_LoginCallback_Call {
|
|
return &MockClientInterface_LoginCallback_Call{Call: _e.mock.On("LoginCallback",
|
|
append([]interface{}{ctx, params}, reqEditors...)...)}
|
|
}
|
|
|
|
func (_c *MockClientInterface_LoginCallback_Call) Run(run func(ctx context.Context, params *queryapi.LoginCallbackParams, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_LoginCallback_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]queryapi.RequestEditorFn, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(queryapi.RequestEditorFn)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*queryapi.LoginCallbackParams), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_LoginCallback_Call) Return(_a0 *http.Response, _a1 error) *MockClientInterface_LoginCallback_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_LoginCallback_Call) RunAndReturn(run func(context.Context, *queryapi.LoginCallbackParams, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_LoginCallback_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Logout provides a mock function with given fields: ctx, reqEditors
|
|
func (_m *MockClientInterface) Logout(ctx context.Context, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) {
|
|
_va := make([]interface{}, len(reqEditors))
|
|
for _i := range reqEditors {
|
|
_va[_i] = reqEditors[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Logout")
|
|
}
|
|
|
|
var r0 *http.Response
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, ...queryapi.RequestEditorFn) (*http.Response, error)); ok {
|
|
return rf(ctx, reqEditors...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, ...queryapi.RequestEditorFn) *http.Response); ok {
|
|
r0 = rf(ctx, reqEditors...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*http.Response)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, ...queryapi.RequestEditorFn) error); ok {
|
|
r1 = rf(ctx, reqEditors...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockClientInterface_Logout_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Logout'
|
|
type MockClientInterface_Logout_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Logout is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - reqEditors ...queryapi.RequestEditorFn
|
|
func (_e *MockClientInterface_Expecter) Logout(ctx interface{}, reqEditors ...interface{}) *MockClientInterface_Logout_Call {
|
|
return &MockClientInterface_Logout_Call{Call: _e.mock.On("Logout",
|
|
append([]interface{}{ctx}, reqEditors...)...)}
|
|
}
|
|
|
|
func (_c *MockClientInterface_Logout_Call) Run(run func(ctx context.Context, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_Logout_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]queryapi.RequestEditorFn, len(args)-1)
|
|
for i, a := range args[1:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(queryapi.RequestEditorFn)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_Logout_Call) Return(_a0 *http.Response, _a1 error) *MockClientInterface_Logout_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_Logout_Call) RunAndReturn(run func(context.Context, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_Logout_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// SetCollectorByClientId provides a mock function with given fields: ctx, id, body, reqEditors
|
|
func (_m *MockClientInterface) SetCollectorByClientId(ctx context.Context, id queryapi.ClientID, body queryapi.SetCollectorByClientIdJSONRequestBody, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) {
|
|
_va := make([]interface{}, len(reqEditors))
|
|
for _i := range reqEditors {
|
|
_va[_i] = reqEditors[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, id, body)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SetCollectorByClientId")
|
|
}
|
|
|
|
var r0 *http.Response
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, queryapi.SetCollectorByClientIdJSONRequestBody, ...queryapi.RequestEditorFn) (*http.Response, error)); ok {
|
|
return rf(ctx, id, body, reqEditors...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, queryapi.SetCollectorByClientIdJSONRequestBody, ...queryapi.RequestEditorFn) *http.Response); ok {
|
|
r0 = rf(ctx, id, body, reqEditors...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*http.Response)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, queryapi.ClientID, queryapi.SetCollectorByClientIdJSONRequestBody, ...queryapi.RequestEditorFn) error); ok {
|
|
r1 = rf(ctx, id, body, reqEditors...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockClientInterface_SetCollectorByClientId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCollectorByClientId'
|
|
type MockClientInterface_SetCollectorByClientId_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// SetCollectorByClientId is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - id queryapi.ClientID
|
|
// - body queryapi.SetCollectorByClientIdJSONRequestBody
|
|
// - reqEditors ...queryapi.RequestEditorFn
|
|
func (_e *MockClientInterface_Expecter) SetCollectorByClientId(ctx interface{}, id interface{}, body interface{}, reqEditors ...interface{}) *MockClientInterface_SetCollectorByClientId_Call {
|
|
return &MockClientInterface_SetCollectorByClientId_Call{Call: _e.mock.On("SetCollectorByClientId",
|
|
append([]interface{}{ctx, id, body}, reqEditors...)...)}
|
|
}
|
|
|
|
func (_c *MockClientInterface_SetCollectorByClientId_Call) Run(run func(ctx context.Context, id queryapi.ClientID, body queryapi.SetCollectorByClientIdJSONRequestBody, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_SetCollectorByClientId_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]queryapi.RequestEditorFn, len(args)-3)
|
|
for i, a := range args[3:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(queryapi.RequestEditorFn)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(queryapi.ClientID), args[2].(queryapi.SetCollectorByClientIdJSONRequestBody), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_SetCollectorByClientId_Call) Return(_a0 *http.Response, _a1 error) *MockClientInterface_SetCollectorByClientId_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_SetCollectorByClientId_Call) RunAndReturn(run func(context.Context, queryapi.ClientID, queryapi.SetCollectorByClientIdJSONRequestBody, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_SetCollectorByClientId_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// SetCollectorByClientIdWithBody provides a mock function with given fields: ctx, id, contentType, body, reqEditors
|
|
func (_m *MockClientInterface) SetCollectorByClientIdWithBody(ctx context.Context, id queryapi.ClientID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) {
|
|
_va := make([]interface{}, len(reqEditors))
|
|
for _i := range reqEditors {
|
|
_va[_i] = reqEditors[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, id, contentType, body)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SetCollectorByClientIdWithBody")
|
|
}
|
|
|
|
var r0 *http.Response
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) (*http.Response, error)); ok {
|
|
return rf(ctx, id, contentType, body, reqEditors...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) *http.Response); ok {
|
|
r0 = rf(ctx, id, contentType, body, reqEditors...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*http.Response)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) error); ok {
|
|
r1 = rf(ctx, id, contentType, body, reqEditors...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockClientInterface_SetCollectorByClientIdWithBody_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCollectorByClientIdWithBody'
|
|
type MockClientInterface_SetCollectorByClientIdWithBody_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// SetCollectorByClientIdWithBody is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - id queryapi.ClientID
|
|
// - contentType string
|
|
// - body io.Reader
|
|
// - reqEditors ...queryapi.RequestEditorFn
|
|
func (_e *MockClientInterface_Expecter) SetCollectorByClientIdWithBody(ctx interface{}, id interface{}, contentType interface{}, body interface{}, reqEditors ...interface{}) *MockClientInterface_SetCollectorByClientIdWithBody_Call {
|
|
return &MockClientInterface_SetCollectorByClientIdWithBody_Call{Call: _e.mock.On("SetCollectorByClientIdWithBody",
|
|
append([]interface{}{ctx, id, contentType, body}, reqEditors...)...)}
|
|
}
|
|
|
|
func (_c *MockClientInterface_SetCollectorByClientIdWithBody_Call) Run(run func(ctx context.Context, id queryapi.ClientID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_SetCollectorByClientIdWithBody_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]queryapi.RequestEditorFn, len(args)-4)
|
|
for i, a := range args[4:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(queryapi.RequestEditorFn)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(queryapi.ClientID), args[2].(string), args[3].(io.Reader), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_SetCollectorByClientIdWithBody_Call) Return(_a0 *http.Response, _a1 error) *MockClientInterface_SetCollectorByClientIdWithBody_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_SetCollectorByClientIdWithBody_Call) RunAndReturn(run func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_SetCollectorByClientIdWithBody_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// TestQuery provides a mock function with given fields: ctx, id, body, reqEditors
|
|
func (_m *MockClientInterface) TestQuery(ctx context.Context, id queryapi.QueryID, body queryapi.TestQueryJSONRequestBody, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) {
|
|
_va := make([]interface{}, len(reqEditors))
|
|
for _i := range reqEditors {
|
|
_va[_i] = reqEditors[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, id, body)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for TestQuery")
|
|
}
|
|
|
|
var r0 *http.Response
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, queryapi.QueryID, queryapi.TestQueryJSONRequestBody, ...queryapi.RequestEditorFn) (*http.Response, error)); ok {
|
|
return rf(ctx, id, body, reqEditors...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, queryapi.QueryID, queryapi.TestQueryJSONRequestBody, ...queryapi.RequestEditorFn) *http.Response); ok {
|
|
r0 = rf(ctx, id, body, reqEditors...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*http.Response)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, queryapi.QueryID, queryapi.TestQueryJSONRequestBody, ...queryapi.RequestEditorFn) error); ok {
|
|
r1 = rf(ctx, id, body, reqEditors...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockClientInterface_TestQuery_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TestQuery'
|
|
type MockClientInterface_TestQuery_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// TestQuery is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - id queryapi.QueryID
|
|
// - body queryapi.TestQueryJSONRequestBody
|
|
// - reqEditors ...queryapi.RequestEditorFn
|
|
func (_e *MockClientInterface_Expecter) TestQuery(ctx interface{}, id interface{}, body interface{}, reqEditors ...interface{}) *MockClientInterface_TestQuery_Call {
|
|
return &MockClientInterface_TestQuery_Call{Call: _e.mock.On("TestQuery",
|
|
append([]interface{}{ctx, id, body}, reqEditors...)...)}
|
|
}
|
|
|
|
func (_c *MockClientInterface_TestQuery_Call) Run(run func(ctx context.Context, id queryapi.QueryID, body queryapi.TestQueryJSONRequestBody, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_TestQuery_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]queryapi.RequestEditorFn, len(args)-3)
|
|
for i, a := range args[3:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(queryapi.RequestEditorFn)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(queryapi.QueryID), args[2].(queryapi.TestQueryJSONRequestBody), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_TestQuery_Call) Return(_a0 *http.Response, _a1 error) *MockClientInterface_TestQuery_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_TestQuery_Call) RunAndReturn(run func(context.Context, queryapi.QueryID, queryapi.TestQueryJSONRequestBody, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_TestQuery_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// TestQueryWithBody provides a mock function with given fields: ctx, id, contentType, body, reqEditors
|
|
func (_m *MockClientInterface) TestQueryWithBody(ctx context.Context, id queryapi.QueryID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) {
|
|
_va := make([]interface{}, len(reqEditors))
|
|
for _i := range reqEditors {
|
|
_va[_i] = reqEditors[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, id, contentType, body)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for TestQueryWithBody")
|
|
}
|
|
|
|
var r0 *http.Response
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, queryapi.QueryID, string, io.Reader, ...queryapi.RequestEditorFn) (*http.Response, error)); ok {
|
|
return rf(ctx, id, contentType, body, reqEditors...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, queryapi.QueryID, string, io.Reader, ...queryapi.RequestEditorFn) *http.Response); ok {
|
|
r0 = rf(ctx, id, contentType, body, reqEditors...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*http.Response)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, queryapi.QueryID, string, io.Reader, ...queryapi.RequestEditorFn) error); ok {
|
|
r1 = rf(ctx, id, contentType, body, reqEditors...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockClientInterface_TestQueryWithBody_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TestQueryWithBody'
|
|
type MockClientInterface_TestQueryWithBody_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// TestQueryWithBody is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - id queryapi.QueryID
|
|
// - contentType string
|
|
// - body io.Reader
|
|
// - reqEditors ...queryapi.RequestEditorFn
|
|
func (_e *MockClientInterface_Expecter) TestQueryWithBody(ctx interface{}, id interface{}, contentType interface{}, body interface{}, reqEditors ...interface{}) *MockClientInterface_TestQueryWithBody_Call {
|
|
return &MockClientInterface_TestQueryWithBody_Call{Call: _e.mock.On("TestQueryWithBody",
|
|
append([]interface{}{ctx, id, contentType, body}, reqEditors...)...)}
|
|
}
|
|
|
|
func (_c *MockClientInterface_TestQueryWithBody_Call) Run(run func(ctx context.Context, id queryapi.QueryID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_TestQueryWithBody_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]queryapi.RequestEditorFn, len(args)-4)
|
|
for i, a := range args[4:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(queryapi.RequestEditorFn)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(queryapi.QueryID), args[2].(string), args[3].(io.Reader), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_TestQueryWithBody_Call) Return(_a0 *http.Response, _a1 error) *MockClientInterface_TestQueryWithBody_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_TestQueryWithBody_Call) RunAndReturn(run func(context.Context, queryapi.QueryID, string, io.Reader, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_TestQueryWithBody_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// TriggerExport provides a mock function with given fields: ctx, id, body, reqEditors
|
|
func (_m *MockClientInterface) TriggerExport(ctx context.Context, id queryapi.ClientID, body queryapi.TriggerExportJSONRequestBody, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) {
|
|
_va := make([]interface{}, len(reqEditors))
|
|
for _i := range reqEditors {
|
|
_va[_i] = reqEditors[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, id, body)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for TriggerExport")
|
|
}
|
|
|
|
var r0 *http.Response
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, queryapi.TriggerExportJSONRequestBody, ...queryapi.RequestEditorFn) (*http.Response, error)); ok {
|
|
return rf(ctx, id, body, reqEditors...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, queryapi.TriggerExportJSONRequestBody, ...queryapi.RequestEditorFn) *http.Response); ok {
|
|
r0 = rf(ctx, id, body, reqEditors...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*http.Response)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, queryapi.ClientID, queryapi.TriggerExportJSONRequestBody, ...queryapi.RequestEditorFn) error); ok {
|
|
r1 = rf(ctx, id, body, reqEditors...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockClientInterface_TriggerExport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TriggerExport'
|
|
type MockClientInterface_TriggerExport_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// TriggerExport is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - id queryapi.ClientID
|
|
// - body queryapi.TriggerExportJSONRequestBody
|
|
// - reqEditors ...queryapi.RequestEditorFn
|
|
func (_e *MockClientInterface_Expecter) TriggerExport(ctx interface{}, id interface{}, body interface{}, reqEditors ...interface{}) *MockClientInterface_TriggerExport_Call {
|
|
return &MockClientInterface_TriggerExport_Call{Call: _e.mock.On("TriggerExport",
|
|
append([]interface{}{ctx, id, body}, reqEditors...)...)}
|
|
}
|
|
|
|
func (_c *MockClientInterface_TriggerExport_Call) Run(run func(ctx context.Context, id queryapi.ClientID, body queryapi.TriggerExportJSONRequestBody, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_TriggerExport_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]queryapi.RequestEditorFn, len(args)-3)
|
|
for i, a := range args[3:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(queryapi.RequestEditorFn)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(queryapi.ClientID), args[2].(queryapi.TriggerExportJSONRequestBody), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_TriggerExport_Call) Return(_a0 *http.Response, _a1 error) *MockClientInterface_TriggerExport_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_TriggerExport_Call) RunAndReturn(run func(context.Context, queryapi.ClientID, queryapi.TriggerExportJSONRequestBody, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_TriggerExport_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// TriggerExportWithBody provides a mock function with given fields: ctx, id, contentType, body, reqEditors
|
|
func (_m *MockClientInterface) TriggerExportWithBody(ctx context.Context, id queryapi.ClientID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) {
|
|
_va := make([]interface{}, len(reqEditors))
|
|
for _i := range reqEditors {
|
|
_va[_i] = reqEditors[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, id, contentType, body)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for TriggerExportWithBody")
|
|
}
|
|
|
|
var r0 *http.Response
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) (*http.Response, error)); ok {
|
|
return rf(ctx, id, contentType, body, reqEditors...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) *http.Response); ok {
|
|
r0 = rf(ctx, id, contentType, body, reqEditors...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*http.Response)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) error); ok {
|
|
r1 = rf(ctx, id, contentType, body, reqEditors...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockClientInterface_TriggerExportWithBody_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TriggerExportWithBody'
|
|
type MockClientInterface_TriggerExportWithBody_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// TriggerExportWithBody is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - id queryapi.ClientID
|
|
// - contentType string
|
|
// - body io.Reader
|
|
// - reqEditors ...queryapi.RequestEditorFn
|
|
func (_e *MockClientInterface_Expecter) TriggerExportWithBody(ctx interface{}, id interface{}, contentType interface{}, body interface{}, reqEditors ...interface{}) *MockClientInterface_TriggerExportWithBody_Call {
|
|
return &MockClientInterface_TriggerExportWithBody_Call{Call: _e.mock.On("TriggerExportWithBody",
|
|
append([]interface{}{ctx, id, contentType, body}, reqEditors...)...)}
|
|
}
|
|
|
|
func (_c *MockClientInterface_TriggerExportWithBody_Call) Run(run func(ctx context.Context, id queryapi.ClientID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_TriggerExportWithBody_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]queryapi.RequestEditorFn, len(args)-4)
|
|
for i, a := range args[4:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(queryapi.RequestEditorFn)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(queryapi.ClientID), args[2].(string), args[3].(io.Reader), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_TriggerExportWithBody_Call) Return(_a0 *http.Response, _a1 error) *MockClientInterface_TriggerExportWithBody_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_TriggerExportWithBody_Call) RunAndReturn(run func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_TriggerExportWithBody_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// UpdateClient provides a mock function with given fields: ctx, id, body, reqEditors
|
|
func (_m *MockClientInterface) UpdateClient(ctx context.Context, id queryapi.ClientID, body queryapi.UpdateClientJSONRequestBody, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) {
|
|
_va := make([]interface{}, len(reqEditors))
|
|
for _i := range reqEditors {
|
|
_va[_i] = reqEditors[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, id, body)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for UpdateClient")
|
|
}
|
|
|
|
var r0 *http.Response
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, queryapi.UpdateClientJSONRequestBody, ...queryapi.RequestEditorFn) (*http.Response, error)); ok {
|
|
return rf(ctx, id, body, reqEditors...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, queryapi.UpdateClientJSONRequestBody, ...queryapi.RequestEditorFn) *http.Response); ok {
|
|
r0 = rf(ctx, id, body, reqEditors...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*http.Response)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, queryapi.ClientID, queryapi.UpdateClientJSONRequestBody, ...queryapi.RequestEditorFn) error); ok {
|
|
r1 = rf(ctx, id, body, reqEditors...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockClientInterface_UpdateClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateClient'
|
|
type MockClientInterface_UpdateClient_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// UpdateClient is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - id queryapi.ClientID
|
|
// - body queryapi.UpdateClientJSONRequestBody
|
|
// - reqEditors ...queryapi.RequestEditorFn
|
|
func (_e *MockClientInterface_Expecter) UpdateClient(ctx interface{}, id interface{}, body interface{}, reqEditors ...interface{}) *MockClientInterface_UpdateClient_Call {
|
|
return &MockClientInterface_UpdateClient_Call{Call: _e.mock.On("UpdateClient",
|
|
append([]interface{}{ctx, id, body}, reqEditors...)...)}
|
|
}
|
|
|
|
func (_c *MockClientInterface_UpdateClient_Call) Run(run func(ctx context.Context, id queryapi.ClientID, body queryapi.UpdateClientJSONRequestBody, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_UpdateClient_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]queryapi.RequestEditorFn, len(args)-3)
|
|
for i, a := range args[3:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(queryapi.RequestEditorFn)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(queryapi.ClientID), args[2].(queryapi.UpdateClientJSONRequestBody), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_UpdateClient_Call) Return(_a0 *http.Response, _a1 error) *MockClientInterface_UpdateClient_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_UpdateClient_Call) RunAndReturn(run func(context.Context, queryapi.ClientID, queryapi.UpdateClientJSONRequestBody, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_UpdateClient_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// UpdateClientWithBody provides a mock function with given fields: ctx, id, contentType, body, reqEditors
|
|
func (_m *MockClientInterface) UpdateClientWithBody(ctx context.Context, id queryapi.ClientID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) {
|
|
_va := make([]interface{}, len(reqEditors))
|
|
for _i := range reqEditors {
|
|
_va[_i] = reqEditors[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, id, contentType, body)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for UpdateClientWithBody")
|
|
}
|
|
|
|
var r0 *http.Response
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) (*http.Response, error)); ok {
|
|
return rf(ctx, id, contentType, body, reqEditors...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) *http.Response); ok {
|
|
r0 = rf(ctx, id, contentType, body, reqEditors...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*http.Response)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) error); ok {
|
|
r1 = rf(ctx, id, contentType, body, reqEditors...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockClientInterface_UpdateClientWithBody_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateClientWithBody'
|
|
type MockClientInterface_UpdateClientWithBody_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// UpdateClientWithBody is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - id queryapi.ClientID
|
|
// - contentType string
|
|
// - body io.Reader
|
|
// - reqEditors ...queryapi.RequestEditorFn
|
|
func (_e *MockClientInterface_Expecter) UpdateClientWithBody(ctx interface{}, id interface{}, contentType interface{}, body interface{}, reqEditors ...interface{}) *MockClientInterface_UpdateClientWithBody_Call {
|
|
return &MockClientInterface_UpdateClientWithBody_Call{Call: _e.mock.On("UpdateClientWithBody",
|
|
append([]interface{}{ctx, id, contentType, body}, reqEditors...)...)}
|
|
}
|
|
|
|
func (_c *MockClientInterface_UpdateClientWithBody_Call) Run(run func(ctx context.Context, id queryapi.ClientID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_UpdateClientWithBody_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]queryapi.RequestEditorFn, len(args)-4)
|
|
for i, a := range args[4:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(queryapi.RequestEditorFn)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(queryapi.ClientID), args[2].(string), args[3].(io.Reader), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_UpdateClientWithBody_Call) Return(_a0 *http.Response, _a1 error) *MockClientInterface_UpdateClientWithBody_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_UpdateClientWithBody_Call) RunAndReturn(run func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_UpdateClientWithBody_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// UpdateQuery provides a mock function with given fields: ctx, id, body, reqEditors
|
|
func (_m *MockClientInterface) UpdateQuery(ctx context.Context, id queryapi.QueryID, body queryapi.UpdateQueryJSONRequestBody, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) {
|
|
_va := make([]interface{}, len(reqEditors))
|
|
for _i := range reqEditors {
|
|
_va[_i] = reqEditors[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, id, body)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for UpdateQuery")
|
|
}
|
|
|
|
var r0 *http.Response
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, queryapi.QueryID, queryapi.UpdateQueryJSONRequestBody, ...queryapi.RequestEditorFn) (*http.Response, error)); ok {
|
|
return rf(ctx, id, body, reqEditors...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, queryapi.QueryID, queryapi.UpdateQueryJSONRequestBody, ...queryapi.RequestEditorFn) *http.Response); ok {
|
|
r0 = rf(ctx, id, body, reqEditors...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*http.Response)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, queryapi.QueryID, queryapi.UpdateQueryJSONRequestBody, ...queryapi.RequestEditorFn) error); ok {
|
|
r1 = rf(ctx, id, body, reqEditors...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockClientInterface_UpdateQuery_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateQuery'
|
|
type MockClientInterface_UpdateQuery_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// UpdateQuery is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - id queryapi.QueryID
|
|
// - body queryapi.UpdateQueryJSONRequestBody
|
|
// - reqEditors ...queryapi.RequestEditorFn
|
|
func (_e *MockClientInterface_Expecter) UpdateQuery(ctx interface{}, id interface{}, body interface{}, reqEditors ...interface{}) *MockClientInterface_UpdateQuery_Call {
|
|
return &MockClientInterface_UpdateQuery_Call{Call: _e.mock.On("UpdateQuery",
|
|
append([]interface{}{ctx, id, body}, reqEditors...)...)}
|
|
}
|
|
|
|
func (_c *MockClientInterface_UpdateQuery_Call) Run(run func(ctx context.Context, id queryapi.QueryID, body queryapi.UpdateQueryJSONRequestBody, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_UpdateQuery_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]queryapi.RequestEditorFn, len(args)-3)
|
|
for i, a := range args[3:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(queryapi.RequestEditorFn)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(queryapi.QueryID), args[2].(queryapi.UpdateQueryJSONRequestBody), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_UpdateQuery_Call) Return(_a0 *http.Response, _a1 error) *MockClientInterface_UpdateQuery_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_UpdateQuery_Call) RunAndReturn(run func(context.Context, queryapi.QueryID, queryapi.UpdateQueryJSONRequestBody, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_UpdateQuery_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// UpdateQueryWithBody provides a mock function with given fields: ctx, id, contentType, body, reqEditors
|
|
func (_m *MockClientInterface) UpdateQueryWithBody(ctx context.Context, id queryapi.QueryID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) {
|
|
_va := make([]interface{}, len(reqEditors))
|
|
for _i := range reqEditors {
|
|
_va[_i] = reqEditors[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, id, contentType, body)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for UpdateQueryWithBody")
|
|
}
|
|
|
|
var r0 *http.Response
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, queryapi.QueryID, string, io.Reader, ...queryapi.RequestEditorFn) (*http.Response, error)); ok {
|
|
return rf(ctx, id, contentType, body, reqEditors...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, queryapi.QueryID, string, io.Reader, ...queryapi.RequestEditorFn) *http.Response); ok {
|
|
r0 = rf(ctx, id, contentType, body, reqEditors...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*http.Response)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, queryapi.QueryID, string, io.Reader, ...queryapi.RequestEditorFn) error); ok {
|
|
r1 = rf(ctx, id, contentType, body, reqEditors...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockClientInterface_UpdateQueryWithBody_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateQueryWithBody'
|
|
type MockClientInterface_UpdateQueryWithBody_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// UpdateQueryWithBody is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - id queryapi.QueryID
|
|
// - contentType string
|
|
// - body io.Reader
|
|
// - reqEditors ...queryapi.RequestEditorFn
|
|
func (_e *MockClientInterface_Expecter) UpdateQueryWithBody(ctx interface{}, id interface{}, contentType interface{}, body interface{}, reqEditors ...interface{}) *MockClientInterface_UpdateQueryWithBody_Call {
|
|
return &MockClientInterface_UpdateQueryWithBody_Call{Call: _e.mock.On("UpdateQueryWithBody",
|
|
append([]interface{}{ctx, id, contentType, body}, reqEditors...)...)}
|
|
}
|
|
|
|
func (_c *MockClientInterface_UpdateQueryWithBody_Call) Run(run func(ctx context.Context, id queryapi.QueryID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_UpdateQueryWithBody_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]queryapi.RequestEditorFn, len(args)-4)
|
|
for i, a := range args[4:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(queryapi.RequestEditorFn)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(queryapi.QueryID), args[2].(string), args[3].(io.Reader), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_UpdateQueryWithBody_Call) Return(_a0 *http.Response, _a1 error) *MockClientInterface_UpdateQueryWithBody_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClientInterface_UpdateQueryWithBody_Call) RunAndReturn(run func(context.Context, queryapi.QueryID, string, io.Reader, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_UpdateQueryWithBody_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// NewMockClientInterface creates a new instance of MockClientInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
|
// The first argument is typically a *testing.T value.
|
|
func NewMockClientInterface(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *MockClientInterface {
|
|
mock := &MockClientInterface{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|