influxdb/mock/backup_service.go

269 lines
9.7 KiB
Go

// Code generated by MockGen. DO NOT EDIT.
// Source: backup.go
// Package mock is a generated GoMock package.
package mock
import (
context "context"
io "io"
reflect "reflect"
time "time"
gomock "github.com/golang/mock/gomock"
platform "github.com/influxdata/influxdb/v2/kit/platform"
)
// MockBackupService is a mock of BackupService interface.
type MockBackupService struct {
ctrl *gomock.Controller
recorder *MockBackupServiceMockRecorder
}
// MockBackupServiceMockRecorder is the mock recorder for MockBackupService.
type MockBackupServiceMockRecorder struct {
mock *MockBackupService
}
// NewMockBackupService creates a new mock instance.
func NewMockBackupService(ctrl *gomock.Controller) *MockBackupService {
mock := &MockBackupService{ctrl: ctrl}
mock.recorder = &MockBackupServiceMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockBackupService) EXPECT() *MockBackupServiceMockRecorder {
return m.recorder
}
// BackupKVStore mocks base method.
func (m *MockBackupService) BackupKVStore(ctx context.Context, w io.Writer) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "BackupKVStore", ctx, w)
ret0, _ := ret[0].(error)
return ret0
}
// BackupKVStore indicates an expected call of BackupKVStore.
func (mr *MockBackupServiceMockRecorder) BackupKVStore(ctx, w interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BackupKVStore", reflect.TypeOf((*MockBackupService)(nil).BackupKVStore), ctx, w)
}
// BackupShard mocks base method.
func (m *MockBackupService) BackupShard(ctx context.Context, w io.Writer, shardID uint64, since time.Time) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "BackupShard", ctx, w, shardID, since)
ret0, _ := ret[0].(error)
return ret0
}
// BackupShard indicates an expected call of BackupShard.
func (mr *MockBackupServiceMockRecorder) BackupShard(ctx, w, shardID, since interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BackupShard", reflect.TypeOf((*MockBackupService)(nil).BackupShard), ctx, w, shardID, since)
}
// LockKVStore mocks base method.
func (m *MockBackupService) RLockKVStore() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "RLockKVStore")
}
// LockKVStore indicates an expected call of LockKVStore.
func (mr *MockBackupServiceMockRecorder) RLockKVStore() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RLockKVStore", reflect.TypeOf((*MockBackupService)(nil).RLockKVStore))
}
// UnlockKVStore mocks base method.
func (m *MockBackupService) RUnlockKVStore() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "RUnlockKVStore")
}
// UnlockKVStore indicates an expected call of UnlockKVStore.
func (mr *MockBackupServiceMockRecorder) UnlockKVStore() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RUnlockKVStore", reflect.TypeOf((*MockBackupService)(nil).RUnlockKVStore))
}
// MockSqlBackupRestoreService is a mock of SqlBackupRestoreService interface.
type MockSqlBackupRestoreService struct {
ctrl *gomock.Controller
recorder *MockSqlBackupRestoreServiceMockRecorder
}
// MockSqlBackupRestoreServiceMockRecorder is the mock recorder for MockSqlBackupRestoreService.
type MockSqlBackupRestoreServiceMockRecorder struct {
mock *MockSqlBackupRestoreService
}
// NewMockSqlBackupRestoreService creates a new mock instance.
func NewMockSqlBackupRestoreService(ctrl *gomock.Controller) *MockSqlBackupRestoreService {
mock := &MockSqlBackupRestoreService{ctrl: ctrl}
mock.recorder = &MockSqlBackupRestoreServiceMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockSqlBackupRestoreService) EXPECT() *MockSqlBackupRestoreServiceMockRecorder {
return m.recorder
}
// BackupSqlStore mocks base method.
func (m *MockSqlBackupRestoreService) BackupSqlStore(ctx context.Context, w io.Writer) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "BackupSqlStore", ctx, w)
ret0, _ := ret[0].(error)
return ret0
}
// BackupSqlStore indicates an expected call of BackupSqlStore.
func (mr *MockSqlBackupRestoreServiceMockRecorder) BackupSqlStore(ctx, w interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BackupSqlStore", reflect.TypeOf((*MockSqlBackupRestoreService)(nil).BackupSqlStore), ctx, w)
}
// LockSqlStore mocks base method.
func (m *MockSqlBackupRestoreService) RLockSqlStore() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "RLockSqlStore")
}
// LockSqlStore indicates an expected call of LockSqlStore.
func (mr *MockSqlBackupRestoreServiceMockRecorder) RLockSqlStore() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RLockSqlStore", reflect.TypeOf((*MockSqlBackupRestoreService)(nil).RLockSqlStore))
}
// RestoreSqlStore mocks base method.
func (m *MockSqlBackupRestoreService) RestoreSqlStore(ctx context.Context, r io.Reader) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RestoreSqlStore", ctx, r)
ret0, _ := ret[0].(error)
return ret0
}
// RestoreSqlStore indicates an expected call of RestoreSqlStore.
func (mr *MockSqlBackupRestoreServiceMockRecorder) RestoreSqlStore(ctx, r interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RestoreSqlStore", reflect.TypeOf((*MockSqlBackupRestoreService)(nil).RestoreSqlStore), ctx, r)
}
// UnlockSqlStore mocks base method.
func (m *MockSqlBackupRestoreService) RUnlockSqlStore() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "RUnlockSqlStore")
}
// UnlockSqlStore indicates an expected call of UnlockSqlStore.
func (mr *MockSqlBackupRestoreServiceMockRecorder) RUnlockSqlStore() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RUnlockSqlStore", reflect.TypeOf((*MockSqlBackupRestoreService)(nil).RUnlockSqlStore))
}
// MockBucketManifestWriter is a mock of BucketManifestWriter interface.
type MockBucketManifestWriter struct {
ctrl *gomock.Controller
recorder *MockBucketManifestWriterMockRecorder
}
// MockBucketManifestWriterMockRecorder is the mock recorder for MockBucketManifestWriter.
type MockBucketManifestWriterMockRecorder struct {
mock *MockBucketManifestWriter
}
// NewMockBucketManifestWriter creates a new mock instance.
func NewMockBucketManifestWriter(ctrl *gomock.Controller) *MockBucketManifestWriter {
mock := &MockBucketManifestWriter{ctrl: ctrl}
mock.recorder = &MockBucketManifestWriterMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockBucketManifestWriter) EXPECT() *MockBucketManifestWriterMockRecorder {
return m.recorder
}
// WriteManifest mocks base method.
func (m *MockBucketManifestWriter) WriteManifest(ctx context.Context, w io.Writer) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "WriteManifest", ctx, w)
ret0, _ := ret[0].(error)
return ret0
}
// WriteManifest indicates an expected call of WriteManifest.
func (mr *MockBucketManifestWriterMockRecorder) WriteManifest(ctx, w interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteManifest", reflect.TypeOf((*MockBucketManifestWriter)(nil).WriteManifest), ctx, w)
}
// MockRestoreService is a mock of RestoreService interface.
type MockRestoreService struct {
ctrl *gomock.Controller
recorder *MockRestoreServiceMockRecorder
}
// MockRestoreServiceMockRecorder is the mock recorder for MockRestoreService.
type MockRestoreServiceMockRecorder struct {
mock *MockRestoreService
}
// NewMockRestoreService creates a new mock instance.
func NewMockRestoreService(ctrl *gomock.Controller) *MockRestoreService {
mock := &MockRestoreService{ctrl: ctrl}
mock.recorder = &MockRestoreServiceMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockRestoreService) EXPECT() *MockRestoreServiceMockRecorder {
return m.recorder
}
// RestoreBucket mocks base method.
func (m *MockRestoreService) RestoreBucket(ctx context.Context, id platform.ID, rpiData []byte) (map[uint64]uint64, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RestoreBucket", ctx, id, rpiData)
ret0, _ := ret[0].(map[uint64]uint64)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// RestoreBucket indicates an expected call of RestoreBucket.
func (mr *MockRestoreServiceMockRecorder) RestoreBucket(ctx, id, rpiData interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RestoreBucket", reflect.TypeOf((*MockRestoreService)(nil).RestoreBucket), ctx, id, rpiData)
}
// RestoreKVStore mocks base method.
func (m *MockRestoreService) RestoreKVStore(ctx context.Context, r io.Reader) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RestoreKVStore", ctx, r)
ret0, _ := ret[0].(error)
return ret0
}
// RestoreKVStore indicates an expected call of RestoreKVStore.
func (mr *MockRestoreServiceMockRecorder) RestoreKVStore(ctx, r interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RestoreKVStore", reflect.TypeOf((*MockRestoreService)(nil).RestoreKVStore), ctx, r)
}
// RestoreShard mocks base method.
func (m *MockRestoreService) RestoreShard(ctx context.Context, shardID uint64, r io.Reader) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RestoreShard", ctx, shardID, r)
ret0, _ := ret[0].(error)
return ret0
}
// RestoreShard indicates an expected call of RestoreShard.
func (mr *MockRestoreServiceMockRecorder) RestoreShard(ctx, shardID, r interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RestoreShard", reflect.TypeOf((*MockRestoreService)(nil).RestoreShard), ctx, shardID, r)
}