-
Notifications
You must be signed in to change notification settings - Fork 8
/
discovery.go
173 lines (148 loc) · 6.65 KB
/
discovery.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
// Code generated by MockGen. DO NOT EDIT.
// Source: k8s.io/client-go/discovery (interfaces: DiscoveryInterface)
// Package mock_discovery is a generated GoMock package.
package mock_discovery
import (
reflect "reflect"
gomock "github.com/golang/mock/gomock"
openapi_v2 "github.com/googleapis/gnostic/openapiv2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
version "k8s.io/apimachinery/pkg/version"
rest "k8s.io/client-go/rest"
)
// MockDiscoveryInterface is a mock of DiscoveryInterface interface
type MockDiscoveryInterface struct {
ctrl *gomock.Controller
recorder *MockDiscoveryInterfaceMockRecorder
}
// MockDiscoveryInterfaceMockRecorder is the mock recorder for MockDiscoveryInterface
type MockDiscoveryInterfaceMockRecorder struct {
mock *MockDiscoveryInterface
}
// NewMockDiscoveryInterface creates a new mock instance
func NewMockDiscoveryInterface(ctrl *gomock.Controller) *MockDiscoveryInterface {
mock := &MockDiscoveryInterface{ctrl: ctrl}
mock.recorder = &MockDiscoveryInterfaceMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockDiscoveryInterface) EXPECT() *MockDiscoveryInterfaceMockRecorder {
return m.recorder
}
// OpenAPISchema mocks base method
func (m *MockDiscoveryInterface) OpenAPISchema() (*openapi_v2.Document, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "OpenAPISchema")
ret0, _ := ret[0].(*openapi_v2.Document)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// OpenAPISchema indicates an expected call of OpenAPISchema
func (mr *MockDiscoveryInterfaceMockRecorder) OpenAPISchema() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenAPISchema", reflect.TypeOf((*MockDiscoveryInterface)(nil).OpenAPISchema))
}
// RESTClient mocks base method
func (m *MockDiscoveryInterface) RESTClient() rest.Interface {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RESTClient")
ret0, _ := ret[0].(rest.Interface)
return ret0
}
// RESTClient indicates an expected call of RESTClient
func (mr *MockDiscoveryInterfaceMockRecorder) RESTClient() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RESTClient", reflect.TypeOf((*MockDiscoveryInterface)(nil).RESTClient))
}
// ServerGroups mocks base method
func (m *MockDiscoveryInterface) ServerGroups() (*v1.APIGroupList, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ServerGroups")
ret0, _ := ret[0].(*v1.APIGroupList)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ServerGroups indicates an expected call of ServerGroups
func (mr *MockDiscoveryInterfaceMockRecorder) ServerGroups() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerGroups", reflect.TypeOf((*MockDiscoveryInterface)(nil).ServerGroups))
}
// ServerGroupsAndResources mocks base method
func (m *MockDiscoveryInterface) ServerGroupsAndResources() ([]*v1.APIGroup, []*v1.APIResourceList, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ServerGroupsAndResources")
ret0, _ := ret[0].([]*v1.APIGroup)
ret1, _ := ret[1].([]*v1.APIResourceList)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// ServerGroupsAndResources indicates an expected call of ServerGroupsAndResources
func (mr *MockDiscoveryInterfaceMockRecorder) ServerGroupsAndResources() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerGroupsAndResources", reflect.TypeOf((*MockDiscoveryInterface)(nil).ServerGroupsAndResources))
}
// ServerPreferredNamespacedResources mocks base method
func (m *MockDiscoveryInterface) ServerPreferredNamespacedResources() ([]*v1.APIResourceList, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ServerPreferredNamespacedResources")
ret0, _ := ret[0].([]*v1.APIResourceList)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ServerPreferredNamespacedResources indicates an expected call of ServerPreferredNamespacedResources
func (mr *MockDiscoveryInterfaceMockRecorder) ServerPreferredNamespacedResources() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerPreferredNamespacedResources", reflect.TypeOf((*MockDiscoveryInterface)(nil).ServerPreferredNamespacedResources))
}
// ServerPreferredResources mocks base method
func (m *MockDiscoveryInterface) ServerPreferredResources() ([]*v1.APIResourceList, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ServerPreferredResources")
ret0, _ := ret[0].([]*v1.APIResourceList)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ServerPreferredResources indicates an expected call of ServerPreferredResources
func (mr *MockDiscoveryInterfaceMockRecorder) ServerPreferredResources() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerPreferredResources", reflect.TypeOf((*MockDiscoveryInterface)(nil).ServerPreferredResources))
}
// ServerResources mocks base method
func (m *MockDiscoveryInterface) ServerResources() ([]*v1.APIResourceList, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ServerResources")
ret0, _ := ret[0].([]*v1.APIResourceList)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ServerResources indicates an expected call of ServerResources
func (mr *MockDiscoveryInterfaceMockRecorder) ServerResources() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerResources", reflect.TypeOf((*MockDiscoveryInterface)(nil).ServerResources))
}
// ServerResourcesForGroupVersion mocks base method
func (m *MockDiscoveryInterface) ServerResourcesForGroupVersion(arg0 string) (*v1.APIResourceList, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ServerResourcesForGroupVersion", arg0)
ret0, _ := ret[0].(*v1.APIResourceList)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ServerResourcesForGroupVersion indicates an expected call of ServerResourcesForGroupVersion
func (mr *MockDiscoveryInterfaceMockRecorder) ServerResourcesForGroupVersion(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerResourcesForGroupVersion", reflect.TypeOf((*MockDiscoveryInterface)(nil).ServerResourcesForGroupVersion), arg0)
}
// ServerVersion mocks base method
func (m *MockDiscoveryInterface) ServerVersion() (*version.Info, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ServerVersion")
ret0, _ := ret[0].(*version.Info)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ServerVersion indicates an expected call of ServerVersion
func (mr *MockDiscoveryInterfaceMockRecorder) ServerVersion() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerVersion", reflect.TypeOf((*MockDiscoveryInterface)(nil).ServerVersion))
}