-
Notifications
You must be signed in to change notification settings - Fork 139
/
service_controller.go
175 lines (137 loc) · 4.85 KB
/
service_controller.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
// Code generated by mockery v2.33.2. DO NOT EDIT.
package mocks
import (
config "github.com/aws-controllers-k8s/runtime/pkg/config"
logr "github.com/go-logr/logr"
manager "sigs.k8s.io/controller-runtime/pkg/manager"
mock "github.com/stretchr/testify/mock"
prometheus "github.com/prometheus/client_golang/prometheus"
schema "k8s.io/apimachinery/pkg/runtime/schema"
session "github.com/aws/aws-sdk-go/aws/session"
types "github.com/aws-controllers-k8s/runtime/pkg/types"
v1alpha1 "github.com/aws-controllers-k8s/runtime/apis/core/v1alpha1"
)
// ServiceController is an autogenerated mock type for the ServiceController type
type ServiceController struct {
mock.Mock
}
// BindControllerManager provides a mock function with given fields: _a0, _a1
func (_m *ServiceController) BindControllerManager(_a0 manager.Manager, _a1 config.Config) error {
ret := _m.Called(_a0, _a1)
var r0 error
if rf, ok := ret.Get(0).(func(manager.Manager, config.Config) error); ok {
r0 = rf(_a0, _a1)
} else {
r0 = ret.Error(0)
}
return r0
}
// GetMetadata provides a mock function with given fields:
func (_m *ServiceController) GetMetadata() types.ServiceControllerMetadata {
ret := _m.Called()
var r0 types.ServiceControllerMetadata
if rf, ok := ret.Get(0).(func() types.ServiceControllerMetadata); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(types.ServiceControllerMetadata)
}
return r0
}
// GetReconcilers provides a mock function with given fields:
func (_m *ServiceController) GetReconcilers() []types.AWSResourceReconciler {
ret := _m.Called()
var r0 []types.AWSResourceReconciler
if rf, ok := ret.Get(0).(func() []types.AWSResourceReconciler); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]types.AWSResourceReconciler)
}
}
return r0
}
// GetResourceManagerFactories provides a mock function with given fields:
func (_m *ServiceController) GetResourceManagerFactories() map[string]types.AWSResourceManagerFactory {
ret := _m.Called()
var r0 map[string]types.AWSResourceManagerFactory
if rf, ok := ret.Get(0).(func() map[string]types.AWSResourceManagerFactory); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(map[string]types.AWSResourceManagerFactory)
}
}
return r0
}
// NewSession provides a mock function with given fields: _a0, _a1, _a2, _a3
func (_m *ServiceController) NewSession(_a0 v1alpha1.AWSRegion, _a1 *string, _a2 v1alpha1.AWSResourceName, _a3 schema.GroupVersionKind) (*session.Session, error) {
ret := _m.Called(_a0, _a1, _a2, _a3)
var r0 *session.Session
var r1 error
if rf, ok := ret.Get(0).(func(v1alpha1.AWSRegion, *string, v1alpha1.AWSResourceName, schema.GroupVersionKind) (*session.Session, error)); ok {
return rf(_a0, _a1, _a2, _a3)
}
if rf, ok := ret.Get(0).(func(v1alpha1.AWSRegion, *string, v1alpha1.AWSResourceName, schema.GroupVersionKind) *session.Session); ok {
r0 = rf(_a0, _a1, _a2, _a3)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*session.Session)
}
}
if rf, ok := ret.Get(1).(func(v1alpha1.AWSRegion, *string, v1alpha1.AWSResourceName, schema.GroupVersionKind) error); ok {
r1 = rf(_a0, _a1, _a2, _a3)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// WithLogger provides a mock function with given fields: _a0
func (_m *ServiceController) WithLogger(_a0 logr.Logger) types.ServiceController {
ret := _m.Called(_a0)
var r0 types.ServiceController
if rf, ok := ret.Get(0).(func(logr.Logger) types.ServiceController); ok {
r0 = rf(_a0)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(types.ServiceController)
}
}
return r0
}
// WithPrometheusRegistry provides a mock function with given fields: _a0
func (_m *ServiceController) WithPrometheusRegistry(_a0 prometheus.Registerer) types.ServiceController {
ret := _m.Called(_a0)
var r0 types.ServiceController
if rf, ok := ret.Get(0).(func(prometheus.Registerer) types.ServiceController); ok {
r0 = rf(_a0)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(types.ServiceController)
}
}
return r0
}
// WithResourceManagerFactories provides a mock function with given fields: _a0
func (_m *ServiceController) WithResourceManagerFactories(_a0 []types.AWSResourceManagerFactory) types.ServiceController {
ret := _m.Called(_a0)
var r0 types.ServiceController
if rf, ok := ret.Get(0).(func([]types.AWSResourceManagerFactory) types.ServiceController); ok {
r0 = rf(_a0)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(types.ServiceController)
}
}
return r0
}
// NewServiceController creates a new instance of ServiceController. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewServiceController(t interface {
mock.TestingT
Cleanup(func())
}) *ServiceController {
mock := &ServiceController{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}