github.com/niedbalski/juju@v0.0.0-20190215020005-8ff100488e47/cmd/juju/backups/mock_test.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: github.com/juju/juju/cmd/juju/backups (interfaces: ArchiveReader,APIClient) 3 4 // Package backups_test is a generated GoMock package. 5 package backups_test 6 7 import ( 8 io "io" 9 reflect "reflect" 10 11 gomock "github.com/golang/mock/gomock" 12 backups "github.com/juju/juju/api/backups" 13 params "github.com/juju/juju/apiserver/params" 14 ) 15 16 // MockArchiveReader is a mock of ArchiveReader interface 17 type MockArchiveReader struct { 18 ctrl *gomock.Controller 19 recorder *MockArchiveReaderMockRecorder 20 } 21 22 // MockArchiveReaderMockRecorder is the mock recorder for MockArchiveReader 23 type MockArchiveReaderMockRecorder struct { 24 mock *MockArchiveReader 25 } 26 27 // NewMockArchiveReader creates a new mock instance 28 func NewMockArchiveReader(ctrl *gomock.Controller) *MockArchiveReader { 29 mock := &MockArchiveReader{ctrl: ctrl} 30 mock.recorder = &MockArchiveReaderMockRecorder{mock} 31 return mock 32 } 33 34 // EXPECT returns an object that allows the caller to indicate expected use 35 func (m *MockArchiveReader) EXPECT() *MockArchiveReaderMockRecorder { 36 return m.recorder 37 } 38 39 // Close mocks base method 40 func (m *MockArchiveReader) Close() error { 41 ret := m.ctrl.Call(m, "Close") 42 ret0, _ := ret[0].(error) 43 return ret0 44 } 45 46 // Close indicates an expected call of Close 47 func (mr *MockArchiveReaderMockRecorder) Close() *gomock.Call { 48 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockArchiveReader)(nil).Close)) 49 } 50 51 // Read mocks base method 52 func (m *MockArchiveReader) Read(arg0 []byte) (int, error) { 53 ret := m.ctrl.Call(m, "Read", arg0) 54 ret0, _ := ret[0].(int) 55 ret1, _ := ret[1].(error) 56 return ret0, ret1 57 } 58 59 // Read indicates an expected call of Read 60 func (mr *MockArchiveReaderMockRecorder) Read(arg0 interface{}) *gomock.Call { 61 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Read", reflect.TypeOf((*MockArchiveReader)(nil).Read), arg0) 62 } 63 64 // Seek mocks base method 65 func (m *MockArchiveReader) Seek(arg0 int64, arg1 int) (int64, error) { 66 ret := m.ctrl.Call(m, "Seek", arg0, arg1) 67 ret0, _ := ret[0].(int64) 68 ret1, _ := ret[1].(error) 69 return ret0, ret1 70 } 71 72 // Seek indicates an expected call of Seek 73 func (mr *MockArchiveReaderMockRecorder) Seek(arg0, arg1 interface{}) *gomock.Call { 74 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Seek", reflect.TypeOf((*MockArchiveReader)(nil).Seek), arg0, arg1) 75 } 76 77 // MockAPIClient is a mock of APIClient interface 78 type MockAPIClient struct { 79 ctrl *gomock.Controller 80 recorder *MockAPIClientMockRecorder 81 } 82 83 // MockAPIClientMockRecorder is the mock recorder for MockAPIClient 84 type MockAPIClientMockRecorder struct { 85 mock *MockAPIClient 86 } 87 88 // NewMockAPIClient creates a new mock instance 89 func NewMockAPIClient(ctrl *gomock.Controller) *MockAPIClient { 90 mock := &MockAPIClient{ctrl: ctrl} 91 mock.recorder = &MockAPIClientMockRecorder{mock} 92 return mock 93 } 94 95 // EXPECT returns an object that allows the caller to indicate expected use 96 func (m *MockAPIClient) EXPECT() *MockAPIClientMockRecorder { 97 return m.recorder 98 } 99 100 // Close mocks base method 101 func (m *MockAPIClient) Close() error { 102 ret := m.ctrl.Call(m, "Close") 103 ret0, _ := ret[0].(error) 104 return ret0 105 } 106 107 // Close indicates an expected call of Close 108 func (mr *MockAPIClientMockRecorder) Close() *gomock.Call { 109 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockAPIClient)(nil).Close)) 110 } 111 112 // Create mocks base method 113 func (m *MockAPIClient) Create(arg0 string, arg1, arg2 bool) (*params.BackupsMetadataResult, error) { 114 ret := m.ctrl.Call(m, "Create", arg0, arg1, arg2) 115 ret0, _ := ret[0].(*params.BackupsMetadataResult) 116 ret1, _ := ret[1].(error) 117 return ret0, ret1 118 } 119 120 // Create indicates an expected call of Create 121 func (mr *MockAPIClientMockRecorder) Create(arg0, arg1, arg2 interface{}) *gomock.Call { 122 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockAPIClient)(nil).Create), arg0, arg1, arg2) 123 } 124 125 // Download mocks base method 126 func (m *MockAPIClient) Download(arg0 string) (io.ReadCloser, error) { 127 ret := m.ctrl.Call(m, "Download", arg0) 128 ret0, _ := ret[0].(io.ReadCloser) 129 ret1, _ := ret[1].(error) 130 return ret0, ret1 131 } 132 133 // Download indicates an expected call of Download 134 func (mr *MockAPIClientMockRecorder) Download(arg0 interface{}) *gomock.Call { 135 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Download", reflect.TypeOf((*MockAPIClient)(nil).Download), arg0) 136 } 137 138 // Info mocks base method 139 func (m *MockAPIClient) Info(arg0 string) (*params.BackupsMetadataResult, error) { 140 ret := m.ctrl.Call(m, "Info", arg0) 141 ret0, _ := ret[0].(*params.BackupsMetadataResult) 142 ret1, _ := ret[1].(error) 143 return ret0, ret1 144 } 145 146 // Info indicates an expected call of Info 147 func (mr *MockAPIClientMockRecorder) Info(arg0 interface{}) *gomock.Call { 148 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Info", reflect.TypeOf((*MockAPIClient)(nil).Info), arg0) 149 } 150 151 // List mocks base method 152 func (m *MockAPIClient) List() (*params.BackupsListResult, error) { 153 ret := m.ctrl.Call(m, "List") 154 ret0, _ := ret[0].(*params.BackupsListResult) 155 ret1, _ := ret[1].(error) 156 return ret0, ret1 157 } 158 159 // List indicates an expected call of List 160 func (mr *MockAPIClientMockRecorder) List() *gomock.Call { 161 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockAPIClient)(nil).List)) 162 } 163 164 // Remove mocks base method 165 func (m *MockAPIClient) Remove(arg0 ...string) ([]params.ErrorResult, error) { 166 varargs := []interface{}{} 167 for _, a := range arg0 { 168 varargs = append(varargs, a) 169 } 170 ret := m.ctrl.Call(m, "Remove", varargs...) 171 ret0, _ := ret[0].([]params.ErrorResult) 172 ret1, _ := ret[1].(error) 173 return ret0, ret1 174 } 175 176 // Remove indicates an expected call of Remove 177 func (mr *MockAPIClientMockRecorder) Remove(arg0 ...interface{}) *gomock.Call { 178 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockAPIClient)(nil).Remove), arg0...) 179 } 180 181 // Restore mocks base method 182 func (m *MockAPIClient) Restore(arg0 string, arg1 backups.ClientConnection) error { 183 ret := m.ctrl.Call(m, "Restore", arg0, arg1) 184 ret0, _ := ret[0].(error) 185 return ret0 186 } 187 188 // Restore indicates an expected call of Restore 189 func (mr *MockAPIClientMockRecorder) Restore(arg0, arg1 interface{}) *gomock.Call { 190 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Restore", reflect.TypeOf((*MockAPIClient)(nil).Restore), arg0, arg1) 191 } 192 193 // RestoreReader mocks base method 194 func (m *MockAPIClient) RestoreReader(arg0 io.ReadSeeker, arg1 *params.BackupsMetadataResult, arg2 backups.ClientConnection) error { 195 ret := m.ctrl.Call(m, "RestoreReader", arg0, arg1, arg2) 196 ret0, _ := ret[0].(error) 197 return ret0 198 } 199 200 // RestoreReader indicates an expected call of RestoreReader 201 func (mr *MockAPIClientMockRecorder) RestoreReader(arg0, arg1, arg2 interface{}) *gomock.Call { 202 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RestoreReader", reflect.TypeOf((*MockAPIClient)(nil).RestoreReader), arg0, arg1, arg2) 203 } 204 205 // Upload mocks base method 206 func (m *MockAPIClient) Upload(arg0 io.ReadSeeker, arg1 params.BackupsMetadataResult) (string, error) { 207 ret := m.ctrl.Call(m, "Upload", arg0, arg1) 208 ret0, _ := ret[0].(string) 209 ret1, _ := ret[1].(error) 210 return ret0, ret1 211 } 212 213 // Upload indicates an expected call of Upload 214 func (mr *MockAPIClientMockRecorder) Upload(arg0, arg1 interface{}) *gomock.Call { 215 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Upload", reflect.TypeOf((*MockAPIClient)(nil).Upload), arg0, arg1) 216 }