sender

package
v0.0.0-...-350629e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSSenderConfiguration

type AWSSenderConfiguration interface {
	AWSAccessKeyID() string
	AWSSecretAccessKey() string
	AWSRegion() string
	AWSSenderID() string
	AWSSMSType() string
}

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 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL