This repository has been archived by the owner on Oct 9, 2023. It is now read-only.
/
raw_store.go
266 lines (209 loc) · 7.83 KB
/
raw_store.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
253
254
255
256
257
258
259
260
261
262
263
264
265
266
// Code generated by mockery v1.0.1. DO NOT EDIT.
package mocks
import (
context "context"
io "io"
mock "github.com/stretchr/testify/mock"
storage "github.com/flyteorg/flytestdlib/storage"
)
// RawStore is an autogenerated mock type for the RawStore type
type RawStore struct {
mock.Mock
}
type RawStore_CopyRaw struct {
*mock.Call
}
func (_m RawStore_CopyRaw) Return(_a0 error) *RawStore_CopyRaw {
return &RawStore_CopyRaw{Call: _m.Call.Return(_a0)}
}
func (_m *RawStore) OnCopyRaw(ctx context.Context, source storage.DataReference, destination storage.DataReference, opts storage.Options) *RawStore_CopyRaw {
c := _m.On("CopyRaw", ctx, source, destination, opts)
return &RawStore_CopyRaw{Call: c}
}
func (_m *RawStore) OnCopyRawMatch(matchers ...interface{}) *RawStore_CopyRaw {
c := _m.On("CopyRaw", matchers...)
return &RawStore_CopyRaw{Call: c}
}
// CopyRaw provides a mock function with given fields: ctx, source, destination, opts
func (_m *RawStore) CopyRaw(ctx context.Context, source storage.DataReference, destination storage.DataReference, opts storage.Options) error {
ret := _m.Called(ctx, source, destination, opts)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, storage.DataReference, storage.DataReference, storage.Options) error); ok {
r0 = rf(ctx, source, destination, opts)
} else {
r0 = ret.Error(0)
}
return r0
}
type RawStore_CreateSignedURL struct {
*mock.Call
}
func (_m RawStore_CreateSignedURL) Return(_a0 storage.SignedURLResponse, _a1 error) *RawStore_CreateSignedURL {
return &RawStore_CreateSignedURL{Call: _m.Call.Return(_a0, _a1)}
}
func (_m *RawStore) OnCreateSignedURL(ctx context.Context, reference storage.DataReference, properties storage.SignedURLProperties) *RawStore_CreateSignedURL {
c := _m.On("CreateSignedURL", ctx, reference, properties)
return &RawStore_CreateSignedURL{Call: c}
}
func (_m *RawStore) OnCreateSignedURLMatch(matchers ...interface{}) *RawStore_CreateSignedURL {
c := _m.On("CreateSignedURL", matchers...)
return &RawStore_CreateSignedURL{Call: c}
}
// CreateSignedURL provides a mock function with given fields: ctx, reference, properties
func (_m *RawStore) CreateSignedURL(ctx context.Context, reference storage.DataReference, properties storage.SignedURLProperties) (storage.SignedURLResponse, error) {
ret := _m.Called(ctx, reference, properties)
var r0 storage.SignedURLResponse
if rf, ok := ret.Get(0).(func(context.Context, storage.DataReference, storage.SignedURLProperties) storage.SignedURLResponse); ok {
r0 = rf(ctx, reference, properties)
} else {
r0 = ret.Get(0).(storage.SignedURLResponse)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, storage.DataReference, storage.SignedURLProperties) error); ok {
r1 = rf(ctx, reference, properties)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
type RawStore_Delete struct {
*mock.Call
}
func (_m RawStore_Delete) Return(_a0 error) *RawStore_Delete {
return &RawStore_Delete{Call: _m.Call.Return(_a0)}
}
func (_m *RawStore) OnDelete(ctx context.Context, reference storage.DataReference) *RawStore_Delete {
c := _m.On("Delete", ctx, reference)
return &RawStore_Delete{Call: c}
}
func (_m *RawStore) OnDeleteMatch(matchers ...interface{}) *RawStore_Delete {
c := _m.On("Delete", matchers...)
return &RawStore_Delete{Call: c}
}
// Delete provides a mock function with given fields: ctx, reference
func (_m *RawStore) Delete(ctx context.Context, reference storage.DataReference) error {
ret := _m.Called(ctx, reference)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, storage.DataReference) error); ok {
r0 = rf(ctx, reference)
} else {
r0 = ret.Error(0)
}
return r0
}
type RawStore_GetBaseContainerFQN struct {
*mock.Call
}
func (_m RawStore_GetBaseContainerFQN) Return(_a0 storage.DataReference) *RawStore_GetBaseContainerFQN {
return &RawStore_GetBaseContainerFQN{Call: _m.Call.Return(_a0)}
}
func (_m *RawStore) OnGetBaseContainerFQN(ctx context.Context) *RawStore_GetBaseContainerFQN {
c := _m.On("GetBaseContainerFQN", ctx)
return &RawStore_GetBaseContainerFQN{Call: c}
}
func (_m *RawStore) OnGetBaseContainerFQNMatch(matchers ...interface{}) *RawStore_GetBaseContainerFQN {
c := _m.On("GetBaseContainerFQN", matchers...)
return &RawStore_GetBaseContainerFQN{Call: c}
}
// GetBaseContainerFQN provides a mock function with given fields: ctx
func (_m *RawStore) GetBaseContainerFQN(ctx context.Context) storage.DataReference {
ret := _m.Called(ctx)
var r0 storage.DataReference
if rf, ok := ret.Get(0).(func(context.Context) storage.DataReference); ok {
r0 = rf(ctx)
} else {
r0 = ret.Get(0).(storage.DataReference)
}
return r0
}
type RawStore_Head struct {
*mock.Call
}
func (_m RawStore_Head) Return(_a0 storage.Metadata, _a1 error) *RawStore_Head {
return &RawStore_Head{Call: _m.Call.Return(_a0, _a1)}
}
func (_m *RawStore) OnHead(ctx context.Context, reference storage.DataReference) *RawStore_Head {
c := _m.On("Head", ctx, reference)
return &RawStore_Head{Call: c}
}
func (_m *RawStore) OnHeadMatch(matchers ...interface{}) *RawStore_Head {
c := _m.On("Head", matchers...)
return &RawStore_Head{Call: c}
}
// Head provides a mock function with given fields: ctx, reference
func (_m *RawStore) Head(ctx context.Context, reference storage.DataReference) (storage.Metadata, error) {
ret := _m.Called(ctx, reference)
var r0 storage.Metadata
if rf, ok := ret.Get(0).(func(context.Context, storage.DataReference) storage.Metadata); ok {
r0 = rf(ctx, reference)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(storage.Metadata)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, storage.DataReference) error); ok {
r1 = rf(ctx, reference)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
type RawStore_ReadRaw struct {
*mock.Call
}
func (_m RawStore_ReadRaw) Return(_a0 io.ReadCloser, _a1 error) *RawStore_ReadRaw {
return &RawStore_ReadRaw{Call: _m.Call.Return(_a0, _a1)}
}
func (_m *RawStore) OnReadRaw(ctx context.Context, reference storage.DataReference) *RawStore_ReadRaw {
c := _m.On("ReadRaw", ctx, reference)
return &RawStore_ReadRaw{Call: c}
}
func (_m *RawStore) OnReadRawMatch(matchers ...interface{}) *RawStore_ReadRaw {
c := _m.On("ReadRaw", matchers...)
return &RawStore_ReadRaw{Call: c}
}
// ReadRaw provides a mock function with given fields: ctx, reference
func (_m *RawStore) ReadRaw(ctx context.Context, reference storage.DataReference) (io.ReadCloser, error) {
ret := _m.Called(ctx, reference)
var r0 io.ReadCloser
if rf, ok := ret.Get(0).(func(context.Context, storage.DataReference) io.ReadCloser); ok {
r0 = rf(ctx, reference)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(io.ReadCloser)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, storage.DataReference) error); ok {
r1 = rf(ctx, reference)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
type RawStore_WriteRaw struct {
*mock.Call
}
func (_m RawStore_WriteRaw) Return(_a0 error) *RawStore_WriteRaw {
return &RawStore_WriteRaw{Call: _m.Call.Return(_a0)}
}
func (_m *RawStore) OnWriteRaw(ctx context.Context, reference storage.DataReference, size int64, opts storage.Options, raw io.Reader) *RawStore_WriteRaw {
c := _m.On("WriteRaw", ctx, reference, size, opts, raw)
return &RawStore_WriteRaw{Call: c}
}
func (_m *RawStore) OnWriteRawMatch(matchers ...interface{}) *RawStore_WriteRaw {
c := _m.On("WriteRaw", matchers...)
return &RawStore_WriteRaw{Call: c}
}
// WriteRaw provides a mock function with given fields: ctx, reference, size, opts, raw
func (_m *RawStore) WriteRaw(ctx context.Context, reference storage.DataReference, size int64, opts storage.Options, raw io.Reader) error {
ret := _m.Called(ctx, reference, size, opts, raw)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, storage.DataReference, int64, storage.Options, io.Reader) error); ok {
r0 = rf(ctx, reference, size, opts, raw)
} else {
r0 = ret.Error(0)
}
return r0
}