 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Overview ¶
Package sms defines interfaces for sending SMS text messages.
Although exported, this package is non intended for general consumption. It is a shared dependency between multiple exposure notifications projects. We cannot guarantee that there won't be breaking changes in the future.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
	ProviderType ProviderType
	// Twilio options
	TwilioAccountSid string
	TwilioAuthToken  string
	TwilioFromNumber string
}
    Config represents configuration for an SMS provider.
type Provider ¶
type Provider interface {
	// SendSMS sends an SMS text message from the given number to the given number
	// with the provided message.
	SendSMS(ctx context.Context, to, message string) error
}
    type ProviderType ¶
type ProviderType string
ProviderType represents a type of SMS provider.
const ( ProviderTypeNoop ProviderType = "NOOP" ProviderTypeTwilio ProviderType = "TWILIO" )
type Twilio ¶
type Twilio struct {
	// contains filtered or unexported fields
}
    Twilio sends messages via the Twilio API.
type TwilioError ¶
TwilioError represents an error returned from the Twilio API.
func (*TwilioError) Error ¶
func (e *TwilioError) Error() string
 Click to show internal directories. 
   Click to hide internal directories.