Merged in feature/remove-query (pull request #201)
remove query from codebase part 1 * remove query * fix localstack run
This commit is contained in:
@@ -924,155 +924,6 @@ func (_c *MockClientInterface_CreateFolderWithBody_Call) RunAndReturn(run func(c
|
||||
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
|
||||
}
|
||||
|
||||
// DeleteAdminUser provides a mock function with given fields: ctx, email, params, reqEditors
|
||||
func (_m *MockClientInterface) DeleteAdminUser(ctx context.Context, email queryapi.UserEmail, params *queryapi.DeleteAdminUserParams, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) {
|
||||
_va := make([]interface{}, len(reqEditors))
|
||||
@@ -2408,80 +2259,6 @@ func (_c *MockClientInterface_GetIdentity_Call) RunAndReturn(run func(context.Co
|
||||
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))
|
||||
@@ -2927,79 +2704,6 @@ func (_c *MockClientInterface_ListDocumentsByClientId_Call) RunAndReturn(run fun
|
||||
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))
|
||||
@@ -3522,157 +3226,6 @@ func (_c *MockClientInterface_SetCollectorByClientIdWithBody_Call) RunAndReturn(
|
||||
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))
|
||||
@@ -4126,157 +3679,6 @@ func (_c *MockClientInterface_UpdateClientWithBody_Call) RunAndReturn(run func(c
|
||||
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
|
||||
}
|
||||
|
||||
// UploadDocumentBatchWithBody provides a mock function with given fields: ctx, id, contentType, body, reqEditors
|
||||
func (_m *MockClientInterface) UploadDocumentBatchWithBody(ctx context.Context, id queryapi.ClientID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) {
|
||||
_va := make([]interface{}, len(reqEditors))
|
||||
|
||||
Reference in New Issue
Block a user