-
Notifications
You must be signed in to change notification settings - Fork 277
/
client.go
246 lines (211 loc) Β· 9.71 KB
/
client.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
// Code generated by MockGen. DO NOT EDIT.
// Source: pkg/providers/nutanix/client.go
// Package mocks is a generated GoMock package.
package mocks
import (
context "context"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
v3 "github.com/nutanix-cloud-native/prism-go-client/v3"
)
// MockClient is a mock of Client interface.
type MockClient struct {
ctrl *gomock.Controller
recorder *MockClientMockRecorder
}
// MockClientMockRecorder is the mock recorder for MockClient.
type MockClientMockRecorder struct {
mock *MockClient
}
// NewMockClient creates a new mock instance.
func NewMockClient(ctrl *gomock.Controller) *MockClient {
mock := &MockClient{ctrl: ctrl}
mock.recorder = &MockClientMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockClient) EXPECT() *MockClientMockRecorder {
return m.recorder
}
// GetCategoryKey mocks base method.
func (m *MockClient) GetCategoryKey(ctx context.Context, name string) (*v3.CategoryKeyStatus, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetCategoryKey", ctx, name)
ret0, _ := ret[0].(*v3.CategoryKeyStatus)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetCategoryKey indicates an expected call of GetCategoryKey.
func (mr *MockClientMockRecorder) GetCategoryKey(ctx, name interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCategoryKey", reflect.TypeOf((*MockClient)(nil).GetCategoryKey), ctx, name)
}
// GetCategoryQuery mocks base method.
func (m *MockClient) GetCategoryQuery(ctx context.Context, query *v3.CategoryQueryInput) (*v3.CategoryQueryResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetCategoryQuery", ctx, query)
ret0, _ := ret[0].(*v3.CategoryQueryResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetCategoryQuery indicates an expected call of GetCategoryQuery.
func (mr *MockClientMockRecorder) GetCategoryQuery(ctx, query interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCategoryQuery", reflect.TypeOf((*MockClient)(nil).GetCategoryQuery), ctx, query)
}
// GetCategoryValue mocks base method.
func (m *MockClient) GetCategoryValue(ctx context.Context, name, value string) (*v3.CategoryValueStatus, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetCategoryValue", ctx, name, value)
ret0, _ := ret[0].(*v3.CategoryValueStatus)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetCategoryValue indicates an expected call of GetCategoryValue.
func (mr *MockClientMockRecorder) GetCategoryValue(ctx, name, value interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCategoryValue", reflect.TypeOf((*MockClient)(nil).GetCategoryValue), ctx, name, value)
}
// GetCluster mocks base method.
func (m *MockClient) GetCluster(ctx context.Context, uuid string) (*v3.ClusterIntentResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetCluster", ctx, uuid)
ret0, _ := ret[0].(*v3.ClusterIntentResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetCluster indicates an expected call of GetCluster.
func (mr *MockClientMockRecorder) GetCluster(ctx, uuid interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCluster", reflect.TypeOf((*MockClient)(nil).GetCluster), ctx, uuid)
}
// GetCurrentLoggedInUser mocks base method.
func (m *MockClient) GetCurrentLoggedInUser(ctx context.Context) (*v3.UserIntentResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetCurrentLoggedInUser", ctx)
ret0, _ := ret[0].(*v3.UserIntentResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetCurrentLoggedInUser indicates an expected call of GetCurrentLoggedInUser.
func (mr *MockClientMockRecorder) GetCurrentLoggedInUser(ctx interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCurrentLoggedInUser", reflect.TypeOf((*MockClient)(nil).GetCurrentLoggedInUser), ctx)
}
// GetImage mocks base method.
func (m *MockClient) GetImage(ctx context.Context, uuid string) (*v3.ImageIntentResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetImage", ctx, uuid)
ret0, _ := ret[0].(*v3.ImageIntentResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetImage indicates an expected call of GetImage.
func (mr *MockClientMockRecorder) GetImage(ctx, uuid interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImage", reflect.TypeOf((*MockClient)(nil).GetImage), ctx, uuid)
}
// GetProject mocks base method.
func (m *MockClient) GetProject(ctx context.Context, uuid string) (*v3.Project, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetProject", ctx, uuid)
ret0, _ := ret[0].(*v3.Project)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetProject indicates an expected call of GetProject.
func (mr *MockClientMockRecorder) GetProject(ctx, uuid interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProject", reflect.TypeOf((*MockClient)(nil).GetProject), ctx, uuid)
}
// GetSubnet mocks base method.
func (m *MockClient) GetSubnet(ctx context.Context, uuid string) (*v3.SubnetIntentResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetSubnet", ctx, uuid)
ret0, _ := ret[0].(*v3.SubnetIntentResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetSubnet indicates an expected call of GetSubnet.
func (mr *MockClientMockRecorder) GetSubnet(ctx, uuid interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSubnet", reflect.TypeOf((*MockClient)(nil).GetSubnet), ctx, uuid)
}
// ListCategories mocks base method.
func (m *MockClient) ListCategories(ctx context.Context, getEntitiesRequest *v3.CategoryListMetadata) (*v3.CategoryKeyListResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ListCategories", ctx, getEntitiesRequest)
ret0, _ := ret[0].(*v3.CategoryKeyListResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ListCategories indicates an expected call of ListCategories.
func (mr *MockClientMockRecorder) ListCategories(ctx, getEntitiesRequest interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListCategories", reflect.TypeOf((*MockClient)(nil).ListCategories), ctx, getEntitiesRequest)
}
// ListCategoryValues mocks base method.
func (m *MockClient) ListCategoryValues(ctx context.Context, name string, getEntitiesRequest *v3.CategoryListMetadata) (*v3.CategoryValueListResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ListCategoryValues", ctx, name, getEntitiesRequest)
ret0, _ := ret[0].(*v3.CategoryValueListResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ListCategoryValues indicates an expected call of ListCategoryValues.
func (mr *MockClientMockRecorder) ListCategoryValues(ctx, name, getEntitiesRequest interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListCategoryValues", reflect.TypeOf((*MockClient)(nil).ListCategoryValues), ctx, name, getEntitiesRequest)
}
// ListCluster mocks base method.
func (m *MockClient) ListCluster(ctx context.Context, getEntitiesRequest *v3.DSMetadata) (*v3.ClusterListIntentResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ListCluster", ctx, getEntitiesRequest)
ret0, _ := ret[0].(*v3.ClusterListIntentResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ListCluster indicates an expected call of ListCluster.
func (mr *MockClientMockRecorder) ListCluster(ctx, getEntitiesRequest interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListCluster", reflect.TypeOf((*MockClient)(nil).ListCluster), ctx, getEntitiesRequest)
}
// ListImage mocks base method.
func (m *MockClient) ListImage(ctx context.Context, getEntitiesRequest *v3.DSMetadata) (*v3.ImageListIntentResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ListImage", ctx, getEntitiesRequest)
ret0, _ := ret[0].(*v3.ImageListIntentResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ListImage indicates an expected call of ListImage.
func (mr *MockClientMockRecorder) ListImage(ctx, getEntitiesRequest interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListImage", reflect.TypeOf((*MockClient)(nil).ListImage), ctx, getEntitiesRequest)
}
// ListProject mocks base method.
func (m *MockClient) ListProject(ctx context.Context, getEntitiesRequest *v3.DSMetadata) (*v3.ProjectListResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ListProject", ctx, getEntitiesRequest)
ret0, _ := ret[0].(*v3.ProjectListResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ListProject indicates an expected call of ListProject.
func (mr *MockClientMockRecorder) ListProject(ctx, getEntitiesRequest interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListProject", reflect.TypeOf((*MockClient)(nil).ListProject), ctx, getEntitiesRequest)
}
// ListSubnet mocks base method.
func (m *MockClient) ListSubnet(ctx context.Context, getEntitiesRequest *v3.DSMetadata) (*v3.SubnetListIntentResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ListSubnet", ctx, getEntitiesRequest)
ret0, _ := ret[0].(*v3.SubnetListIntentResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ListSubnet indicates an expected call of ListSubnet.
func (mr *MockClientMockRecorder) ListSubnet(ctx, getEntitiesRequest interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSubnet", reflect.TypeOf((*MockClient)(nil).ListSubnet), ctx, getEntitiesRequest)
}