Documentation
¶
Index ¶
- type Notifier
- type NotifierMock
- type NotifierMock_Expecter
- type NotifierMock_GetNotifierName_Call
- func (_c *NotifierMock_GetNotifierName_Call) Return(_a0 string) *NotifierMock_GetNotifierName_Call
- func (_c *NotifierMock_GetNotifierName_Call) Run(run func()) *NotifierMock_GetNotifierName_Call
- func (_c *NotifierMock_GetNotifierName_Call) RunAndReturn(run func() string) *NotifierMock_GetNotifierName_Call
- type NotifierMock_Notify_Call
- type NotifiersConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Notifier ¶
type Notifier interface {
GetNotifierName() string
Notify(context.Context, client.Object, corev1.Event, types.NotificationType) error
}
func CreateNotifiers ¶
func CreateNotifiers(ctx context.Context, config NotifiersConfig, logger *zap.SugaredLogger) (notifiers []Notifier, err error)
CreateNotifiers creates and returns a list of Notifier instances
type NotifierMock ¶
NotifierMock is an autogenerated mock type for the Notifier type
func NewNotifierMock ¶
func NewNotifierMock(t interface {
mock.TestingT
Cleanup(func())
}) *NotifierMock
NewNotifierMock creates a new instance of NotifierMock. 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 (*NotifierMock) EXPECT ¶
func (_m *NotifierMock) EXPECT() *NotifierMock_Expecter
func (*NotifierMock) GetNotifierName ¶
func (_m *NotifierMock) GetNotifierName() string
GetNotifierName provides a mock function with no fields
type NotifierMock_Expecter ¶
type NotifierMock_Expecter struct {
// contains filtered or unexported fields
}
func (*NotifierMock_Expecter) GetNotifierName ¶
func (_e *NotifierMock_Expecter) GetNotifierName() *NotifierMock_GetNotifierName_Call
GetNotifierName is a helper method to define mock.On call
func (*NotifierMock_Expecter) Notify ¶
func (_e *NotifierMock_Expecter) Notify(_a0 interface{}, _a1 interface{}, _a2 interface{}, _a3 interface{}) *NotifierMock_Notify_Call
Notify is a helper method to define mock.On call
- _a0 context.Context
- _a1 client.Object
- _a2 v1.Event
- _a3 types.NotificationType
type NotifierMock_GetNotifierName_Call ¶
NotifierMock_GetNotifierName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNotifierName'
func (*NotifierMock_GetNotifierName_Call) Return ¶
func (_c *NotifierMock_GetNotifierName_Call) Return(_a0 string) *NotifierMock_GetNotifierName_Call
func (*NotifierMock_GetNotifierName_Call) Run ¶
func (_c *NotifierMock_GetNotifierName_Call) Run(run func()) *NotifierMock_GetNotifierName_Call
func (*NotifierMock_GetNotifierName_Call) RunAndReturn ¶
func (_c *NotifierMock_GetNotifierName_Call) RunAndReturn(run func() string) *NotifierMock_GetNotifierName_Call
type NotifierMock_Notify_Call ¶
NotifierMock_Notify_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Notify'
func (*NotifierMock_Notify_Call) Return ¶
func (_c *NotifierMock_Notify_Call) Return(_a0 error) *NotifierMock_Notify_Call
func (*NotifierMock_Notify_Call) Run ¶
func (_c *NotifierMock_Notify_Call) Run(run func(_a0 context.Context, _a1 client.Object, _a2 v1.Event, _a3 types.NotificationType)) *NotifierMock_Notify_Call
func (*NotifierMock_Notify_Call) RunAndReturn ¶
func (_c *NotifierMock_Notify_Call) RunAndReturn(run func(context.Context, client.Object, v1.Event, types.NotificationType) error) *NotifierMock_Notify_Call
type NotifiersConfig ¶
type NotifiersConfig struct {
Common types.NotifiersCommonConfig `json:"common" yaml:"common"`
Noop noop.NotifierNoopConfig `json:"noop" yaml:"noop"`
Slack slack.NotifierSlackConfig `json:"slack" yaml:"slack"`
Datadog datadog.NotifierDatadogConfig `json:"datadog" yaml:"datadog"`
HTTP http.Config `json:"http" yaml:"http"`
}