github.com/pingcap/br@v5.3.0-alpha.0.20220125034240-ec59c7b6ce30+incompatible/pkg/mock/storage/storage.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: github.com/pingcap/br/pkg/storage (interfaces: ExternalStorage) 3 4 // $ mockgen -package mockstorage github.com/pingcap/br/pkg/storage ExternalStorage > pkg/mock/storage/storage.go 5 6 // Package mockstorage is a generated GoMock package. 7 package mockstorage 8 9 import ( 10 context "context" 11 gomock "github.com/golang/mock/gomock" 12 storage "github.com/pingcap/br/pkg/storage" 13 reflect "reflect" 14 ) 15 16 // MockExternalStorage is a mock of ExternalStorage interface 17 type MockExternalStorage struct { 18 ctrl *gomock.Controller 19 recorder *MockExternalStorageMockRecorder 20 } 21 22 // MockExternalStorageMockRecorder is the mock recorder for MockExternalStorage 23 type MockExternalStorageMockRecorder struct { 24 mock *MockExternalStorage 25 } 26 27 // NewMockExternalStorage creates a new mock instance 28 func NewMockExternalStorage(ctrl *gomock.Controller) *MockExternalStorage { 29 mock := &MockExternalStorage{ctrl: ctrl} 30 mock.recorder = &MockExternalStorageMockRecorder{mock} 31 return mock 32 } 33 34 // EXPECT returns an object that allows the caller to indicate expected use 35 func (m *MockExternalStorage) EXPECT() *MockExternalStorageMockRecorder { 36 return m.recorder 37 } 38 39 // Create mocks base method 40 func (m *MockExternalStorage) Create(arg0 context.Context, arg1 string) (storage.ExternalFileWriter, error) { 41 m.ctrl.T.Helper() 42 ret := m.ctrl.Call(m, "Create", arg0, arg1) 43 ret0, _ := ret[0].(storage.ExternalFileWriter) 44 ret1, _ := ret[1].(error) 45 return ret0, ret1 46 } 47 48 // Create indicates an expected call of Create 49 func (mr *MockExternalStorageMockRecorder) Create(arg0, arg1 interface{}) *gomock.Call { 50 mr.mock.ctrl.T.Helper() 51 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockExternalStorage)(nil).Create), arg0, arg1) 52 } 53 54 // FileExists mocks base method 55 func (m *MockExternalStorage) FileExists(arg0 context.Context, arg1 string) (bool, error) { 56 m.ctrl.T.Helper() 57 ret := m.ctrl.Call(m, "FileExists", arg0, arg1) 58 ret0, _ := ret[0].(bool) 59 ret1, _ := ret[1].(error) 60 return ret0, ret1 61 } 62 63 // FileExists indicates an expected call of FileExists 64 func (mr *MockExternalStorageMockRecorder) FileExists(arg0, arg1 interface{}) *gomock.Call { 65 mr.mock.ctrl.T.Helper() 66 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FileExists", reflect.TypeOf((*MockExternalStorage)(nil).FileExists), arg0, arg1) 67 } 68 69 // Open mocks base method 70 func (m *MockExternalStorage) Open(arg0 context.Context, arg1 string) (storage.ExternalFileReader, error) { 71 m.ctrl.T.Helper() 72 ret := m.ctrl.Call(m, "Open", arg0, arg1) 73 ret0, _ := ret[0].(storage.ExternalFileReader) 74 ret1, _ := ret[1].(error) 75 return ret0, ret1 76 } 77 78 // Open indicates an expected call of Open 79 func (mr *MockExternalStorageMockRecorder) Open(arg0, arg1 interface{}) *gomock.Call { 80 mr.mock.ctrl.T.Helper() 81 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Open", reflect.TypeOf((*MockExternalStorage)(nil).Open), arg0, arg1) 82 } 83 84 // ReadFile mocks base method 85 func (m *MockExternalStorage) ReadFile(arg0 context.Context, arg1 string) ([]byte, error) { 86 m.ctrl.T.Helper() 87 ret := m.ctrl.Call(m, "ReadFile", arg0, arg1) 88 ret0, _ := ret[0].([]byte) 89 ret1, _ := ret[1].(error) 90 return ret0, ret1 91 } 92 93 // ReadFile indicates an expected call of ReadFile 94 func (mr *MockExternalStorageMockRecorder) ReadFile(arg0, arg1 interface{}) *gomock.Call { 95 mr.mock.ctrl.T.Helper() 96 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadFile", reflect.TypeOf((*MockExternalStorage)(nil).ReadFile), arg0, arg1) 97 } 98 99 // URI mocks base method 100 func (m *MockExternalStorage) URI() string { 101 m.ctrl.T.Helper() 102 ret := m.ctrl.Call(m, "URI") 103 ret0, _ := ret[0].(string) 104 return ret0 105 } 106 107 // URI indicates an expected call of URI 108 func (mr *MockExternalStorageMockRecorder) URI() *gomock.Call { 109 mr.mock.ctrl.T.Helper() 110 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "URI", reflect.TypeOf((*MockExternalStorage)(nil).URI)) 111 } 112 113 // WalkDir mocks base method 114 func (m *MockExternalStorage) WalkDir(arg0 context.Context, arg1 *storage.WalkOption, arg2 func(string, int64) error) error { 115 m.ctrl.T.Helper() 116 ret := m.ctrl.Call(m, "WalkDir", arg0, arg1, arg2) 117 ret0, _ := ret[0].(error) 118 return ret0 119 } 120 121 // WalkDir indicates an expected call of WalkDir 122 func (mr *MockExternalStorageMockRecorder) WalkDir(arg0, arg1, arg2 interface{}) *gomock.Call { 123 mr.mock.ctrl.T.Helper() 124 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WalkDir", reflect.TypeOf((*MockExternalStorage)(nil).WalkDir), arg0, arg1, arg2) 125 } 126 127 // WriteFile mocks base method 128 func (m *MockExternalStorage) WriteFile(arg0 context.Context, arg1 string, arg2 []byte) error { 129 m.ctrl.T.Helper() 130 ret := m.ctrl.Call(m, "WriteFile", arg0, arg1, arg2) 131 ret0, _ := ret[0].(error) 132 return ret0 133 } 134 135 // WriteFile indicates an expected call of WriteFile 136 func (mr *MockExternalStorageMockRecorder) WriteFile(arg0, arg1, arg2 interface{}) *gomock.Call { 137 mr.mock.ctrl.T.Helper() 138 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteFile", reflect.TypeOf((*MockExternalStorage)(nil).WriteFile), arg0, arg1, arg2) 139 }