Documentation
¶
Index ¶
- type Storage
- func (_m *Storage) Backend() string
- func (_m *Storage) CreateSymlink(ctx context.Context, oldname string, newname string) error
- func (_m *Storage) Delete(ctx context.Context, path string) error
- func (_m *Storage) Download(ctx context.Context, req metadata.DownloadRequest) (*metadata.DownloadResponse, error)
- func (_m *Storage) EXPECT() *Storage_Expecter
- func (_m *Storage) Init(ctx context.Context, name string) error
- func (_m *Storage) ListDir(ctx context.Context, path string) ([]*providerv1beta1.ResourceInfo, error)
- func (_m *Storage) MakeDirIfNotExist(ctx context.Context, name string) error
- func (_m *Storage) ReadDir(ctx context.Context, path string) ([]string, error)
- func (_m *Storage) ResolveSymlink(ctx context.Context, name string) (string, error)
- func (_m *Storage) SimpleDownload(ctx context.Context, path string) ([]byte, error)
- func (_m *Storage) SimpleUpload(ctx context.Context, uploadpath string, content []byte) error
- func (_m *Storage) Stat(ctx context.Context, path string) (*providerv1beta1.ResourceInfo, error)
- func (_m *Storage) Upload(ctx context.Context, req metadata.UploadRequest) (*metadata.UploadResponse, error)
- type Storage_Backend_Call
- type Storage_CreateSymlink_Call
- func (_c *Storage_CreateSymlink_Call) Return(_a0 error) *Storage_CreateSymlink_Call
- func (_c *Storage_CreateSymlink_Call) Run(run func(ctx context.Context, oldname string, newname string)) *Storage_CreateSymlink_Call
- func (_c *Storage_CreateSymlink_Call) RunAndReturn(run func(context.Context, string, string) error) *Storage_CreateSymlink_Call
- type Storage_Delete_Call
- type Storage_Download_Call
- func (_c *Storage_Download_Call) Return(_a0 *metadata.DownloadResponse, _a1 error) *Storage_Download_Call
- func (_c *Storage_Download_Call) Run(run func(ctx context.Context, req metadata.DownloadRequest)) *Storage_Download_Call
- func (_c *Storage_Download_Call) RunAndReturn(...) *Storage_Download_Call
- type Storage_Expecter
- func (_e *Storage_Expecter) Backend() *Storage_Backend_Call
- func (_e *Storage_Expecter) CreateSymlink(ctx interface{}, oldname interface{}, newname interface{}) *Storage_CreateSymlink_Call
- func (_e *Storage_Expecter) Delete(ctx interface{}, path interface{}) *Storage_Delete_Call
- func (_e *Storage_Expecter) Download(ctx interface{}, req interface{}) *Storage_Download_Call
- func (_e *Storage_Expecter) Init(ctx interface{}, name interface{}) *Storage_Init_Call
- func (_e *Storage_Expecter) ListDir(ctx interface{}, path interface{}) *Storage_ListDir_Call
- func (_e *Storage_Expecter) MakeDirIfNotExist(ctx interface{}, name interface{}) *Storage_MakeDirIfNotExist_Call
- func (_e *Storage_Expecter) ReadDir(ctx interface{}, path interface{}) *Storage_ReadDir_Call
- func (_e *Storage_Expecter) ResolveSymlink(ctx interface{}, name interface{}) *Storage_ResolveSymlink_Call
- func (_e *Storage_Expecter) SimpleDownload(ctx interface{}, path interface{}) *Storage_SimpleDownload_Call
- func (_e *Storage_Expecter) SimpleUpload(ctx interface{}, uploadpath interface{}, content interface{}) *Storage_SimpleUpload_Call
- func (_e *Storage_Expecter) Stat(ctx interface{}, path interface{}) *Storage_Stat_Call
- func (_e *Storage_Expecter) Upload(ctx interface{}, req interface{}) *Storage_Upload_Call
- type Storage_Init_Call
- type Storage_ListDir_Call
- func (_c *Storage_ListDir_Call) Return(_a0 []*providerv1beta1.ResourceInfo, _a1 error) *Storage_ListDir_Call
- func (_c *Storage_ListDir_Call) Run(run func(ctx context.Context, path string)) *Storage_ListDir_Call
- func (_c *Storage_ListDir_Call) RunAndReturn(run func(context.Context, string) ([]*providerv1beta1.ResourceInfo, error)) *Storage_ListDir_Call
- type Storage_MakeDirIfNotExist_Call
- func (_c *Storage_MakeDirIfNotExist_Call) Return(_a0 error) *Storage_MakeDirIfNotExist_Call
- func (_c *Storage_MakeDirIfNotExist_Call) Run(run func(ctx context.Context, name string)) *Storage_MakeDirIfNotExist_Call
- func (_c *Storage_MakeDirIfNotExist_Call) RunAndReturn(run func(context.Context, string) error) *Storage_MakeDirIfNotExist_Call
- type Storage_ReadDir_Call
- func (_c *Storage_ReadDir_Call) Return(_a0 []string, _a1 error) *Storage_ReadDir_Call
- func (_c *Storage_ReadDir_Call) Run(run func(ctx context.Context, path string)) *Storage_ReadDir_Call
- func (_c *Storage_ReadDir_Call) RunAndReturn(run func(context.Context, string) ([]string, error)) *Storage_ReadDir_Call
- type Storage_ResolveSymlink_Call
- func (_c *Storage_ResolveSymlink_Call) Return(_a0 string, _a1 error) *Storage_ResolveSymlink_Call
- func (_c *Storage_ResolveSymlink_Call) Run(run func(ctx context.Context, name string)) *Storage_ResolveSymlink_Call
- func (_c *Storage_ResolveSymlink_Call) RunAndReturn(run func(context.Context, string) (string, error)) *Storage_ResolveSymlink_Call
- type Storage_SimpleDownload_Call
- func (_c *Storage_SimpleDownload_Call) Return(_a0 []byte, _a1 error) *Storage_SimpleDownload_Call
- func (_c *Storage_SimpleDownload_Call) Run(run func(ctx context.Context, path string)) *Storage_SimpleDownload_Call
- func (_c *Storage_SimpleDownload_Call) RunAndReturn(run func(context.Context, string) ([]byte, error)) *Storage_SimpleDownload_Call
- type Storage_SimpleUpload_Call
- func (_c *Storage_SimpleUpload_Call) Return(_a0 error) *Storage_SimpleUpload_Call
- func (_c *Storage_SimpleUpload_Call) Run(run func(ctx context.Context, uploadpath string, content []byte)) *Storage_SimpleUpload_Call
- func (_c *Storage_SimpleUpload_Call) RunAndReturn(run func(context.Context, string, []byte) error) *Storage_SimpleUpload_Call
- type Storage_Stat_Call
- func (_c *Storage_Stat_Call) Return(_a0 *providerv1beta1.ResourceInfo, _a1 error) *Storage_Stat_Call
- func (_c *Storage_Stat_Call) Run(run func(ctx context.Context, path string)) *Storage_Stat_Call
- func (_c *Storage_Stat_Call) RunAndReturn(run func(context.Context, string) (*providerv1beta1.ResourceInfo, error)) *Storage_Stat_Call
- type Storage_Upload_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
Storage is an autogenerated mock type for the Storage type
func NewStorage ¶
NewStorage creates a new instance of Storage. 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 (*Storage) CreateSymlink ¶
CreateSymlink provides a mock function with given fields: ctx, oldname, newname
func (*Storage) Download ¶
func (_m *Storage) Download(ctx context.Context, req metadata.DownloadRequest) (*metadata.DownloadResponse, error)
Download provides a mock function with given fields: ctx, req
func (*Storage) EXPECT ¶
func (_m *Storage) EXPECT() *Storage_Expecter
func (*Storage) ListDir ¶
func (_m *Storage) ListDir(ctx context.Context, path string) ([]*providerv1beta1.ResourceInfo, error)
ListDir provides a mock function with given fields: ctx, path
func (*Storage) MakeDirIfNotExist ¶
MakeDirIfNotExist provides a mock function with given fields: ctx, name
func (*Storage) ResolveSymlink ¶
ResolveSymlink provides a mock function with given fields: ctx, name
func (*Storage) SimpleDownload ¶
SimpleDownload provides a mock function with given fields: ctx, path
func (*Storage) SimpleUpload ¶
SimpleUpload provides a mock function with given fields: ctx, uploadpath, content
func (*Storage) Stat ¶
func (_m *Storage) Stat(ctx context.Context, path string) (*providerv1beta1.ResourceInfo, error)
Stat provides a mock function with given fields: ctx, path
func (*Storage) Upload ¶
func (_m *Storage) Upload(ctx context.Context, req metadata.UploadRequest) (*metadata.UploadResponse, error)
Upload provides a mock function with given fields: ctx, req
type Storage_Backend_Call ¶
Storage_Backend_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Backend'
func (*Storage_Backend_Call) Return ¶
func (_c *Storage_Backend_Call) Return(_a0 string) *Storage_Backend_Call
func (*Storage_Backend_Call) Run ¶
func (_c *Storage_Backend_Call) Run(run func()) *Storage_Backend_Call
func (*Storage_Backend_Call) RunAndReturn ¶
func (_c *Storage_Backend_Call) RunAndReturn(run func() string) *Storage_Backend_Call
type Storage_CreateSymlink_Call ¶
Storage_CreateSymlink_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateSymlink'
func (*Storage_CreateSymlink_Call) Return ¶
func (_c *Storage_CreateSymlink_Call) Return(_a0 error) *Storage_CreateSymlink_Call
func (*Storage_CreateSymlink_Call) Run ¶
func (_c *Storage_CreateSymlink_Call) Run(run func(ctx context.Context, oldname string, newname string)) *Storage_CreateSymlink_Call
func (*Storage_CreateSymlink_Call) RunAndReturn ¶
func (_c *Storage_CreateSymlink_Call) RunAndReturn(run func(context.Context, string, string) error) *Storage_CreateSymlink_Call
type Storage_Delete_Call ¶
Storage_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
func (*Storage_Delete_Call) Return ¶
func (_c *Storage_Delete_Call) Return(_a0 error) *Storage_Delete_Call
func (*Storage_Delete_Call) Run ¶
func (_c *Storage_Delete_Call) Run(run func(ctx context.Context, path string)) *Storage_Delete_Call
func (*Storage_Delete_Call) RunAndReturn ¶
func (_c *Storage_Delete_Call) RunAndReturn(run func(context.Context, string) error) *Storage_Delete_Call
type Storage_Download_Call ¶
Storage_Download_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Download'
func (*Storage_Download_Call) Return ¶
func (_c *Storage_Download_Call) Return(_a0 *metadata.DownloadResponse, _a1 error) *Storage_Download_Call
func (*Storage_Download_Call) Run ¶
func (_c *Storage_Download_Call) Run(run func(ctx context.Context, req metadata.DownloadRequest)) *Storage_Download_Call
func (*Storage_Download_Call) RunAndReturn ¶
func (_c *Storage_Download_Call) RunAndReturn(run func(context.Context, metadata.DownloadRequest) (*metadata.DownloadResponse, error)) *Storage_Download_Call
type Storage_Expecter ¶
type Storage_Expecter struct {
// contains filtered or unexported fields
}
func (*Storage_Expecter) Backend ¶
func (_e *Storage_Expecter) Backend() *Storage_Backend_Call
Backend is a helper method to define mock.On call
func (*Storage_Expecter) CreateSymlink ¶
func (_e *Storage_Expecter) CreateSymlink(ctx interface{}, oldname interface{}, newname interface{}) *Storage_CreateSymlink_Call
CreateSymlink is a helper method to define mock.On call
- ctx context.Context
- oldname string
- newname string
func (*Storage_Expecter) Delete ¶
func (_e *Storage_Expecter) Delete(ctx interface{}, path interface{}) *Storage_Delete_Call
Delete is a helper method to define mock.On call
- ctx context.Context
- path string
func (*Storage_Expecter) Download ¶
func (_e *Storage_Expecter) Download(ctx interface{}, req interface{}) *Storage_Download_Call
Download is a helper method to define mock.On call
- ctx context.Context
- req metadata.DownloadRequest
func (*Storage_Expecter) Init ¶
func (_e *Storage_Expecter) Init(ctx interface{}, name interface{}) *Storage_Init_Call
Init is a helper method to define mock.On call
- ctx context.Context
- name string
func (*Storage_Expecter) ListDir ¶
func (_e *Storage_Expecter) ListDir(ctx interface{}, path interface{}) *Storage_ListDir_Call
ListDir is a helper method to define mock.On call
- ctx context.Context
- path string
func (*Storage_Expecter) MakeDirIfNotExist ¶
func (_e *Storage_Expecter) MakeDirIfNotExist(ctx interface{}, name interface{}) *Storage_MakeDirIfNotExist_Call
MakeDirIfNotExist is a helper method to define mock.On call
- ctx context.Context
- name string
func (*Storage_Expecter) ReadDir ¶
func (_e *Storage_Expecter) ReadDir(ctx interface{}, path interface{}) *Storage_ReadDir_Call
ReadDir is a helper method to define mock.On call
- ctx context.Context
- path string
func (*Storage_Expecter) ResolveSymlink ¶
func (_e *Storage_Expecter) ResolveSymlink(ctx interface{}, name interface{}) *Storage_ResolveSymlink_Call
ResolveSymlink is a helper method to define mock.On call
- ctx context.Context
- name string
func (*Storage_Expecter) SimpleDownload ¶
func (_e *Storage_Expecter) SimpleDownload(ctx interface{}, path interface{}) *Storage_SimpleDownload_Call
SimpleDownload is a helper method to define mock.On call
- ctx context.Context
- path string
func (*Storage_Expecter) SimpleUpload ¶
func (_e *Storage_Expecter) SimpleUpload(ctx interface{}, uploadpath interface{}, content interface{}) *Storage_SimpleUpload_Call
SimpleUpload is a helper method to define mock.On call
- ctx context.Context
- uploadpath string
- content []byte
func (*Storage_Expecter) Stat ¶
func (_e *Storage_Expecter) Stat(ctx interface{}, path interface{}) *Storage_Stat_Call
Stat is a helper method to define mock.On call
- ctx context.Context
- path string
func (*Storage_Expecter) Upload ¶
func (_e *Storage_Expecter) Upload(ctx interface{}, req interface{}) *Storage_Upload_Call
Upload is a helper method to define mock.On call
- ctx context.Context
- req metadata.UploadRequest
type Storage_Init_Call ¶
Storage_Init_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Init'
func (*Storage_Init_Call) Return ¶
func (_c *Storage_Init_Call) Return(err error) *Storage_Init_Call
func (*Storage_Init_Call) Run ¶
func (_c *Storage_Init_Call) Run(run func(ctx context.Context, name string)) *Storage_Init_Call
func (*Storage_Init_Call) RunAndReturn ¶
func (_c *Storage_Init_Call) RunAndReturn(run func(context.Context, string) error) *Storage_Init_Call
type Storage_ListDir_Call ¶
Storage_ListDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListDir'
func (*Storage_ListDir_Call) Return ¶
func (_c *Storage_ListDir_Call) Return(_a0 []*providerv1beta1.ResourceInfo, _a1 error) *Storage_ListDir_Call
func (*Storage_ListDir_Call) Run ¶
func (_c *Storage_ListDir_Call) Run(run func(ctx context.Context, path string)) *Storage_ListDir_Call
func (*Storage_ListDir_Call) RunAndReturn ¶
func (_c *Storage_ListDir_Call) RunAndReturn(run func(context.Context, string) ([]*providerv1beta1.ResourceInfo, error)) *Storage_ListDir_Call
type Storage_MakeDirIfNotExist_Call ¶
Storage_MakeDirIfNotExist_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MakeDirIfNotExist'
func (*Storage_MakeDirIfNotExist_Call) Return ¶
func (_c *Storage_MakeDirIfNotExist_Call) Return(_a0 error) *Storage_MakeDirIfNotExist_Call
func (*Storage_MakeDirIfNotExist_Call) Run ¶
func (_c *Storage_MakeDirIfNotExist_Call) Run(run func(ctx context.Context, name string)) *Storage_MakeDirIfNotExist_Call
func (*Storage_MakeDirIfNotExist_Call) RunAndReturn ¶
func (_c *Storage_MakeDirIfNotExist_Call) RunAndReturn(run func(context.Context, string) error) *Storage_MakeDirIfNotExist_Call
type Storage_ReadDir_Call ¶
Storage_ReadDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadDir'
func (*Storage_ReadDir_Call) Return ¶
func (_c *Storage_ReadDir_Call) Return(_a0 []string, _a1 error) *Storage_ReadDir_Call
func (*Storage_ReadDir_Call) Run ¶
func (_c *Storage_ReadDir_Call) Run(run func(ctx context.Context, path string)) *Storage_ReadDir_Call
func (*Storage_ReadDir_Call) RunAndReturn ¶
func (_c *Storage_ReadDir_Call) RunAndReturn(run func(context.Context, string) ([]string, error)) *Storage_ReadDir_Call
type Storage_ResolveSymlink_Call ¶
Storage_ResolveSymlink_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResolveSymlink'
func (*Storage_ResolveSymlink_Call) Return ¶
func (_c *Storage_ResolveSymlink_Call) Return(_a0 string, _a1 error) *Storage_ResolveSymlink_Call
func (*Storage_ResolveSymlink_Call) Run ¶
func (_c *Storage_ResolveSymlink_Call) Run(run func(ctx context.Context, name string)) *Storage_ResolveSymlink_Call
func (*Storage_ResolveSymlink_Call) RunAndReturn ¶
func (_c *Storage_ResolveSymlink_Call) RunAndReturn(run func(context.Context, string) (string, error)) *Storage_ResolveSymlink_Call
type Storage_SimpleDownload_Call ¶
Storage_SimpleDownload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SimpleDownload'
func (*Storage_SimpleDownload_Call) Return ¶
func (_c *Storage_SimpleDownload_Call) Return(_a0 []byte, _a1 error) *Storage_SimpleDownload_Call
func (*Storage_SimpleDownload_Call) Run ¶
func (_c *Storage_SimpleDownload_Call) Run(run func(ctx context.Context, path string)) *Storage_SimpleDownload_Call
func (*Storage_SimpleDownload_Call) RunAndReturn ¶
func (_c *Storage_SimpleDownload_Call) RunAndReturn(run func(context.Context, string) ([]byte, error)) *Storage_SimpleDownload_Call
type Storage_SimpleUpload_Call ¶
Storage_SimpleUpload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SimpleUpload'
func (*Storage_SimpleUpload_Call) Return ¶
func (_c *Storage_SimpleUpload_Call) Return(_a0 error) *Storage_SimpleUpload_Call
func (*Storage_SimpleUpload_Call) Run ¶
func (_c *Storage_SimpleUpload_Call) Run(run func(ctx context.Context, uploadpath string, content []byte)) *Storage_SimpleUpload_Call
func (*Storage_SimpleUpload_Call) RunAndReturn ¶
func (_c *Storage_SimpleUpload_Call) RunAndReturn(run func(context.Context, string, []byte) error) *Storage_SimpleUpload_Call
type Storage_Stat_Call ¶
Storage_Stat_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stat'
func (*Storage_Stat_Call) Return ¶
func (_c *Storage_Stat_Call) Return(_a0 *providerv1beta1.ResourceInfo, _a1 error) *Storage_Stat_Call
func (*Storage_Stat_Call) Run ¶
func (_c *Storage_Stat_Call) Run(run func(ctx context.Context, path string)) *Storage_Stat_Call
func (*Storage_Stat_Call) RunAndReturn ¶
func (_c *Storage_Stat_Call) RunAndReturn(run func(context.Context, string) (*providerv1beta1.ResourceInfo, error)) *Storage_Stat_Call
type Storage_Upload_Call ¶
Storage_Upload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Upload'
func (*Storage_Upload_Call) Return ¶
func (_c *Storage_Upload_Call) Return(_a0 *metadata.UploadResponse, _a1 error) *Storage_Upload_Call
func (*Storage_Upload_Call) Run ¶
func (_c *Storage_Upload_Call) Run(run func(ctx context.Context, req metadata.UploadRequest)) *Storage_Upload_Call
func (*Storage_Upload_Call) RunAndReturn ¶
func (_c *Storage_Upload_Call) RunAndReturn(run func(context.Context, metadata.UploadRequest) (*metadata.UploadResponse, error)) *Storage_Upload_Call