
* basic list, create, and invoke working * all commands working * added support for create script body from file and invoke params from file * linter cleanup * update defaults to existing parameters if not provided * updated generated mock files, added mock files for scripts, added basic script create test * added mock script list * cleanup pass, fixed not using params in list call * added update mock test * fixed mock tests requiring go 1.18 * updated openapi, integrated overrides upstream, added new override to fix codegen bug * added nil check * fixed routes
173 lines
7.0 KiB
Go
173 lines
7.0 KiB
Go
// Code generated by MockGen. DO NOT EDIT.
|
|
// Source: github.com/influxdata/influx-cli/v2/api (interfaces: BackupApi)
|
|
|
|
// Package mock is a generated GoMock package.
|
|
package mock
|
|
|
|
import (
|
|
context "context"
|
|
http "net/http"
|
|
reflect "reflect"
|
|
|
|
gomock "github.com/golang/mock/gomock"
|
|
api "github.com/influxdata/influx-cli/v2/api"
|
|
)
|
|
|
|
// MockBackupApi is a mock of BackupApi interface.
|
|
type MockBackupApi struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockBackupApiMockRecorder
|
|
}
|
|
|
|
// MockBackupApiMockRecorder is the mock recorder for MockBackupApi.
|
|
type MockBackupApiMockRecorder struct {
|
|
mock *MockBackupApi
|
|
}
|
|
|
|
// NewMockBackupApi creates a new mock instance.
|
|
func NewMockBackupApi(ctrl *gomock.Controller) *MockBackupApi {
|
|
mock := &MockBackupApi{ctrl: ctrl}
|
|
mock.recorder = &MockBackupApiMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockBackupApi) EXPECT() *MockBackupApiMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// GetBackupKV mocks base method.
|
|
func (m *MockBackupApi) GetBackupKV(arg0 context.Context) api.ApiGetBackupKVRequest {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetBackupKV", arg0)
|
|
ret0, _ := ret[0].(api.ApiGetBackupKVRequest)
|
|
return ret0
|
|
}
|
|
|
|
// GetBackupKV indicates an expected call of GetBackupKV.
|
|
func (mr *MockBackupApiMockRecorder) GetBackupKV(arg0 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBackupKV", reflect.TypeOf((*MockBackupApi)(nil).GetBackupKV), arg0)
|
|
}
|
|
|
|
// GetBackupKVExecute mocks base method.
|
|
func (m *MockBackupApi) GetBackupKVExecute(arg0 api.ApiGetBackupKVRequest) (*http.Response, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetBackupKVExecute", arg0)
|
|
ret0, _ := ret[0].(*http.Response)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// GetBackupKVExecute indicates an expected call of GetBackupKVExecute.
|
|
func (mr *MockBackupApiMockRecorder) GetBackupKVExecute(arg0 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBackupKVExecute", reflect.TypeOf((*MockBackupApi)(nil).GetBackupKVExecute), arg0)
|
|
}
|
|
|
|
// GetBackupKVExecuteWithHttpInfo mocks base method.
|
|
func (m *MockBackupApi) GetBackupKVExecuteWithHttpInfo(arg0 api.ApiGetBackupKVRequest) (*http.Response, *http.Response, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetBackupKVExecuteWithHttpInfo", arg0)
|
|
ret0, _ := ret[0].(*http.Response)
|
|
ret1, _ := ret[1].(*http.Response)
|
|
ret2, _ := ret[2].(error)
|
|
return ret0, ret1, ret2
|
|
}
|
|
|
|
// GetBackupKVExecuteWithHttpInfo indicates an expected call of GetBackupKVExecuteWithHttpInfo.
|
|
func (mr *MockBackupApiMockRecorder) GetBackupKVExecuteWithHttpInfo(arg0 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBackupKVExecuteWithHttpInfo", reflect.TypeOf((*MockBackupApi)(nil).GetBackupKVExecuteWithHttpInfo), arg0)
|
|
}
|
|
|
|
// GetBackupMetadata mocks base method.
|
|
func (m *MockBackupApi) GetBackupMetadata(arg0 context.Context) api.ApiGetBackupMetadataRequest {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetBackupMetadata", arg0)
|
|
ret0, _ := ret[0].(api.ApiGetBackupMetadataRequest)
|
|
return ret0
|
|
}
|
|
|
|
// GetBackupMetadata indicates an expected call of GetBackupMetadata.
|
|
func (mr *MockBackupApiMockRecorder) GetBackupMetadata(arg0 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBackupMetadata", reflect.TypeOf((*MockBackupApi)(nil).GetBackupMetadata), arg0)
|
|
}
|
|
|
|
// GetBackupMetadataExecute mocks base method.
|
|
func (m *MockBackupApi) GetBackupMetadataExecute(arg0 api.ApiGetBackupMetadataRequest) (*http.Response, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetBackupMetadataExecute", arg0)
|
|
ret0, _ := ret[0].(*http.Response)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// GetBackupMetadataExecute indicates an expected call of GetBackupMetadataExecute.
|
|
func (mr *MockBackupApiMockRecorder) GetBackupMetadataExecute(arg0 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBackupMetadataExecute", reflect.TypeOf((*MockBackupApi)(nil).GetBackupMetadataExecute), arg0)
|
|
}
|
|
|
|
// GetBackupMetadataExecuteWithHttpInfo mocks base method.
|
|
func (m *MockBackupApi) GetBackupMetadataExecuteWithHttpInfo(arg0 api.ApiGetBackupMetadataRequest) (*http.Response, *http.Response, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetBackupMetadataExecuteWithHttpInfo", arg0)
|
|
ret0, _ := ret[0].(*http.Response)
|
|
ret1, _ := ret[1].(*http.Response)
|
|
ret2, _ := ret[2].(error)
|
|
return ret0, ret1, ret2
|
|
}
|
|
|
|
// GetBackupMetadataExecuteWithHttpInfo indicates an expected call of GetBackupMetadataExecuteWithHttpInfo.
|
|
func (mr *MockBackupApiMockRecorder) GetBackupMetadataExecuteWithHttpInfo(arg0 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBackupMetadataExecuteWithHttpInfo", reflect.TypeOf((*MockBackupApi)(nil).GetBackupMetadataExecuteWithHttpInfo), arg0)
|
|
}
|
|
|
|
// GetBackupShardId mocks base method.
|
|
func (m *MockBackupApi) GetBackupShardId(arg0 context.Context, arg1 int64) api.ApiGetBackupShardIdRequest {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetBackupShardId", arg0, arg1)
|
|
ret0, _ := ret[0].(api.ApiGetBackupShardIdRequest)
|
|
return ret0
|
|
}
|
|
|
|
// GetBackupShardId indicates an expected call of GetBackupShardId.
|
|
func (mr *MockBackupApiMockRecorder) GetBackupShardId(arg0, arg1 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBackupShardId", reflect.TypeOf((*MockBackupApi)(nil).GetBackupShardId), arg0, arg1)
|
|
}
|
|
|
|
// GetBackupShardIdExecute mocks base method.
|
|
func (m *MockBackupApi) GetBackupShardIdExecute(arg0 api.ApiGetBackupShardIdRequest) (*http.Response, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetBackupShardIdExecute", arg0)
|
|
ret0, _ := ret[0].(*http.Response)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// GetBackupShardIdExecute indicates an expected call of GetBackupShardIdExecute.
|
|
func (mr *MockBackupApiMockRecorder) GetBackupShardIdExecute(arg0 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBackupShardIdExecute", reflect.TypeOf((*MockBackupApi)(nil).GetBackupShardIdExecute), arg0)
|
|
}
|
|
|
|
// GetBackupShardIdExecuteWithHttpInfo mocks base method.
|
|
func (m *MockBackupApi) GetBackupShardIdExecuteWithHttpInfo(arg0 api.ApiGetBackupShardIdRequest) (*http.Response, *http.Response, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetBackupShardIdExecuteWithHttpInfo", arg0)
|
|
ret0, _ := ret[0].(*http.Response)
|
|
ret1, _ := ret[1].(*http.Response)
|
|
ret2, _ := ret[2].(error)
|
|
return ret0, ret1, ret2
|
|
}
|
|
|
|
// GetBackupShardIdExecuteWithHttpInfo indicates an expected call of GetBackupShardIdExecuteWithHttpInfo.
|
|
func (mr *MockBackupApiMockRecorder) GetBackupShardIdExecuteWithHttpInfo(arg0 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBackupShardIdExecuteWithHttpInfo", reflect.TypeOf((*MockBackupApi)(nil).GetBackupShardIdExecuteWithHttpInfo), arg0)
|
|
}
|