forked from buildpacks/pack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
image.go
252 lines (212 loc) · 7.81 KB
/
image.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
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/buildpack/lifecycle/image (interfaces: Image)
// Package mocks is a generated GoMock package.
package mocks
import (
image "github.com/buildpack/lifecycle/image"
gomock "github.com/golang/mock/gomock"
io "io"
reflect "reflect"
)
// MockImage is a mock of Image interface
type MockImage struct {
ctrl *gomock.Controller
recorder *MockImageMockRecorder
}
// MockImageMockRecorder is the mock recorder for MockImage
type MockImageMockRecorder struct {
mock *MockImage
}
// NewMockImage creates a new mock instance
func NewMockImage(ctrl *gomock.Controller) *MockImage {
mock := &MockImage{ctrl: ctrl}
mock.recorder = &MockImageMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockImage) EXPECT() *MockImageMockRecorder {
return m.recorder
}
// AddLayer mocks base method
func (m *MockImage) AddLayer(arg0 string) error {
ret := m.ctrl.Call(m, "AddLayer", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// AddLayer indicates an expected call of AddLayer
func (mr *MockImageMockRecorder) AddLayer(arg0 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddLayer", reflect.TypeOf((*MockImage)(nil).AddLayer), arg0)
}
// Delete mocks base method
func (m *MockImage) Delete() error {
ret := m.ctrl.Call(m, "Delete")
ret0, _ := ret[0].(error)
return ret0
}
// Delete indicates an expected call of Delete
func (mr *MockImageMockRecorder) Delete() *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockImage)(nil).Delete))
}
// Digest mocks base method
func (m *MockImage) Digest() (string, error) {
ret := m.ctrl.Call(m, "Digest")
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Digest indicates an expected call of Digest
func (mr *MockImageMockRecorder) Digest() *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Digest", reflect.TypeOf((*MockImage)(nil).Digest))
}
// Env mocks base method
func (m *MockImage) Env(arg0 string) (string, error) {
ret := m.ctrl.Call(m, "Env", arg0)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Env indicates an expected call of Env
func (mr *MockImageMockRecorder) Env(arg0 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Env", reflect.TypeOf((*MockImage)(nil).Env), arg0)
}
// Found mocks base method
func (m *MockImage) Found() (bool, error) {
ret := m.ctrl.Call(m, "Found")
ret0, _ := ret[0].(bool)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Found indicates an expected call of Found
func (mr *MockImageMockRecorder) Found() *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Found", reflect.TypeOf((*MockImage)(nil).Found))
}
// GetLayer mocks base method
func (m *MockImage) GetLayer(arg0 string) (io.ReadCloser, error) {
ret := m.ctrl.Call(m, "GetLayer", arg0)
ret0, _ := ret[0].(io.ReadCloser)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetLayer indicates an expected call of GetLayer
func (mr *MockImageMockRecorder) GetLayer(arg0 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLayer", reflect.TypeOf((*MockImage)(nil).GetLayer), arg0)
}
// Label mocks base method
func (m *MockImage) Label(arg0 string) (string, error) {
ret := m.ctrl.Call(m, "Label", arg0)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Label indicates an expected call of Label
func (mr *MockImageMockRecorder) Label(arg0 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Label", reflect.TypeOf((*MockImage)(nil).Label), arg0)
}
// Name mocks base method
func (m *MockImage) Name() string {
ret := m.ctrl.Call(m, "Name")
ret0, _ := ret[0].(string)
return ret0
}
// Name indicates an expected call of Name
func (mr *MockImageMockRecorder) Name() *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockImage)(nil).Name))
}
// Rebase mocks base method
func (m *MockImage) Rebase(arg0 string, arg1 image.Image) error {
ret := m.ctrl.Call(m, "Rebase", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// Rebase indicates an expected call of Rebase
func (mr *MockImageMockRecorder) Rebase(arg0, arg1 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Rebase", reflect.TypeOf((*MockImage)(nil).Rebase), arg0, arg1)
}
// Rename mocks base method
func (m *MockImage) Rename(arg0 string) {
m.ctrl.Call(m, "Rename", arg0)
}
// Rename indicates an expected call of Rename
func (mr *MockImageMockRecorder) Rename(arg0 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Rename", reflect.TypeOf((*MockImage)(nil).Rename), arg0)
}
// ReuseLayer mocks base method
func (m *MockImage) ReuseLayer(arg0 string) error {
ret := m.ctrl.Call(m, "ReuseLayer", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// ReuseLayer indicates an expected call of ReuseLayer
func (mr *MockImageMockRecorder) ReuseLayer(arg0 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReuseLayer", reflect.TypeOf((*MockImage)(nil).ReuseLayer), arg0)
}
// Save mocks base method
func (m *MockImage) Save() (string, error) {
ret := m.ctrl.Call(m, "Save")
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Save indicates an expected call of Save
func (mr *MockImageMockRecorder) Save() *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Save", reflect.TypeOf((*MockImage)(nil).Save))
}
// SetCmd mocks base method
func (m *MockImage) SetCmd(arg0 ...string) error {
varargs := []interface{}{}
for _, a := range arg0 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "SetCmd", varargs...)
ret0, _ := ret[0].(error)
return ret0
}
// SetCmd indicates an expected call of SetCmd
func (mr *MockImageMockRecorder) SetCmd(arg0 ...interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCmd", reflect.TypeOf((*MockImage)(nil).SetCmd), arg0...)
}
// SetEntrypoint mocks base method
func (m *MockImage) SetEntrypoint(arg0 ...string) error {
varargs := []interface{}{}
for _, a := range arg0 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "SetEntrypoint", varargs...)
ret0, _ := ret[0].(error)
return ret0
}
// SetEntrypoint indicates an expected call of SetEntrypoint
func (mr *MockImageMockRecorder) SetEntrypoint(arg0 ...interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetEntrypoint", reflect.TypeOf((*MockImage)(nil).SetEntrypoint), arg0...)
}
// SetEnv mocks base method
func (m *MockImage) SetEnv(arg0, arg1 string) error {
ret := m.ctrl.Call(m, "SetEnv", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// SetEnv indicates an expected call of SetEnv
func (mr *MockImageMockRecorder) SetEnv(arg0, arg1 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetEnv", reflect.TypeOf((*MockImage)(nil).SetEnv), arg0, arg1)
}
// SetLabel mocks base method
func (m *MockImage) SetLabel(arg0, arg1 string) error {
ret := m.ctrl.Call(m, "SetLabel", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// SetLabel indicates an expected call of SetLabel
func (mr *MockImageMockRecorder) SetLabel(arg0, arg1 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetLabel", reflect.TypeOf((*MockImage)(nil).SetLabel), arg0, arg1)
}
// TopLayer mocks base method
func (m *MockImage) TopLayer() (string, error) {
ret := m.ctrl.Call(m, "TopLayer")
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// TopLayer indicates an expected call of TopLayer
func (mr *MockImageMockRecorder) TopLayer() *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TopLayer", reflect.TypeOf((*MockImage)(nil).TopLayer))
}