1
2
3
4
5 package platform
6
7 import (
8 context "context"
9 io "io"
10 reflect "reflect"
11
12 gomock "github.com/golang/mock/gomock"
13 v1 "k8s.io/api/core/v1"
14 unstructured "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
15 watch "k8s.io/apimachinery/pkg/watch"
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) ExecCMDInContainer(ctx context.Context, containerName, podName string, cmd []string, stdout, stderr io.Writer, stdin io.Reader, tty bool) error {
43 m.ctrl.T.Helper()
44 ret := m.ctrl.Call(m, "ExecCMDInContainer", ctx, containerName, podName, cmd, stdout, stderr, stdin, tty)
45 ret0, _ := ret[0].(error)
46 return ret0
47 }
48
49
50 func (mr *MockClientMockRecorder) ExecCMDInContainer(ctx, containerName, podName, cmd, stdout, stderr, stdin, tty interface{}) *gomock.Call {
51 mr.mock.ctrl.T.Helper()
52 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExecCMDInContainer", reflect.TypeOf((*MockClient)(nil).ExecCMDInContainer), ctx, containerName, podName, cmd, stdout, stderr, stdin, tty)
53 }
54
55
56 func (m *MockClient) GetAllPodsInNamespaceMatchingSelector(selector, ns string) (*v1.PodList, error) {
57 m.ctrl.T.Helper()
58 ret := m.ctrl.Call(m, "GetAllPodsInNamespaceMatchingSelector", selector, ns)
59 ret0, _ := ret[0].(*v1.PodList)
60 ret1, _ := ret[1].(error)
61 return ret0, ret1
62 }
63
64
65 func (mr *MockClientMockRecorder) GetAllPodsInNamespaceMatchingSelector(selector, ns interface{}) *gomock.Call {
66 mr.mock.ctrl.T.Helper()
67 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllPodsInNamespaceMatchingSelector", reflect.TypeOf((*MockClient)(nil).GetAllPodsInNamespaceMatchingSelector), selector, ns)
68 }
69
70
71 func (m *MockClient) GetAllResourcesFromSelector(selector, ns string) ([]unstructured.Unstructured, error) {
72 m.ctrl.T.Helper()
73 ret := m.ctrl.Call(m, "GetAllResourcesFromSelector", selector, ns)
74 ret0, _ := ret[0].([]unstructured.Unstructured)
75 ret1, _ := ret[1].(error)
76 return ret0, ret1
77 }
78
79
80 func (mr *MockClientMockRecorder) GetAllResourcesFromSelector(selector, ns interface{}) *gomock.Call {
81 mr.mock.ctrl.T.Helper()
82 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllResourcesFromSelector", reflect.TypeOf((*MockClient)(nil).GetAllResourcesFromSelector), selector, ns)
83 }
84
85
86 func (m *MockClient) GetPodLogs(podName, containerName string, followLog bool) (io.ReadCloser, error) {
87 m.ctrl.T.Helper()
88 ret := m.ctrl.Call(m, "GetPodLogs", podName, containerName, followLog)
89 ret0, _ := ret[0].(io.ReadCloser)
90 ret1, _ := ret[1].(error)
91 return ret0, ret1
92 }
93
94
95 func (mr *MockClientMockRecorder) GetPodLogs(podName, containerName, followLog interface{}) *gomock.Call {
96 mr.mock.ctrl.T.Helper()
97 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPodLogs", reflect.TypeOf((*MockClient)(nil).GetPodLogs), podName, containerName, followLog)
98 }
99
100
101 func (m *MockClient) GetPodUsingComponentName(componentName string) (*v1.Pod, error) {
102 m.ctrl.T.Helper()
103 ret := m.ctrl.Call(m, "GetPodUsingComponentName", componentName)
104 ret0, _ := ret[0].(*v1.Pod)
105 ret1, _ := ret[1].(error)
106 return ret0, ret1
107 }
108
109
110 func (mr *MockClientMockRecorder) GetPodUsingComponentName(componentName interface{}) *gomock.Call {
111 mr.mock.ctrl.T.Helper()
112 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPodUsingComponentName", reflect.TypeOf((*MockClient)(nil).GetPodUsingComponentName), componentName)
113 }
114
115
116 func (m *MockClient) GetPodsMatchingSelector(selector string) (*v1.PodList, error) {
117 m.ctrl.T.Helper()
118 ret := m.ctrl.Call(m, "GetPodsMatchingSelector", selector)
119 ret0, _ := ret[0].(*v1.PodList)
120 ret1, _ := ret[1].(error)
121 return ret0, ret1
122 }
123
124
125 func (mr *MockClientMockRecorder) GetPodsMatchingSelector(selector interface{}) *gomock.Call {
126 mr.mock.ctrl.T.Helper()
127 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPodsMatchingSelector", reflect.TypeOf((*MockClient)(nil).GetPodsMatchingSelector), selector)
128 }
129
130
131 func (m *MockClient) GetRunningPodFromSelector(selector string) (*v1.Pod, error) {
132 m.ctrl.T.Helper()
133 ret := m.ctrl.Call(m, "GetRunningPodFromSelector", selector)
134 ret0, _ := ret[0].(*v1.Pod)
135 ret1, _ := ret[1].(error)
136 return ret0, ret1
137 }
138
139
140 func (mr *MockClientMockRecorder) GetRunningPodFromSelector(selector interface{}) *gomock.Call {
141 mr.mock.ctrl.T.Helper()
142 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRunningPodFromSelector", reflect.TypeOf((*MockClient)(nil).GetRunningPodFromSelector), selector)
143 }
144
145
146 func (m *MockClient) PodWatcher(ctx context.Context, selector string) (watch.Interface, error) {
147 m.ctrl.T.Helper()
148 ret := m.ctrl.Call(m, "PodWatcher", ctx, selector)
149 ret0, _ := ret[0].(watch.Interface)
150 ret1, _ := ret[1].(error)
151 return ret0, ret1
152 }
153
154
155 func (mr *MockClientMockRecorder) PodWatcher(ctx, selector interface{}) *gomock.Call {
156 mr.mock.ctrl.T.Helper()
157 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PodWatcher", reflect.TypeOf((*MockClient)(nil).PodWatcher), ctx, selector)
158 }
159
View as plain text