/
mock_storage_client.go
252 lines (216 loc) · 9.93 KB
/
mock_storage_client.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
// Copyright 2019 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/GoogleCloudPlatform/compute-image-import/cli_tools/common/domain (interfaces: StorageClientInterface)
// Package mocks is a generated GoMock package.
package mocks
import (
io "io"
reflect "reflect"
storage "cloud.google.com/go/storage"
domain "github.com/GoogleCloudPlatform/compute-image-import/cli_tools/common/domain"
gomock "github.com/golang/mock/gomock"
)
// MockStorageClientInterface is a mock of StorageClientInterface interface.
type MockStorageClientInterface struct {
ctrl *gomock.Controller
recorder *MockStorageClientInterfaceMockRecorder
}
// MockStorageClientInterfaceMockRecorder is the mock recorder for MockStorageClientInterface.
type MockStorageClientInterfaceMockRecorder struct {
mock *MockStorageClientInterface
}
// NewMockStorageClientInterface creates a new mock instance.
func NewMockStorageClientInterface(ctrl *gomock.Controller) *MockStorageClientInterface {
mock := &MockStorageClientInterface{ctrl: ctrl}
mock.recorder = &MockStorageClientInterfaceMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockStorageClientInterface) EXPECT() *MockStorageClientInterfaceMockRecorder {
return m.recorder
}
// Buckets mocks base method.
func (m *MockStorageClientInterface) Buckets(arg0 string) *storage.BucketIterator {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Buckets", arg0)
ret0, _ := ret[0].(*storage.BucketIterator)
return ret0
}
// Buckets indicates an expected call of Buckets.
func (mr *MockStorageClientInterfaceMockRecorder) Buckets(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Buckets", reflect.TypeOf((*MockStorageClientInterface)(nil).Buckets), arg0)
}
// Close mocks base method.
func (m *MockStorageClientInterface) Close() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Close")
ret0, _ := ret[0].(error)
return ret0
}
// Close indicates an expected call of Close.
func (mr *MockStorageClientInterfaceMockRecorder) Close() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockStorageClientInterface)(nil).Close))
}
// CreateBucket mocks base method.
func (m *MockStorageClientInterface) CreateBucket(arg0, arg1 string, arg2 *storage.BucketAttrs) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CreateBucket", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// CreateBucket indicates an expected call of CreateBucket.
func (mr *MockStorageClientInterfaceMockRecorder) CreateBucket(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateBucket", reflect.TypeOf((*MockStorageClientInterface)(nil).CreateBucket), arg0, arg1, arg2)
}
// DeleteGcsPath mocks base method.
func (m *MockStorageClientInterface) DeleteGcsPath(arg0 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DeleteGcsPath", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// DeleteGcsPath indicates an expected call of DeleteGcsPath.
func (mr *MockStorageClientInterfaceMockRecorder) DeleteGcsPath(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteGcsPath", reflect.TypeOf((*MockStorageClientInterface)(nil).DeleteGcsPath), arg0)
}
// DeleteObject mocks base method.
func (m *MockStorageClientInterface) DeleteObject(arg0 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DeleteObject", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// DeleteObject indicates an expected call of DeleteObject.
func (mr *MockStorageClientInterfaceMockRecorder) DeleteObject(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteObject", reflect.TypeOf((*MockStorageClientInterface)(nil).DeleteObject), arg0)
}
// FindGcsFile mocks base method.
func (m *MockStorageClientInterface) FindGcsFile(arg0, arg1 string) (*storage.ObjectHandle, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "FindGcsFile", arg0, arg1)
ret0, _ := ret[0].(*storage.ObjectHandle)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// FindGcsFile indicates an expected call of FindGcsFile.
func (mr *MockStorageClientInterfaceMockRecorder) FindGcsFile(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindGcsFile", reflect.TypeOf((*MockStorageClientInterface)(nil).FindGcsFile), arg0, arg1)
}
// FindGcsFileDepthLimited mocks base method.
func (m *MockStorageClientInterface) FindGcsFileDepthLimited(arg0, arg1 string, arg2 int) (*storage.ObjectHandle, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "FindGcsFileDepthLimited", arg0, arg1, arg2)
ret0, _ := ret[0].(*storage.ObjectHandle)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// FindGcsFileDepthLimited indicates an expected call of FindGcsFileDepthLimited.
func (mr *MockStorageClientInterfaceMockRecorder) FindGcsFileDepthLimited(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindGcsFileDepthLimited", reflect.TypeOf((*MockStorageClientInterface)(nil).FindGcsFileDepthLimited), arg0, arg1, arg2)
}
// GetBucket mocks base method.
func (m *MockStorageClientInterface) GetBucket(arg0 string) *storage.BucketHandle {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetBucket", arg0)
ret0, _ := ret[0].(*storage.BucketHandle)
return ret0
}
// GetBucket indicates an expected call of GetBucket.
func (mr *MockStorageClientInterfaceMockRecorder) GetBucket(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBucket", reflect.TypeOf((*MockStorageClientInterface)(nil).GetBucket), arg0)
}
// GetBucketAttrs mocks base method.
func (m *MockStorageClientInterface) GetBucketAttrs(arg0 string) (*storage.BucketAttrs, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetBucketAttrs", arg0)
ret0, _ := ret[0].(*storage.BucketAttrs)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetBucketAttrs indicates an expected call of GetBucketAttrs.
func (mr *MockStorageClientInterfaceMockRecorder) GetBucketAttrs(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBucketAttrs", reflect.TypeOf((*MockStorageClientInterface)(nil).GetBucketAttrs), arg0)
}
// GetGcsFileContent mocks base method.
func (m *MockStorageClientInterface) GetGcsFileContent(arg0 *storage.ObjectHandle) ([]byte, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetGcsFileContent", arg0)
ret0, _ := ret[0].([]byte)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetGcsFileContent indicates an expected call of GetGcsFileContent.
func (mr *MockStorageClientInterfaceMockRecorder) GetGcsFileContent(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetGcsFileContent", reflect.TypeOf((*MockStorageClientInterface)(nil).GetGcsFileContent), arg0)
}
// GetObject mocks base method.
func (m *MockStorageClientInterface) GetObject(arg0, arg1 string) domain.StorageObject {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetObject", arg0, arg1)
ret0, _ := ret[0].(domain.StorageObject)
return ret0
}
// GetObject indicates an expected call of GetObject.
func (mr *MockStorageClientInterfaceMockRecorder) GetObject(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetObject", reflect.TypeOf((*MockStorageClientInterface)(nil).GetObject), arg0, arg1)
}
// GetObjectAttrs mocks base method.
func (m *MockStorageClientInterface) GetObjectAttrs(arg0, arg1 string) (*storage.ObjectAttrs, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetObjectAttrs", arg0, arg1)
ret0, _ := ret[0].(*storage.ObjectAttrs)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetObjectAttrs indicates an expected call of GetObjectAttrs.
func (mr *MockStorageClientInterfaceMockRecorder) GetObjectAttrs(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetObjectAttrs", reflect.TypeOf((*MockStorageClientInterface)(nil).GetObjectAttrs), arg0, arg1)
}
// GetObjects mocks base method.
func (m *MockStorageClientInterface) GetObjects(arg0, arg1 string) domain.ObjectIteratorInterface {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetObjects", arg0, arg1)
ret0, _ := ret[0].(domain.ObjectIteratorInterface)
return ret0
}
// GetObjects indicates an expected call of GetObjects.
func (mr *MockStorageClientInterfaceMockRecorder) GetObjects(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetObjects", reflect.TypeOf((*MockStorageClientInterface)(nil).GetObjects), arg0, arg1)
}
// WriteToGCS mocks base method.
func (m *MockStorageClientInterface) WriteToGCS(arg0, arg1 string, arg2 io.Reader) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "WriteToGCS", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// WriteToGCS indicates an expected call of WriteToGCS.
func (mr *MockStorageClientInterfaceMockRecorder) WriteToGCS(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteToGCS", reflect.TypeOf((*MockStorageClientInterface)(nil).WriteToGCS), arg0, arg1, arg2)
}