Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gitpod-io
GitHub Repository: gitpod-io/gitpod
Path: blob/main/components/registry-facade/pkg/registry/mock/layersource_mock.go
2501 views
1
// Copyright (c) 2022 Gitpod GmbH. All rights reserved.
2
// Licensed under the GNU Affero General Public License (AGPL).
3
// See License.AGPL.txt in the project root for license information.
4
5
// Code generated by MockGen. DO NOT EDIT.
6
// Source: github.com/gitpod-io/gitpod/registry-facade/pkg/registry (interfaces: LayerSource)
7
8
// Package mock is a generated GoMock package.
9
package mock
10
11
import (
12
context "context"
13
io "io"
14
reflect "reflect"
15
16
api "github.com/gitpod-io/gitpod/registry-facade/api"
17
registry "github.com/gitpod-io/gitpod/registry-facade/pkg/registry"
18
gomock "github.com/golang/mock/gomock"
19
digest "github.com/opencontainers/go-digest"
20
)
21
22
// MockLayerSource is a mock of LayerSource interface.
23
type MockLayerSource struct {
24
ctrl *gomock.Controller
25
recorder *MockLayerSourceMockRecorder
26
}
27
28
// MockLayerSourceMockRecorder is the mock recorder for MockLayerSource.
29
type MockLayerSourceMockRecorder struct {
30
mock *MockLayerSource
31
}
32
33
// NewMockLayerSource creates a new mock instance.
34
func NewMockLayerSource(ctrl *gomock.Controller) *MockLayerSource {
35
mock := &MockLayerSource{ctrl: ctrl}
36
mock.recorder = &MockLayerSourceMockRecorder{mock}
37
return mock
38
}
39
40
// EXPECT returns an object that allows the caller to indicate expected use.
41
func (m *MockLayerSource) EXPECT() *MockLayerSourceMockRecorder {
42
return m.recorder
43
}
44
45
// Envs mocks base method.
46
func (m *MockLayerSource) Envs(arg0 context.Context, arg1 *api.ImageSpec) ([]registry.EnvModifier, error) {
47
m.ctrl.T.Helper()
48
ret := m.ctrl.Call(m, "Envs", arg0, arg1)
49
ret0, _ := ret[0].([]registry.EnvModifier)
50
ret1, _ := ret[1].(error)
51
return ret0, ret1
52
}
53
54
// Envs indicates an expected call of Envs.
55
func (mr *MockLayerSourceMockRecorder) Envs(arg0, arg1 interface{}) *gomock.Call {
56
mr.mock.ctrl.T.Helper()
57
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Envs", reflect.TypeOf((*MockLayerSource)(nil).Envs), arg0, arg1)
58
}
59
60
// GetBlob mocks base method.
61
func (m *MockLayerSource) GetBlob(arg0 context.Context, arg1 *api.ImageSpec, arg2 digest.Digest) (bool, string, string, io.ReadCloser, error) {
62
m.ctrl.T.Helper()
63
ret := m.ctrl.Call(m, "GetBlob", arg0, arg1, arg2)
64
ret0, _ := ret[0].(bool)
65
ret1, _ := ret[1].(string)
66
ret2, _ := ret[2].(string)
67
ret3, _ := ret[3].(io.ReadCloser)
68
ret4, _ := ret[4].(error)
69
return ret0, ret1, ret2, ret3, ret4
70
}
71
72
// GetBlob indicates an expected call of GetBlob.
73
func (mr *MockLayerSourceMockRecorder) GetBlob(arg0, arg1, arg2 interface{}) *gomock.Call {
74
mr.mock.ctrl.T.Helper()
75
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlob", reflect.TypeOf((*MockLayerSource)(nil).GetBlob), arg0, arg1, arg2)
76
}
77
78
// GetLayer mocks base method.
79
func (m *MockLayerSource) GetLayer(arg0 context.Context, arg1 *api.ImageSpec) ([]registry.AddonLayer, error) {
80
m.ctrl.T.Helper()
81
ret := m.ctrl.Call(m, "GetLayer", arg0, arg1)
82
ret0, _ := ret[0].([]registry.AddonLayer)
83
ret1, _ := ret[1].(error)
84
return ret0, ret1
85
}
86
87
// GetLayer indicates an expected call of GetLayer.
88
func (mr *MockLayerSourceMockRecorder) GetLayer(arg0, arg1 interface{}) *gomock.Call {
89
mr.mock.ctrl.T.Helper()
90
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLayer", reflect.TypeOf((*MockLayerSource)(nil).GetLayer), arg0, arg1)
91
}
92
93
// HasBlob mocks base method.
94
func (m *MockLayerSource) HasBlob(arg0 context.Context, arg1 *api.ImageSpec, arg2 digest.Digest) bool {
95
m.ctrl.T.Helper()
96
ret := m.ctrl.Call(m, "HasBlob", arg0, arg1, arg2)
97
ret0, _ := ret[0].(bool)
98
return ret0
99
}
100
101
// HasBlob indicates an expected call of HasBlob.
102
func (mr *MockLayerSourceMockRecorder) HasBlob(arg0, arg1, arg2 interface{}) *gomock.Call {
103
mr.mock.ctrl.T.Helper()
104
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasBlob", reflect.TypeOf((*MockLayerSource)(nil).HasBlob), arg0, arg1, arg2)
105
}
106
107
// Name mocks base method.
108
func (m *MockLayerSource) Name() string {
109
m.ctrl.T.Helper()
110
ret := m.ctrl.Call(m, "Name")
111
ret0, _ := ret[0].(string)
112
return ret0
113
}
114
115
// Name indicates an expected call of Name.
116
func (mr *MockLayerSourceMockRecorder) Name() *gomock.Call {
117
mr.mock.ctrl.T.Helper()
118
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockLayerSource)(nil).Name))
119
}
120
121