-
Notifications
You must be signed in to change notification settings - Fork 1k
/
ociartifact.go
248 lines (213 loc) · 8.73 KB
/
ociartifact.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
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/cri-o/cri-o/internal/config/ociartifact (interfaces: Impl)
// Package ociartifactmock is a generated GoMock package.
package ociartifactmock
import (
context "context"
io "io"
fs "io/fs"
reflect "reflect"
reference "github.com/containers/image/v5/docker/reference"
manifest "github.com/containers/image/v5/manifest"
types "github.com/containers/image/v5/types"
gomock "github.com/golang/mock/gomock"
digest "github.com/opencontainers/go-digest"
)
// MockImpl is a mock of Impl interface.
type MockImpl struct {
ctrl *gomock.Controller
recorder *MockImplMockRecorder
}
// MockImplMockRecorder is the mock recorder for MockImpl.
type MockImplMockRecorder struct {
mock *MockImpl
}
// NewMockImpl creates a new mock instance.
func NewMockImpl(ctrl *gomock.Controller) *MockImpl {
mock := &MockImpl{ctrl: ctrl}
mock.recorder = &MockImplMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockImpl) EXPECT() *MockImplMockRecorder {
return m.recorder
}
// GetBlob mocks base method.
func (m *MockImpl) GetBlob(arg0 context.Context, arg1 types.ImageSource, arg2 types.BlobInfo, arg3 types.BlobInfoCache) (io.ReadCloser, int64, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetBlob", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(io.ReadCloser)
ret1, _ := ret[1].(int64)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// GetBlob indicates an expected call of GetBlob.
func (mr *MockImplMockRecorder) GetBlob(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlob", reflect.TypeOf((*MockImpl)(nil).GetBlob), arg0, arg1, arg2, arg3)
}
// GetManifest mocks base method.
func (m *MockImpl) GetManifest(arg0 context.Context, arg1 types.ImageSource, arg2 *digest.Digest) ([]byte, string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetManifest", arg0, arg1, arg2)
ret0, _ := ret[0].([]byte)
ret1, _ := ret[1].(string)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// GetManifest indicates an expected call of GetManifest.
func (mr *MockImplMockRecorder) GetManifest(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetManifest", reflect.TypeOf((*MockImpl)(nil).GetManifest), arg0, arg1, arg2)
}
// LayerInfos mocks base method.
func (m *MockImpl) LayerInfos(arg0 manifest.Manifest) []manifest.LayerInfo {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "LayerInfos", arg0)
ret0, _ := ret[0].([]manifest.LayerInfo)
return ret0
}
// LayerInfos indicates an expected call of LayerInfos.
func (mr *MockImplMockRecorder) LayerInfos(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LayerInfos", reflect.TypeOf((*MockImpl)(nil).LayerInfos), arg0)
}
// ManifestConfigInfo mocks base method.
func (m *MockImpl) ManifestConfigInfo(arg0 manifest.Manifest) types.BlobInfo {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ManifestConfigInfo", arg0)
ret0, _ := ret[0].(types.BlobInfo)
return ret0
}
// ManifestConfigInfo indicates an expected call of ManifestConfigInfo.
func (mr *MockImplMockRecorder) ManifestConfigInfo(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ManifestConfigInfo", reflect.TypeOf((*MockImpl)(nil).ManifestConfigInfo), arg0)
}
// ManifestFromBlob mocks base method.
func (m *MockImpl) ManifestFromBlob(arg0 []byte, arg1 string) (manifest.Manifest, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ManifestFromBlob", arg0, arg1)
ret0, _ := ret[0].(manifest.Manifest)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ManifestFromBlob indicates an expected call of ManifestFromBlob.
func (mr *MockImplMockRecorder) ManifestFromBlob(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ManifestFromBlob", reflect.TypeOf((*MockImpl)(nil).ManifestFromBlob), arg0, arg1)
}
// MkdirAll mocks base method.
func (m *MockImpl) MkdirAll(arg0 string, arg1 fs.FileMode) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "MkdirAll", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// MkdirAll indicates an expected call of MkdirAll.
func (mr *MockImplMockRecorder) MkdirAll(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MkdirAll", reflect.TypeOf((*MockImpl)(nil).MkdirAll), arg0, arg1)
}
// NewImageSource mocks base method.
func (m *MockImpl) NewImageSource(arg0 context.Context, arg1 types.ImageReference, arg2 *types.SystemContext) (types.ImageSource, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NewImageSource", arg0, arg1, arg2)
ret0, _ := ret[0].(types.ImageSource)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// NewImageSource indicates an expected call of NewImageSource.
func (mr *MockImplMockRecorder) NewImageSource(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewImageSource", reflect.TypeOf((*MockImpl)(nil).NewImageSource), arg0, arg1, arg2)
}
// NewReference mocks base method.
func (m *MockImpl) NewReference(arg0 reference.Named) (types.ImageReference, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NewReference", arg0)
ret0, _ := ret[0].(types.ImageReference)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// NewReference indicates an expected call of NewReference.
func (mr *MockImplMockRecorder) NewReference(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewReference", reflect.TypeOf((*MockImpl)(nil).NewReference), arg0)
}
// ParseNormalizedNamed mocks base method.
func (m *MockImpl) ParseNormalizedNamed(arg0 string) (reference.Named, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ParseNormalizedNamed", arg0)
ret0, _ := ret[0].(reference.Named)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ParseNormalizedNamed indicates an expected call of ParseNormalizedNamed.
func (mr *MockImplMockRecorder) ParseNormalizedNamed(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ParseNormalizedNamed", reflect.TypeOf((*MockImpl)(nil).ParseNormalizedNamed), arg0)
}
// ReadAll mocks base method.
func (m *MockImpl) ReadAll(arg0 io.Reader) ([]byte, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ReadAll", arg0)
ret0, _ := ret[0].([]byte)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ReadAll indicates an expected call of ReadAll.
func (mr *MockImplMockRecorder) ReadAll(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadAll", reflect.TypeOf((*MockImpl)(nil).ReadAll), arg0)
}
// ReadDir mocks base method.
func (m *MockImpl) ReadDir(arg0 string) ([]fs.DirEntry, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ReadDir", arg0)
ret0, _ := ret[0].([]fs.DirEntry)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ReadDir indicates an expected call of ReadDir.
func (mr *MockImplMockRecorder) ReadDir(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadDir", reflect.TypeOf((*MockImpl)(nil).ReadDir), arg0)
}
// ReadFile mocks base method.
func (m *MockImpl) ReadFile(arg0 string) ([]byte, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ReadFile", arg0)
ret0, _ := ret[0].([]byte)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ReadFile indicates an expected call of ReadFile.
func (mr *MockImplMockRecorder) ReadFile(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadFile", reflect.TypeOf((*MockImpl)(nil).ReadFile), arg0)
}
// RemoveAll mocks base method.
func (m *MockImpl) RemoveAll(arg0 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RemoveAll", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// RemoveAll indicates an expected call of RemoveAll.
func (mr *MockImplMockRecorder) RemoveAll(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAll", reflect.TypeOf((*MockImpl)(nil).RemoveAll), arg0)
}
// WriteFile mocks base method.
func (m *MockImpl) WriteFile(arg0 string, arg1 []byte, arg2 fs.FileMode) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "WriteFile", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// WriteFile indicates an expected call of WriteFile.
func (mr *MockImplMockRecorder) WriteFile(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteFile", reflect.TypeOf((*MockImpl)(nil).WriteFile), arg0, arg1, arg2)
}