Documentation ¶
Index ¶
- Constants
- func NewMailgunDeliveryError(id, response, errorMessage string) error
- type BaseNotificationDeliveryService
- type DefaultTemplateLoader
- type DeliveryService
- type DeliveryServiceFactory
- type DeliveryServiceFactoryConfig
- type MailgunConfig
- type MailgunDeliveryError
- type MailgunNotificationDeliveryService
- type MailgunOption
- type Reconciler
- type TemplateLoader
Constants ¶
View Source
const (
ContextReplyTo = "ReplyTo"
)
Variables ¶
This section is empty.
Functions ¶
func NewMailgunDeliveryError ¶
Types ¶
type BaseNotificationDeliveryService ¶
type BaseNotificationDeliveryService struct {
TemplateLoader TemplateLoader
}
func (*BaseNotificationDeliveryService) GenerateContent ¶
type DefaultTemplateLoader ¶
type DefaultTemplateLoader struct{}
func (*DefaultTemplateLoader) GetNotificationTemplate ¶
func (l *DefaultTemplateLoader) GetNotificationTemplate(name string, templateSetName string) (*notificationtemplates.NotificationTemplate, error)
type DeliveryService ¶
type DeliveryService interface {
Send(notification *toolchainv1alpha1.Notification, templateSetName string) error
}
func NewMailgunNotificationDeliveryService ¶
func NewMailgunNotificationDeliveryService(config DeliveryServiceFactoryConfig, templateLoader TemplateLoader, opts ...MailgunOption) DeliveryService
NewMailgunNotificationDeliveryService creates a delivery service that uses the Mailgun API to deliver email notifications
type DeliveryServiceFactory ¶
type DeliveryServiceFactory struct { Client runtimeclient.Client Config DeliveryServiceFactoryConfig }
func NewNotificationDeliveryServiceFactory ¶
func NewNotificationDeliveryServiceFactory(client runtimeclient.Client, config DeliveryServiceFactoryConfig) *DeliveryServiceFactory
func (*DeliveryServiceFactory) CreateNotificationDeliveryService ¶
func (f *DeliveryServiceFactory) CreateNotificationDeliveryService() (DeliveryService, error)
type DeliveryServiceFactoryConfig ¶
type DeliveryServiceFactoryConfig interface { MailgunConfig // contains filtered or unexported methods }
type MailgunConfig ¶
type MailgunDeliveryError ¶
type MailgunDeliveryError struct {
// contains filtered or unexported fields
}
func (MailgunDeliveryError) Error ¶
func (e MailgunDeliveryError) Error() string
type MailgunNotificationDeliveryService ¶
type MailgunNotificationDeliveryService struct { Mailgun mailgun.Mailgun SenderEmail string ReplyToEmail string // contains filtered or unexported fields }
func (*MailgunNotificationDeliveryService) Send ¶
func (s *MailgunNotificationDeliveryService) Send(notification *toolchainv1alpha1.Notification, templateSetName string) error
type MailgunOption ¶
type MailgunOption interface {
// ApplyToMailgun applies this configuration to the given mailgun instance.
ApplyToMailgun(mailgun.Mailgun)
}
type Reconciler ¶
type Reconciler struct { Client runtimeclient.Client Scheme *runtime.Scheme // contains filtered or unexported fields }
Reconciler reconciles a Notification object
func (*Reconciler) SetupWithManager ¶
func (r *Reconciler) SetupWithManager(mgr manager.Manager, config toolchainconfig.ToolchainConfig) error
SetupWithManager sets up the controller with the Manager.
type TemplateLoader ¶
type TemplateLoader interface {
GetNotificationTemplate(name string, templateSetName string) (*notificationtemplates.NotificationTemplate, error)
}
Click to show internal directories.
Click to hide internal directories.