-
Notifications
You must be signed in to change notification settings - Fork 12
/
client.go
150 lines (126 loc) · 4.79 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
// Code generated by MockGen. DO NOT EDIT.
// Source: client.go
// Package mock_k8s_utils is a generated GoMock package.
package mock_k8s_utils
import (
reflect "reflect"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
gomock "github.com/golang/mock/gomock"
v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
)
// MockClientInt is a mock of ClientInt interface.
type MockClientInt struct {
ctrl *gomock.Controller
recorder *MockClientIntMockRecorder
}
// MockClientIntMockRecorder is the mock recorder for MockClientInt.
type MockClientIntMockRecorder struct {
mock *MockClientInt
}
// NewMockClientInt creates a new mock instance.
func NewMockClientInt(ctrl *gomock.Controller) *MockClientInt {
mock := &MockClientInt{ctrl: ctrl}
mock.recorder = &MockClientIntMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockClientInt) EXPECT() *MockClientIntMockRecorder {
return m.recorder
}
// ApplyCrd mocks base method.
func (m *MockClientInt) ApplyCrd(crd v1.CustomResourceDefinition) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ApplyCrd", crd)
ret0, _ := ret[0].(error)
return ret0
}
// ApplyCrd indicates an expected call of ApplyCrd.
func (mr *MockClientIntMockRecorder) ApplyCrd(crd interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyCrd", reflect.TypeOf((*MockClientInt)(nil).ApplyCrd), crd)
}
// DeleteCrd mocks base method.
func (m *MockClientInt) DeleteCrd(name string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DeleteCrd", name)
ret0, _ := ret[0].(error)
return ret0
}
// DeleteCrd indicates an expected call of DeleteCrd.
func (mr *MockClientIntMockRecorder) DeleteCrd(name interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCrd", reflect.TypeOf((*MockClientInt)(nil).DeleteCrd), name)
}
// FetchCrds mocks base method.
func (m *MockClientInt) FetchCrds() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "FetchCrds")
ret0, _ := ret[0].(error)
return ret0
}
// FetchCrds indicates an expected call of FetchCrds.
func (mr *MockClientIntMockRecorder) FetchCrds() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FetchCrds", reflect.TypeOf((*MockClientInt)(nil).FetchCrds))
}
// GetCrd mocks base method.
func (m *MockClientInt) GetCrd(name string) *v1.CustomResourceDefinition {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetCrd", name)
ret0, _ := ret[0].(*v1.CustomResourceDefinition)
return ret0
}
// GetCrd indicates an expected call of GetCrd.
func (mr *MockClientIntMockRecorder) GetCrd(name interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCrd", reflect.TypeOf((*MockClientInt)(nil).GetCrd), name)
}
// GetCrds mocks base method.
func (m *MockClientInt) GetCrds() []v1.CustomResourceDefinition {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetCrds")
ret0, _ := ret[0].([]v1.CustomResourceDefinition)
return ret0
}
// GetCrds indicates an expected call of GetCrds.
func (mr *MockClientIntMockRecorder) GetCrds() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCrds", reflect.TypeOf((*MockClientInt)(nil).GetCrds))
}
// GetGroup mocks base method.
func (m *MockClientInt) GetGroup() string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetGroup")
ret0, _ := ret[0].(string)
return ret0
}
// GetGroup indicates an expected call of GetGroup.
func (mr *MockClientIntMockRecorder) GetGroup() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetGroup", reflect.TypeOf((*MockClientInt)(nil).GetGroup))
}
// ListResources mocks base method.
func (m *MockClientInt) ListResources(crd v1.CustomResourceDefinition) ([]unstructured.Unstructured, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ListResources", crd)
ret0, _ := ret[0].([]unstructured.Unstructured)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ListResources indicates an expected call of ListResources.
func (mr *MockClientIntMockRecorder) ListResources(crd interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListResources", reflect.TypeOf((*MockClientInt)(nil).ListResources), crd)
}
// ListResources mocks base method.
func (m *MockClientInt) FetchGroup(groupPath string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "FetchGroup", groupPath)
ret0, _ := ret[0].(error)
return ret0
}
// ListResources indicates an expected call of ListResources.
func (mr *MockClientIntMockRecorder) FetchGroup(crd interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FetchGroup", reflect.TypeOf((*MockClientInt)(nil).ListResources), crd)
}