Rob Watson 176a1cd8c1 Revert "FileStore.PutObject: Accept io.ReadCloser"
This turned out to actually make testing more difficult, as the
FileStore objects are generally mocked themselves and moving the Close()
call inside them introduced IO problems in the test suite.

This reverts commit a063f85eca5dd3f983bc9b790fd68108820cc730.
2022-01-03 13:32:39 +01:00

104 lines
2.5 KiB
Go

// 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)
var r0 io.ReadCloser
if rf, ok := ret.Get(0).(func(context.Context, string) io.ReadCloser); ok {
r0 = rf(ctx, key)
} 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)
} 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)
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)
} 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)
} 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)
var r0 string
if rf, ok := ret.Get(0).(func(context.Context, string) string); ok {
r0 = rf(ctx, key)
} 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)
} 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)
var r0 int64
if rf, ok := ret.Get(0).(func(context.Context, string, io.Reader, string) int64); ok {
r0 = rf(ctx, key, reader, contentType)
} 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)
} else {
r1 = ret.Error(1)
}
return r0, r1
}