clipper/backend/generated/mocks/FileStore.go

104 lines
2.5 KiB
Go
Raw Normal View History

2021-12-07 19:58:11 +00:00
// Code generated by mockery v2.9.4. DO NOT EDIT.
package mocks
import (
context "context"
io "io"
mock "github.com/stretchr/testify/mock"
)
// FileStore is an autogenerated mock type for the FileStore type
type FileStore struct {
mock.Mock
}
// GetObject provides a mock function with given fields: ctx, key
func (_m *FileStore) GetObject(ctx context.Context, key string) (io.ReadCloser, error) {
ret := _m.Called(ctx, key)
2021-12-07 19:58:11 +00:00
var r0 io.ReadCloser
if rf, ok := ret.Get(0).(func(context.Context, string) io.ReadCloser); ok {
r0 = rf(ctx, key)
2021-12-07 19:58:11 +00:00
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(io.ReadCloser)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, key)
2021-12-07 19:58:11 +00:00
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetObjectWithRange provides a mock function with given fields: ctx, key, startFrame, endFrame
func (_m *FileStore) GetObjectWithRange(ctx context.Context, key string, startFrame int64, endFrame int64) (io.ReadCloser, error) {
ret := _m.Called(ctx, key, startFrame, endFrame)
2021-12-07 19:58:11 +00:00
var r0 io.ReadCloser
if rf, ok := ret.Get(0).(func(context.Context, string, int64, int64) io.ReadCloser); ok {
r0 = rf(ctx, key, startFrame, endFrame)
2021-12-07 19:58:11 +00:00
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(io.ReadCloser)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, int64, int64) error); ok {
r1 = rf(ctx, key, startFrame, endFrame)
2021-12-07 19:58:11 +00:00
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetURL provides a mock function with given fields: ctx, key
func (_m *FileStore) GetURL(ctx context.Context, key string) (string, error) {
ret := _m.Called(ctx, key)
2021-12-07 19:58:11 +00:00
var r0 string
if rf, ok := ret.Get(0).(func(context.Context, string) string); ok {
r0 = rf(ctx, key)
2021-12-07 19:58:11 +00:00
} else {
r0 = ret.Get(0).(string)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, key)
2021-12-07 19:58:11 +00:00
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// PutObject provides a mock function with given fields: ctx, key, reader, contentType
func (_m *FileStore) PutObject(ctx context.Context, key string, reader io.Reader, contentType string) (int64, error) {
ret := _m.Called(ctx, key, reader, contentType)
2021-12-07 19:58:11 +00:00
var r0 int64
if rf, ok := ret.Get(0).(func(context.Context, string, io.Reader, string) int64); ok {
r0 = rf(ctx, key, reader, contentType)
2021-12-07 19:58:11 +00:00
} else {
r0 = ret.Get(0).(int64)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, io.Reader, string) error); ok {
r1 = rf(ctx, key, reader, contentType)
2021-12-07 19:58:11 +00:00
} else {
r1 = ret.Error(1)
}
return r0, r1
}