mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-05 13:05:17 +00:00
159 lines
3.6 KiB
Go
159 lines
3.6 KiB
Go
// Code generated by mockery v1.0.0
|
|
package mocks
|
|
|
|
import io "io"
|
|
import mock "github.com/stretchr/testify/mock"
|
|
|
|
import v1 "github.com/heptio/ark/pkg/apis/ark/v1"
|
|
|
|
// BackupStore is an autogenerated mock type for the BackupStore type
|
|
type BackupStore struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// DeleteBackup provides a mock function with given fields: name
|
|
func (_m *BackupStore) DeleteBackup(name string) error {
|
|
ret := _m.Called(name)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string) error); ok {
|
|
r0 = rf(name)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// GetBackupContents provides a mock function with given fields: name
|
|
func (_m *BackupStore) GetBackupContents(name string) (io.ReadCloser, error) {
|
|
ret := _m.Called(name)
|
|
|
|
var r0 io.ReadCloser
|
|
if rf, ok := ret.Get(0).(func(string) io.ReadCloser); ok {
|
|
r0 = rf(name)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(io.ReadCloser)
|
|
}
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(string) error); ok {
|
|
r1 = rf(name)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GetBackupMetadata provides a mock function with given fields: name
|
|
func (_m *BackupStore) GetBackupMetadata(name string) (*v1.Backup, error) {
|
|
ret := _m.Called(name)
|
|
|
|
var r0 *v1.Backup
|
|
if rf, ok := ret.Get(0).(func(string) *v1.Backup); ok {
|
|
r0 = rf(name)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*v1.Backup)
|
|
}
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(string) error); ok {
|
|
r1 = rf(name)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GetDownloadURL provides a mock function with given fields: backup, target
|
|
func (_m *BackupStore) GetDownloadURL(backup string, target v1.DownloadTarget) (string, error) {
|
|
ret := _m.Called(backup, target)
|
|
|
|
var r0 string
|
|
if rf, ok := ret.Get(0).(func(string, v1.DownloadTarget) string); ok {
|
|
r0 = rf(backup, target)
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(string, v1.DownloadTarget) error); ok {
|
|
r1 = rf(backup, target)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// ListBackups provides a mock function with given fields:
|
|
func (_m *BackupStore) ListBackups() ([]*v1.Backup, error) {
|
|
ret := _m.Called()
|
|
|
|
var r0 []*v1.Backup
|
|
if rf, ok := ret.Get(0).(func() []*v1.Backup); ok {
|
|
r0 = rf()
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*v1.Backup)
|
|
}
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func() error); ok {
|
|
r1 = rf()
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// PutBackup provides a mock function with given fields: name, metadata, contents, log
|
|
func (_m *BackupStore) PutBackup(name string, metadata io.Reader, contents io.Reader, log io.Reader) error {
|
|
ret := _m.Called(name, metadata, contents, log)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, io.Reader, io.Reader, io.Reader) error); ok {
|
|
r0 = rf(name, metadata, contents, log)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// PutRestoreLog provides a mock function with given fields: backup, restore, log
|
|
func (_m *BackupStore) PutRestoreLog(backup string, restore string, log io.Reader) error {
|
|
ret := _m.Called(backup, restore, log)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, string, io.Reader) error); ok {
|
|
r0 = rf(backup, restore, log)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// PutRestoreResults provides a mock function with given fields: backup, restore, results
|
|
func (_m *BackupStore) PutRestoreResults(backup string, restore string, results io.Reader) error {
|
|
ret := _m.Called(backup, restore, results)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, string, io.Reader) error); ok {
|
|
r0 = rf(backup, restore, results)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|