2021-10-24 08:58:03 +00:00
|
|
|
// Code generated by MockGen. DO NOT EDIT.
|
2019-06-11 16:23:20 +00:00
|
|
|
// Source: github.com/tus/tusd/pkg/gcsstore (interfaces: GCSReader,GCSAPI)
|
2017-09-16 18:49:09 +00:00
|
|
|
|
2021-10-24 08:58:03 +00:00
|
|
|
// Package gcsstore_test is a generated GoMock package.
|
2017-09-16 18:49:09 +00:00
|
|
|
package gcsstore_test
|
|
|
|
|
|
|
|
import (
|
2018-07-25 16:51:38 +00:00
|
|
|
context "context"
|
2017-09-16 18:49:09 +00:00
|
|
|
io "io"
|
2021-10-24 08:58:03 +00:00
|
|
|
reflect "reflect"
|
2022-05-24 12:16:01 +00:00
|
|
|
|
|
|
|
gomock "github.com/golang/mock/gomock"
|
|
|
|
gcsstore "github.com/tus/tusd/pkg/gcsstore"
|
2017-09-16 18:49:09 +00:00
|
|
|
)
|
|
|
|
|
2022-05-24 12:16:01 +00:00
|
|
|
// MockGCSReader is a mock of GCSReader interface.
|
2017-09-16 18:49:09 +00:00
|
|
|
type MockGCSReader struct {
|
|
|
|
ctrl *gomock.Controller
|
2021-10-24 08:58:03 +00:00
|
|
|
recorder *MockGCSReaderMockRecorder
|
2017-09-16 18:49:09 +00:00
|
|
|
}
|
|
|
|
|
2022-05-24 12:16:01 +00:00
|
|
|
// MockGCSReaderMockRecorder is the mock recorder for MockGCSReader.
|
2021-10-24 08:58:03 +00:00
|
|
|
type MockGCSReaderMockRecorder struct {
|
2017-09-16 18:49:09 +00:00
|
|
|
mock *MockGCSReader
|
|
|
|
}
|
|
|
|
|
2022-05-24 12:16:01 +00:00
|
|
|
// NewMockGCSReader creates a new mock instance.
|
2017-09-16 18:49:09 +00:00
|
|
|
func NewMockGCSReader(ctrl *gomock.Controller) *MockGCSReader {
|
|
|
|
mock := &MockGCSReader{ctrl: ctrl}
|
2021-10-24 08:58:03 +00:00
|
|
|
mock.recorder = &MockGCSReaderMockRecorder{mock}
|
2017-09-16 18:49:09 +00:00
|
|
|
return mock
|
|
|
|
}
|
|
|
|
|
2022-05-24 12:16:01 +00:00
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
2021-10-24 08:58:03 +00:00
|
|
|
func (m *MockGCSReader) EXPECT() *MockGCSReaderMockRecorder {
|
|
|
|
return m.recorder
|
2017-09-16 18:49:09 +00:00
|
|
|
}
|
|
|
|
|
2022-05-24 12:16:01 +00:00
|
|
|
// Close mocks base method.
|
2021-10-24 08:58:03 +00:00
|
|
|
func (m *MockGCSReader) Close() error {
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
ret := m.ctrl.Call(m, "Close")
|
2017-09-16 18:49:09 +00:00
|
|
|
ret0, _ := ret[0].(error)
|
|
|
|
return ret0
|
|
|
|
}
|
|
|
|
|
2022-05-24 12:16:01 +00:00
|
|
|
// Close indicates an expected call of Close.
|
2021-10-24 08:58:03 +00:00
|
|
|
func (mr *MockGCSReaderMockRecorder) Close() *gomock.Call {
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockGCSReader)(nil).Close))
|
2017-09-16 18:49:09 +00:00
|
|
|
}
|
|
|
|
|
2022-05-24 12:16:01 +00:00
|
|
|
// ContentType mocks base method.
|
2021-10-24 08:58:03 +00:00
|
|
|
func (m *MockGCSReader) ContentType() string {
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
ret := m.ctrl.Call(m, "ContentType")
|
2017-09-16 18:49:09 +00:00
|
|
|
ret0, _ := ret[0].(string)
|
|
|
|
return ret0
|
|
|
|
}
|
|
|
|
|
2022-05-24 12:16:01 +00:00
|
|
|
// ContentType indicates an expected call of ContentType.
|
2021-10-24 08:58:03 +00:00
|
|
|
func (mr *MockGCSReaderMockRecorder) ContentType() *gomock.Call {
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContentType", reflect.TypeOf((*MockGCSReader)(nil).ContentType))
|
2017-09-16 18:49:09 +00:00
|
|
|
}
|
|
|
|
|
2022-05-24 12:16:01 +00:00
|
|
|
// Read mocks base method.
|
2021-10-24 08:58:03 +00:00
|
|
|
func (m *MockGCSReader) Read(arg0 []byte) (int, error) {
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
ret := m.ctrl.Call(m, "Read", arg0)
|
2017-09-16 18:49:09 +00:00
|
|
|
ret0, _ := ret[0].(int)
|
|
|
|
ret1, _ := ret[1].(error)
|
|
|
|
return ret0, ret1
|
|
|
|
}
|
|
|
|
|
2022-05-24 12:16:01 +00:00
|
|
|
// Read indicates an expected call of Read.
|
2021-10-24 08:58:03 +00:00
|
|
|
func (mr *MockGCSReaderMockRecorder) Read(arg0 interface{}) *gomock.Call {
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Read", reflect.TypeOf((*MockGCSReader)(nil).Read), arg0)
|
2017-09-16 18:49:09 +00:00
|
|
|
}
|
|
|
|
|
2022-05-24 12:16:01 +00:00
|
|
|
// Remain mocks base method.
|
2021-10-24 08:58:03 +00:00
|
|
|
func (m *MockGCSReader) Remain() int64 {
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
ret := m.ctrl.Call(m, "Remain")
|
2017-09-16 18:49:09 +00:00
|
|
|
ret0, _ := ret[0].(int64)
|
|
|
|
return ret0
|
|
|
|
}
|
|
|
|
|
2022-05-24 12:16:01 +00:00
|
|
|
// Remain indicates an expected call of Remain.
|
2021-10-24 08:58:03 +00:00
|
|
|
func (mr *MockGCSReaderMockRecorder) Remain() *gomock.Call {
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remain", reflect.TypeOf((*MockGCSReader)(nil).Remain))
|
2017-09-16 18:49:09 +00:00
|
|
|
}
|
|
|
|
|
2022-05-24 12:16:01 +00:00
|
|
|
// Size mocks base method.
|
2021-10-24 08:58:03 +00:00
|
|
|
func (m *MockGCSReader) Size() int64 {
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
ret := m.ctrl.Call(m, "Size")
|
2017-09-16 18:49:09 +00:00
|
|
|
ret0, _ := ret[0].(int64)
|
|
|
|
return ret0
|
|
|
|
}
|
|
|
|
|
2022-05-24 12:16:01 +00:00
|
|
|
// Size indicates an expected call of Size.
|
2021-10-24 08:58:03 +00:00
|
|
|
func (mr *MockGCSReaderMockRecorder) Size() *gomock.Call {
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Size", reflect.TypeOf((*MockGCSReader)(nil).Size))
|
2017-09-16 18:49:09 +00:00
|
|
|
}
|
|
|
|
|
2022-05-24 12:16:01 +00:00
|
|
|
// MockGCSAPI is a mock of GCSAPI interface.
|
2017-09-16 18:49:09 +00:00
|
|
|
type MockGCSAPI struct {
|
|
|
|
ctrl *gomock.Controller
|
2021-10-24 08:58:03 +00:00
|
|
|
recorder *MockGCSAPIMockRecorder
|
2017-09-16 18:49:09 +00:00
|
|
|
}
|
|
|
|
|
2022-05-24 12:16:01 +00:00
|
|
|
// MockGCSAPIMockRecorder is the mock recorder for MockGCSAPI.
|
2021-10-24 08:58:03 +00:00
|
|
|
type MockGCSAPIMockRecorder struct {
|
2017-09-16 18:49:09 +00:00
|
|
|
mock *MockGCSAPI
|
|
|
|
}
|
|
|
|
|
2022-05-24 12:16:01 +00:00
|
|
|
// NewMockGCSAPI creates a new mock instance.
|
2017-09-16 18:49:09 +00:00
|
|
|
func NewMockGCSAPI(ctrl *gomock.Controller) *MockGCSAPI {
|
|
|
|
mock := &MockGCSAPI{ctrl: ctrl}
|
2021-10-24 08:58:03 +00:00
|
|
|
mock.recorder = &MockGCSAPIMockRecorder{mock}
|
2017-09-16 18:49:09 +00:00
|
|
|
return mock
|
|
|
|
}
|
|
|
|
|
2022-05-24 12:16:01 +00:00
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
2021-10-24 08:58:03 +00:00
|
|
|
func (m *MockGCSAPI) EXPECT() *MockGCSAPIMockRecorder {
|
|
|
|
return m.recorder
|
2017-09-16 18:49:09 +00:00
|
|
|
}
|
|
|
|
|
2022-05-24 12:16:01 +00:00
|
|
|
// ComposeObjects mocks base method.
|
2021-10-24 08:58:03 +00:00
|
|
|
func (m *MockGCSAPI) ComposeObjects(arg0 context.Context, arg1 gcsstore.GCSComposeParams) error {
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
ret := m.ctrl.Call(m, "ComposeObjects", arg0, arg1)
|
2017-09-16 18:49:09 +00:00
|
|
|
ret0, _ := ret[0].(error)
|
|
|
|
return ret0
|
|
|
|
}
|
|
|
|
|
2022-05-24 12:16:01 +00:00
|
|
|
// ComposeObjects indicates an expected call of ComposeObjects.
|
2021-10-24 08:58:03 +00:00
|
|
|
func (mr *MockGCSAPIMockRecorder) ComposeObjects(arg0, arg1 interface{}) *gomock.Call {
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ComposeObjects", reflect.TypeOf((*MockGCSAPI)(nil).ComposeObjects), arg0, arg1)
|
2017-09-16 18:49:09 +00:00
|
|
|
}
|
|
|
|
|
2022-05-24 12:16:01 +00:00
|
|
|
// DeleteObject mocks base method.
|
2021-10-24 08:58:03 +00:00
|
|
|
func (m *MockGCSAPI) DeleteObject(arg0 context.Context, arg1 gcsstore.GCSObjectParams) error {
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
ret := m.ctrl.Call(m, "DeleteObject", arg0, arg1)
|
2017-09-16 18:49:09 +00:00
|
|
|
ret0, _ := ret[0].(error)
|
|
|
|
return ret0
|
|
|
|
}
|
|
|
|
|
2022-05-24 12:16:01 +00:00
|
|
|
// DeleteObject indicates an expected call of DeleteObject.
|
2021-10-24 08:58:03 +00:00
|
|
|
func (mr *MockGCSAPIMockRecorder) DeleteObject(arg0, arg1 interface{}) *gomock.Call {
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteObject", reflect.TypeOf((*MockGCSAPI)(nil).DeleteObject), arg0, arg1)
|
2017-09-16 18:49:09 +00:00
|
|
|
}
|
|
|
|
|
2022-05-24 12:16:01 +00:00
|
|
|
// DeleteObjectsWithFilter mocks base method.
|
2021-10-24 08:58:03 +00:00
|
|
|
func (m *MockGCSAPI) DeleteObjectsWithFilter(arg0 context.Context, arg1 gcsstore.GCSFilterParams) error {
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
ret := m.ctrl.Call(m, "DeleteObjectsWithFilter", arg0, arg1)
|
2017-09-16 18:49:09 +00:00
|
|
|
ret0, _ := ret[0].(error)
|
|
|
|
return ret0
|
|
|
|
}
|
|
|
|
|
2022-05-24 12:16:01 +00:00
|
|
|
// DeleteObjectsWithFilter indicates an expected call of DeleteObjectsWithFilter.
|
2021-10-24 08:58:03 +00:00
|
|
|
func (mr *MockGCSAPIMockRecorder) DeleteObjectsWithFilter(arg0, arg1 interface{}) *gomock.Call {
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteObjectsWithFilter", reflect.TypeOf((*MockGCSAPI)(nil).DeleteObjectsWithFilter), arg0, arg1)
|
2017-09-16 18:49:09 +00:00
|
|
|
}
|
|
|
|
|
2022-05-24 12:16:01 +00:00
|
|
|
// FilterObjects mocks base method.
|
2021-10-24 08:58:03 +00:00
|
|
|
func (m *MockGCSAPI) FilterObjects(arg0 context.Context, arg1 gcsstore.GCSFilterParams) ([]string, error) {
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
ret := m.ctrl.Call(m, "FilterObjects", arg0, arg1)
|
2017-09-16 18:49:09 +00:00
|
|
|
ret0, _ := ret[0].([]string)
|
|
|
|
ret1, _ := ret[1].(error)
|
|
|
|
return ret0, ret1
|
|
|
|
}
|
|
|
|
|
2022-05-24 12:16:01 +00:00
|
|
|
// FilterObjects indicates an expected call of FilterObjects.
|
2021-10-24 08:58:03 +00:00
|
|
|
func (mr *MockGCSAPIMockRecorder) FilterObjects(arg0, arg1 interface{}) *gomock.Call {
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FilterObjects", reflect.TypeOf((*MockGCSAPI)(nil).FilterObjects), arg0, arg1)
|
2017-09-16 18:49:09 +00:00
|
|
|
}
|
|
|
|
|
2022-05-24 12:16:01 +00:00
|
|
|
// GetObjectSize mocks base method.
|
2021-10-24 08:58:03 +00:00
|
|
|
func (m *MockGCSAPI) GetObjectSize(arg0 context.Context, arg1 gcsstore.GCSObjectParams) (int64, error) {
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
ret := m.ctrl.Call(m, "GetObjectSize", arg0, arg1)
|
2017-09-16 18:49:09 +00:00
|
|
|
ret0, _ := ret[0].(int64)
|
|
|
|
ret1, _ := ret[1].(error)
|
|
|
|
return ret0, ret1
|
|
|
|
}
|
|
|
|
|
2022-05-24 12:16:01 +00:00
|
|
|
// GetObjectSize indicates an expected call of GetObjectSize.
|
2021-10-24 08:58:03 +00:00
|
|
|
func (mr *MockGCSAPIMockRecorder) GetObjectSize(arg0, arg1 interface{}) *gomock.Call {
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetObjectSize", reflect.TypeOf((*MockGCSAPI)(nil).GetObjectSize), arg0, arg1)
|
2017-09-16 18:49:09 +00:00
|
|
|
}
|
|
|
|
|
2022-05-24 12:16:01 +00:00
|
|
|
// ReadObject mocks base method.
|
2021-10-24 08:58:03 +00:00
|
|
|
func (m *MockGCSAPI) ReadObject(arg0 context.Context, arg1 gcsstore.GCSObjectParams) (gcsstore.GCSReader, error) {
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
ret := m.ctrl.Call(m, "ReadObject", arg0, arg1)
|
2017-09-16 18:49:09 +00:00
|
|
|
ret0, _ := ret[0].(gcsstore.GCSReader)
|
|
|
|
ret1, _ := ret[1].(error)
|
|
|
|
return ret0, ret1
|
|
|
|
}
|
|
|
|
|
2022-05-24 12:16:01 +00:00
|
|
|
// ReadObject indicates an expected call of ReadObject.
|
2021-10-24 08:58:03 +00:00
|
|
|
func (mr *MockGCSAPIMockRecorder) ReadObject(arg0, arg1 interface{}) *gomock.Call {
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadObject", reflect.TypeOf((*MockGCSAPI)(nil).ReadObject), arg0, arg1)
|
2017-09-16 18:49:09 +00:00
|
|
|
}
|
|
|
|
|
2022-05-24 12:16:01 +00:00
|
|
|
// SetObjectMetadata mocks base method.
|
2021-10-24 08:58:03 +00:00
|
|
|
func (m *MockGCSAPI) SetObjectMetadata(arg0 context.Context, arg1 gcsstore.GCSObjectParams, arg2 map[string]string) error {
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
ret := m.ctrl.Call(m, "SetObjectMetadata", arg0, arg1, arg2)
|
2017-09-16 18:49:09 +00:00
|
|
|
ret0, _ := ret[0].(error)
|
|
|
|
return ret0
|
|
|
|
}
|
|
|
|
|
2022-05-24 12:16:01 +00:00
|
|
|
// SetObjectMetadata indicates an expected call of SetObjectMetadata.
|
2021-10-24 08:58:03 +00:00
|
|
|
func (mr *MockGCSAPIMockRecorder) SetObjectMetadata(arg0, arg1, arg2 interface{}) *gomock.Call {
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetObjectMetadata", reflect.TypeOf((*MockGCSAPI)(nil).SetObjectMetadata), arg0, arg1, arg2)
|
2017-09-16 18:49:09 +00:00
|
|
|
}
|
|
|
|
|
2022-05-24 12:16:01 +00:00
|
|
|
// WriteObject mocks base method.
|
2021-10-24 08:58:03 +00:00
|
|
|
func (m *MockGCSAPI) WriteObject(arg0 context.Context, arg1 gcsstore.GCSObjectParams, arg2 io.Reader) (int64, error) {
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
ret := m.ctrl.Call(m, "WriteObject", arg0, arg1, arg2)
|
2017-09-16 18:49:09 +00:00
|
|
|
ret0, _ := ret[0].(int64)
|
|
|
|
ret1, _ := ret[1].(error)
|
|
|
|
return ret0, ret1
|
|
|
|
}
|
|
|
|
|
2022-05-24 12:16:01 +00:00
|
|
|
// WriteObject indicates an expected call of WriteObject.
|
2021-10-24 08:58:03 +00:00
|
|
|
func (mr *MockGCSAPIMockRecorder) WriteObject(arg0, arg1, arg2 interface{}) *gomock.Call {
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteObject", reflect.TypeOf((*MockGCSAPI)(nil).WriteObject), arg0, arg1, arg2)
|
2017-09-16 18:49:09 +00:00
|
|
|
}
|