The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/pkg/infra/filestorage/file_storage_mock.go

137 lines
3.3 KiB

// Code generated by mockery v2.10.6. DO NOT EDIT.
package filestorage
import (
context "context"
mock "github.com/stretchr/testify/mock"
)
// MockFileStorage is an autogenerated mock type for the FileStorage type
type MockFileStorage struct {
mock.Mock
}
// CreateFolder provides a mock function with given fields: ctx, path
func (_m *MockFileStorage) CreateFolder(ctx context.Context, path string) error {
ret := _m.Called(ctx, path)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
r0 = rf(ctx, path)
} else {
r0 = ret.Error(0)
}
return r0
}
// Delete provides a mock function with given fields: ctx, path
func (_m *MockFileStorage) Delete(ctx context.Context, path string) error {
ret := _m.Called(ctx, path)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
r0 = rf(ctx, path)
} else {
r0 = ret.Error(0)
}
return r0
}
// DeleteFolder provides a mock function with given fields: ctx, path, options
func (_m *MockFileStorage) DeleteFolder(ctx context.Context, path string, options *DeleteFolderOptions) error {
ret := _m.Called(ctx, path, options)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, *DeleteFolderOptions) error); ok {
r0 = rf(ctx, path, options)
} else {
r0 = ret.Error(0)
}
return r0
}
// Get provides a mock function with given fields: ctx, path, options
func (_m *MockFileStorage) Get(ctx context.Context, path string, options *GetFileOptions) (*File, bool, error) {
ret := _m.Called(ctx, path, options)
var r0 *File
if rf, ok := ret.Get(0).(func(context.Context, string, *GetFileOptions) *File); ok {
r0 = rf(ctx, path, options)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*File)
}
}
var r1 bool
if rf, ok := ret.Get(1).(func(context.Context, string, *GetFileOptions) bool); ok {
r1 = rf(ctx, path, options)
} else {
r1 = ret.Get(1).(bool)
}
var r2 error
if rf, ok := ret.Get(2).(func(context.Context, string, *GetFileOptions) error); ok {
r2 = rf(ctx, path, options)
} else {
r2 = ret.Error(2)
}
return r0, r1, r2
}
// List provides a mock function with given fields: ctx, folderPath, paging, options
func (_m *MockFileStorage) List(ctx context.Context, folderPath string, paging *Paging, options *ListOptions) (*ListResponse, error) {
ret := _m.Called(ctx, folderPath, paging, options)
var r0 *ListResponse
if rf, ok := ret.Get(0).(func(context.Context, string, *Paging, *ListOptions) *ListResponse); ok {
r0 = rf(ctx, folderPath, paging, options)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*ListResponse)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, *Paging, *ListOptions) error); ok {
r1 = rf(ctx, folderPath, paging, options)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Upsert provides a mock function with given fields: ctx, command
func (_m *MockFileStorage) Upsert(ctx context.Context, command *UpsertFileCommand) error {
ret := _m.Called(ctx, command)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *UpsertFileCommand) error); ok {
r0 = rf(ctx, command)
} else {
r0 = ret.Error(0)
}
return r0
}
// close provides a mock function with given fields:
func (_m *MockFileStorage) close() error {
ret := _m.Called()
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
} else {
r0 = ret.Error(0)
}
return r0
}