tusd/pkg/handler/handler_mock_test.go

322 lines
11 KiB
Go
Raw Normal View History

2019-08-24 13:14:51 +00:00
// Code generated by MockGen. DO NOT EDIT.
// Source: utils_test.go
2019-08-24 13:14:51 +00:00
// Package handler_test is a generated GoMock package.
package handler_test
import (
context "context"
2018-05-05 19:18:47 +00:00
io "io"
2019-08-24 13:14:51 +00:00
reflect "reflect"
2022-05-24 12:16:01 +00:00
gomock "github.com/golang/mock/gomock"
)
2022-05-24 12:16:01 +00:00
// MockFullDataStore is a mock of FullDataStore interface.
type MockFullDataStore struct {
ctrl *gomock.Controller
2019-08-24 13:14:51 +00:00
recorder *MockFullDataStoreMockRecorder
}
2022-05-24 12:16:01 +00:00
// MockFullDataStoreMockRecorder is the mock recorder for MockFullDataStore.
2019-08-24 13:14:51 +00:00
type MockFullDataStoreMockRecorder struct {
mock *MockFullDataStore
}
2022-05-24 12:16:01 +00:00
// NewMockFullDataStore creates a new mock instance.
func NewMockFullDataStore(ctrl *gomock.Controller) *MockFullDataStore {
mock := &MockFullDataStore{ctrl: ctrl}
2019-08-24 13:14:51 +00:00
mock.recorder = &MockFullDataStoreMockRecorder{mock}
return mock
}
2022-05-24 12:16:01 +00:00
// EXPECT returns an object that allows the caller to indicate expected use.
2019-08-24 13:14:51 +00:00
func (m *MockFullDataStore) EXPECT() *MockFullDataStoreMockRecorder {
return m.recorder
}
2022-05-24 12:16:01 +00:00
// AsConcatableUpload mocks base method.
func (m *MockFullDataStore) AsConcatableUpload(upload Upload) ConcatableUpload {
2019-08-24 13:14:51 +00:00
m.ctrl.T.Helper()
2022-05-24 12:16:01 +00:00
ret := m.ctrl.Call(m, "AsConcatableUpload", upload)
ret0, _ := ret[0].(ConcatableUpload)
return ret0
}
2022-05-24 12:16:01 +00:00
// AsConcatableUpload indicates an expected call of AsConcatableUpload.
func (mr *MockFullDataStoreMockRecorder) AsConcatableUpload(upload interface{}) *gomock.Call {
2019-08-24 13:14:51 +00:00
mr.mock.ctrl.T.Helper()
2022-05-24 12:16:01 +00:00
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AsConcatableUpload", reflect.TypeOf((*MockFullDataStore)(nil).AsConcatableUpload), upload)
}
2022-05-24 12:16:01 +00:00
// AsLengthDeclarableUpload mocks base method.
func (m *MockFullDataStore) AsLengthDeclarableUpload(upload Upload) LengthDeclarableUpload {
2019-08-24 13:14:51 +00:00
m.ctrl.T.Helper()
2022-05-24 12:16:01 +00:00
ret := m.ctrl.Call(m, "AsLengthDeclarableUpload", upload)
ret0, _ := ret[0].(LengthDeclarableUpload)
return ret0
}
2022-05-24 12:16:01 +00:00
// AsLengthDeclarableUpload indicates an expected call of AsLengthDeclarableUpload.
func (mr *MockFullDataStoreMockRecorder) AsLengthDeclarableUpload(upload interface{}) *gomock.Call {
2019-08-24 13:14:51 +00:00
mr.mock.ctrl.T.Helper()
2022-05-24 12:16:01 +00:00
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AsLengthDeclarableUpload", reflect.TypeOf((*MockFullDataStore)(nil).AsLengthDeclarableUpload), upload)
}
2022-05-24 12:16:01 +00:00
// AsTerminatableUpload mocks base method.
func (m *MockFullDataStore) AsTerminatableUpload(upload Upload) TerminatableUpload {
2019-08-24 13:14:51 +00:00
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AsTerminatableUpload", upload)
2022-05-24 12:16:01 +00:00
ret0, _ := ret[0].(TerminatableUpload)
2019-08-24 13:14:51 +00:00
return ret0
}
2022-05-24 12:16:01 +00:00
// AsTerminatableUpload indicates an expected call of AsTerminatableUpload.
2019-08-24 13:14:51 +00:00
func (mr *MockFullDataStoreMockRecorder) AsTerminatableUpload(upload interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AsTerminatableUpload", reflect.TypeOf((*MockFullDataStore)(nil).AsTerminatableUpload), upload)
}
2022-05-24 12:16:01 +00:00
// GetUpload mocks base method.
func (m *MockFullDataStore) GetUpload(ctx context.Context, id string) (Upload, error) {
2019-08-24 13:14:51 +00:00
m.ctrl.T.Helper()
2022-05-24 12:16:01 +00:00
ret := m.ctrl.Call(m, "GetUpload", ctx, id)
ret0, _ := ret[0].(Upload)
ret1, _ := ret[1].(error)
return ret0, ret1
}
2022-05-24 12:16:01 +00:00
// GetUpload indicates an expected call of GetUpload.
func (mr *MockFullDataStoreMockRecorder) GetUpload(ctx, id interface{}) *gomock.Call {
2019-08-24 13:14:51 +00:00
mr.mock.ctrl.T.Helper()
2022-05-24 12:16:01 +00:00
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUpload", reflect.TypeOf((*MockFullDataStore)(nil).GetUpload), ctx, id)
}
2022-05-24 12:16:01 +00:00
// NewUpload mocks base method.
func (m *MockFullDataStore) NewUpload(ctx context.Context, info FileInfo) (Upload, error) {
2019-08-24 13:14:51 +00:00
m.ctrl.T.Helper()
2022-05-24 12:16:01 +00:00
ret := m.ctrl.Call(m, "NewUpload", ctx, info)
ret0, _ := ret[0].(Upload)
ret1, _ := ret[1].(error)
return ret0, ret1
}
2022-05-24 12:16:01 +00:00
// NewUpload indicates an expected call of NewUpload.
func (mr *MockFullDataStoreMockRecorder) NewUpload(ctx, info interface{}) *gomock.Call {
2019-08-24 13:14:51 +00:00
mr.mock.ctrl.T.Helper()
2022-05-24 12:16:01 +00:00
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewUpload", reflect.TypeOf((*MockFullDataStore)(nil).NewUpload), ctx, info)
2019-08-24 13:14:51 +00:00
}
2022-05-24 12:16:01 +00:00
// MockFullUpload is a mock of FullUpload interface.
2019-08-24 13:14:51 +00:00
type MockFullUpload struct {
ctrl *gomock.Controller
recorder *MockFullUploadMockRecorder
}
2022-05-24 12:16:01 +00:00
// MockFullUploadMockRecorder is the mock recorder for MockFullUpload.
2019-08-24 13:14:51 +00:00
type MockFullUploadMockRecorder struct {
mock *MockFullUpload
}
2022-05-24 12:16:01 +00:00
// NewMockFullUpload creates a new mock instance.
2019-08-24 13:14:51 +00:00
func NewMockFullUpload(ctrl *gomock.Controller) *MockFullUpload {
mock := &MockFullUpload{ctrl: ctrl}
mock.recorder = &MockFullUploadMockRecorder{mock}
return mock
}
2022-05-24 12:16:01 +00:00
// EXPECT returns an object that allows the caller to indicate expected use.
2019-08-24 13:14:51 +00:00
func (m *MockFullUpload) EXPECT() *MockFullUploadMockRecorder {
return m.recorder
}
2022-05-24 12:16:01 +00:00
// ConcatUploads mocks base method.
func (m *MockFullUpload) ConcatUploads(ctx context.Context, partialUploads []Upload) error {
2019-08-24 13:14:51 +00:00
m.ctrl.T.Helper()
2022-05-24 12:16:01 +00:00
ret := m.ctrl.Call(m, "ConcatUploads", ctx, partialUploads)
ret0, _ := ret[0].(error)
return ret0
2019-08-24 13:14:51 +00:00
}
2022-05-24 12:16:01 +00:00
// ConcatUploads indicates an expected call of ConcatUploads.
func (mr *MockFullUploadMockRecorder) ConcatUploads(ctx, partialUploads interface{}) *gomock.Call {
2019-08-24 13:14:51 +00:00
mr.mock.ctrl.T.Helper()
2022-05-24 12:16:01 +00:00
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConcatUploads", reflect.TypeOf((*MockFullUpload)(nil).ConcatUploads), ctx, partialUploads)
2019-08-24 13:14:51 +00:00
}
2022-05-24 12:16:01 +00:00
// DeclareLength mocks base method.
func (m *MockFullUpload) DeclareLength(ctx context.Context, length int64) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DeclareLength", ctx, length)
ret0, _ := ret[0].(error)
return ret0
}
// DeclareLength indicates an expected call of DeclareLength.
func (mr *MockFullUploadMockRecorder) DeclareLength(ctx, length interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeclareLength", reflect.TypeOf((*MockFullUpload)(nil).DeclareLength), ctx, length)
}
// FinishUpload mocks base method.
func (m *MockFullUpload) FinishUpload(ctx context.Context) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "FinishUpload", ctx)
ret0, _ := ret[0].(error)
return ret0
}
// FinishUpload indicates an expected call of FinishUpload.
func (mr *MockFullUploadMockRecorder) FinishUpload(ctx interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FinishUpload", reflect.TypeOf((*MockFullUpload)(nil).FinishUpload), ctx)
}
// GetInfo mocks base method.
func (m *MockFullUpload) GetInfo(ctx context.Context) (FileInfo, error) {
2019-08-24 13:14:51 +00:00
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetInfo", ctx)
2022-05-24 12:16:01 +00:00
ret0, _ := ret[0].(FileInfo)
2019-08-24 13:14:51 +00:00
ret1, _ := ret[1].(error)
return ret0, ret1
}
2022-05-24 12:16:01 +00:00
// GetInfo indicates an expected call of GetInfo.
func (mr *MockFullUploadMockRecorder) GetInfo(ctx interface{}) *gomock.Call {
2019-08-24 13:14:51 +00:00
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInfo", reflect.TypeOf((*MockFullUpload)(nil).GetInfo), ctx)
}
2022-05-24 12:16:01 +00:00
// GetReader mocks base method.
func (m *MockFullUpload) GetReader(ctx context.Context) (io.ReadCloser, error) {
2019-08-24 13:14:51 +00:00
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetReader", ctx)
2022-05-24 12:16:01 +00:00
ret0, _ := ret[0].(io.ReadCloser)
ret1, _ := ret[1].(error)
return ret0, ret1
}
2022-05-24 12:16:01 +00:00
// GetReader indicates an expected call of GetReader.
func (mr *MockFullUploadMockRecorder) GetReader(ctx interface{}) *gomock.Call {
2019-08-24 13:14:51 +00:00
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetReader", reflect.TypeOf((*MockFullUpload)(nil).GetReader), ctx)
2019-08-24 13:14:51 +00:00
}
2022-05-24 12:16:01 +00:00
// Terminate mocks base method.
func (m *MockFullUpload) Terminate(ctx context.Context) error {
2019-08-24 13:14:51 +00:00
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Terminate", ctx)
2016-10-13 16:18:18 +00:00
ret0, _ := ret[0].(error)
return ret0
}
2022-05-24 12:16:01 +00:00
// Terminate indicates an expected call of Terminate.
func (mr *MockFullUploadMockRecorder) Terminate(ctx interface{}) *gomock.Call {
2019-08-24 13:14:51 +00:00
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Terminate", reflect.TypeOf((*MockFullUpload)(nil).Terminate), ctx)
2016-10-13 16:18:18 +00:00
}
2022-05-24 12:16:01 +00:00
// WriteChunk mocks base method.
func (m *MockFullUpload) WriteChunk(ctx context.Context, offset int64, src io.Reader) (int64, error) {
m.ctrl.T.Helper()
2022-05-24 12:16:01 +00:00
ret := m.ctrl.Call(m, "WriteChunk", ctx, offset, src)
ret0, _ := ret[0].(int64)
ret1, _ := ret[1].(error)
return ret0, ret1
}
2022-05-24 12:16:01 +00:00
// WriteChunk indicates an expected call of WriteChunk.
func (mr *MockFullUploadMockRecorder) WriteChunk(ctx, offset, src interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
2022-05-24 12:16:01 +00:00
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteChunk", reflect.TypeOf((*MockFullUpload)(nil).WriteChunk), ctx, offset, src)
}
2022-05-24 12:16:01 +00:00
// MockFullLocker is a mock of FullLocker interface.
type MockFullLocker struct {
ctrl *gomock.Controller
recorder *MockFullLockerMockRecorder
}
2022-05-24 12:16:01 +00:00
// MockFullLockerMockRecorder is the mock recorder for MockFullLocker.
type MockFullLockerMockRecorder struct {
mock *MockFullLocker
}
2022-05-24 12:16:01 +00:00
// NewMockFullLocker creates a new mock instance.
func NewMockFullLocker(ctrl *gomock.Controller) *MockFullLocker {
mock := &MockFullLocker{ctrl: ctrl}
mock.recorder = &MockFullLockerMockRecorder{mock}
return mock
}
2022-05-24 12:16:01 +00:00
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockFullLocker) EXPECT() *MockFullLockerMockRecorder {
2019-08-24 13:14:51 +00:00
return m.recorder
}
2022-05-24 12:16:01 +00:00
// NewLock mocks base method.
func (m *MockFullLocker) NewLock(id string) (Lock, error) {
2019-08-24 13:14:51 +00:00
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NewLock", id)
2022-05-24 12:16:01 +00:00
ret0, _ := ret[0].(Lock)
ret1, _ := ret[1].(error)
return ret0, ret1
}
2022-05-24 12:16:01 +00:00
// NewLock indicates an expected call of NewLock.
func (mr *MockFullLockerMockRecorder) NewLock(id interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewLock", reflect.TypeOf((*MockFullLocker)(nil).NewLock), id)
}
2022-05-24 12:16:01 +00:00
// MockFullLock is a mock of FullLock interface.
type MockFullLock struct {
ctrl *gomock.Controller
recorder *MockFullLockMockRecorder
}
2022-05-24 12:16:01 +00:00
// MockFullLockMockRecorder is the mock recorder for MockFullLock.
type MockFullLockMockRecorder struct {
mock *MockFullLock
}
2022-05-24 12:16:01 +00:00
// NewMockFullLock creates a new mock instance.
func NewMockFullLock(ctrl *gomock.Controller) *MockFullLock {
mock := &MockFullLock{ctrl: ctrl}
mock.recorder = &MockFullLockMockRecorder{mock}
return mock
}
2022-05-24 12:16:01 +00:00
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockFullLock) EXPECT() *MockFullLockMockRecorder {
return m.recorder
}
2022-05-24 12:16:01 +00:00
// Lock mocks base method.
func (m *MockFullLock) Lock(ctx context.Context, requestUnlock func()) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Lock", ctx, requestUnlock)
ret0, _ := ret[0].(error)
return ret0
}
2022-05-24 12:16:01 +00:00
// Lock indicates an expected call of Lock.
func (mr *MockFullLockMockRecorder) Lock(ctx, requestUnlock interface{}) *gomock.Call {
2019-08-24 13:14:51 +00:00
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Lock", reflect.TypeOf((*MockFullLock)(nil).Lock), ctx, requestUnlock)
}
2022-05-24 12:16:01 +00:00
// Unlock mocks base method.
func (m *MockFullLock) Unlock() error {
2019-08-24 13:14:51 +00:00
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Unlock")
ret0, _ := ret[0].(error)
return ret0
}
2022-05-24 12:16:01 +00:00
// Unlock indicates an expected call of Unlock.
func (mr *MockFullLockMockRecorder) Unlock() *gomock.Call {
2019-08-24 13:14:51 +00:00
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unlock", reflect.TypeOf((*MockFullLock)(nil).Unlock))
}