1
2
3
4
5 package registry
6
7 import (
8 context "context"
9 reflect "reflect"
10
11 v1alpha2 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
12 util "github.com/devfile/library/v2/pkg/util"
13 library "github.com/devfile/registry-support/registry-library/library"
14 gomock "github.com/golang/mock/gomock"
15 api "github.com/redhat-developer/odo/pkg/api"
16 )
17
18
19 type MockClient struct {
20 ctrl *gomock.Controller
21 recorder *MockClientMockRecorder
22 }
23
24
25 type MockClientMockRecorder struct {
26 mock *MockClient
27 }
28
29
30 func NewMockClient(ctrl *gomock.Controller) *MockClient {
31 mock := &MockClient{ctrl: ctrl}
32 mock.recorder = &MockClientMockRecorder{mock}
33 return mock
34 }
35
36
37 func (m *MockClient) EXPECT() *MockClientMockRecorder {
38 return m.recorder
39 }
40
41
42 func (m *MockClient) DownloadFileInMemory(params util.HTTPRequestParams) ([]byte, error) {
43 m.ctrl.T.Helper()
44 ret := m.ctrl.Call(m, "DownloadFileInMemory", params)
45 ret0, _ := ret[0].([]byte)
46 ret1, _ := ret[1].(error)
47 return ret0, ret1
48 }
49
50
51 func (mr *MockClientMockRecorder) DownloadFileInMemory(params interface{}) *gomock.Call {
52 mr.mock.ctrl.T.Helper()
53 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadFileInMemory", reflect.TypeOf((*MockClient)(nil).DownloadFileInMemory), params)
54 }
55
56
57 func (m *MockClient) DownloadStarterProject(starterProject *v1alpha2.StarterProject, decryptedToken, contextDir string, verbose bool) (bool, error) {
58 m.ctrl.T.Helper()
59 ret := m.ctrl.Call(m, "DownloadStarterProject", starterProject, decryptedToken, contextDir, verbose)
60 ret0, _ := ret[0].(bool)
61 ret1, _ := ret[1].(error)
62 return ret0, ret1
63 }
64
65
66 func (mr *MockClientMockRecorder) DownloadStarterProject(starterProject, decryptedToken, contextDir, verbose interface{}) *gomock.Call {
67 mr.mock.ctrl.T.Helper()
68 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadStarterProject", reflect.TypeOf((*MockClient)(nil).DownloadStarterProject), starterProject, decryptedToken, contextDir, verbose)
69 }
70
71
72 func (m *MockClient) GetDevfileRegistries(registryName string) ([]api.Registry, error) {
73 m.ctrl.T.Helper()
74 ret := m.ctrl.Call(m, "GetDevfileRegistries", registryName)
75 ret0, _ := ret[0].([]api.Registry)
76 ret1, _ := ret[1].(error)
77 return ret0, ret1
78 }
79
80
81 func (mr *MockClientMockRecorder) GetDevfileRegistries(registryName interface{}) *gomock.Call {
82 mr.mock.ctrl.T.Helper()
83 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDevfileRegistries", reflect.TypeOf((*MockClient)(nil).GetDevfileRegistries), registryName)
84 }
85
86
87 func (m *MockClient) ListDevfileStacks(ctx context.Context, registryName, devfileFlag, filterFlag string, detailsFlag, withDevfileContent bool) (DevfileStackList, error) {
88 m.ctrl.T.Helper()
89 ret := m.ctrl.Call(m, "ListDevfileStacks", ctx, registryName, devfileFlag, filterFlag, detailsFlag, withDevfileContent)
90 ret0, _ := ret[0].(DevfileStackList)
91 ret1, _ := ret[1].(error)
92 return ret0, ret1
93 }
94
95
96 func (mr *MockClientMockRecorder) ListDevfileStacks(ctx, registryName, devfileFlag, filterFlag, detailsFlag, withDevfileContent interface{}) *gomock.Call {
97 mr.mock.ctrl.T.Helper()
98 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListDevfileStacks", reflect.TypeOf((*MockClient)(nil).ListDevfileStacks), ctx, registryName, devfileFlag, filterFlag, detailsFlag, withDevfileContent)
99 }
100
101
102 func (m *MockClient) PullStackFromRegistry(registry, stack, destDir string, options library.RegistryOptions) error {
103 m.ctrl.T.Helper()
104 ret := m.ctrl.Call(m, "PullStackFromRegistry", registry, stack, destDir, options)
105 ret0, _ := ret[0].(error)
106 return ret0
107 }
108
109
110 func (mr *MockClientMockRecorder) PullStackFromRegistry(registry, stack, destDir, options interface{}) *gomock.Call {
111 mr.mock.ctrl.T.Helper()
112 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PullStackFromRegistry", reflect.TypeOf((*MockClient)(nil).PullStackFromRegistry), registry, stack, destDir, options)
113 }
114
View as plain text