Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AWSSenderConfiguration ¶
type AmazonSNSSender ¶
type AmazonSNSSender struct {
Config AWSSenderConfiguration
}
func (*AmazonSNSSender) SendNotification ¶
func (s *AmazonSNSSender) SendNotification(_ *gin.Context, content, phoneNumber, _ string) error
type NotificationSender ¶
type NotificationSender interface {
SendNotification(ctx *gin.Context, content, phoneNumber, countryCode string) error
}
func CreateNotificationSender ¶
func CreateNotificationSender(httpClient *http.Client) NotificationSender
func NewAmazonSNSSender ¶
func NewAmazonSNSSender(cfg AWSSenderConfiguration) NotificationSender
func NewTwilioSender ¶
func NewTwilioSender(cfg TwilioConfig, httpClient *http.Client) NotificationSender
type NotificationSenderOption ¶
type NotificationSenderOption = func()
type TwilioConfig ¶
type TwilioConfig interface { TwilioAccountSID() string TwilioAuthToken() string TwilioFromNumber() string TwilioSenderConfigs() []toolchainv1alpha1.TwilioSenderConfig }
type TwilioNotificationSender ¶
type TwilioNotificationSender struct { Config TwilioConfig HTTPClient *http.Client //SenderIDs is a map containing country codes (key) and associated sender id (value) SenderIDs map[string]string }
func (*TwilioNotificationSender) SendNotification ¶
func (s *TwilioNotificationSender) SendNotification(ctx *gin.Context, content, phoneNumber, countryCode string) error
Click to show internal directories.
Click to hide internal directories.