Documentation ¶
Index ¶
- type Config
- type PinpointSMS
- func (p *PinpointSMS) AddressDesc() string
- func (p *PinpointSMS) AddressName() string
- func (p *PinpointSMS) ChannelDesc() string
- func (p *PinpointSMS) ChannelName() string
- func (p *PinpointSMS) ID() string
- func (p *PinpointSMS) MaxAddressLen() int
- func (p *PinpointSMS) MaxBodyLen() int
- func (p *PinpointSMS) MaxOTPLen() int
- func (p *PinpointSMS) Push(otp models.OTP, subject string, body []byte) error
- func (p *PinpointSMS) ValidateAddress(to string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { ApplicationID string `json:"application_id"` AccessKey string `json:"access_key"` SecretKey string `json:"secret_key"` Region string `json:"region"` SMSSenderID string `json:"sms_sender_id"` SMSMessageType string `json:"sms_message_type"` SMSEntityID string `json:"sms_entity_id"` SMSTemplateID string `json:"sms_template_id"` DefaultPhoneCode string `json:"default_phone_code"` MaxConns int `json:"max_conns"` Timeout time.Duration `json:"timeout"` }
type PinpointSMS ¶
type PinpointSMS struct {
// contains filtered or unexported fields
}
PinpointSMS implements the AWS PinpointSMS SMS provider.
func NewSMS ¶
func NewSMS(cfg Config) (*PinpointSMS, error)
func (*PinpointSMS) AddressDesc ¶
func (p *PinpointSMS) AddressDesc() string
AddressDesc returns help text for the phone number.
func (*PinpointSMS) AddressName ¶
func (p *PinpointSMS) AddressName() string
AddressName returns the e-mail Provider's address name.
func (*PinpointSMS) ChannelDesc ¶
func (p *PinpointSMS) ChannelDesc() string
ChannelDesc returns help text for the SMS verification Provider.
func (*PinpointSMS) ChannelName ¶
func (p *PinpointSMS) ChannelName() string
ChannelName returns the Provider's name.
func (*PinpointSMS) MaxAddressLen ¶
func (p *PinpointSMS) MaxAddressLen() int
MaxAddressLen returns the maximum allowed length for the mobile number.
func (*PinpointSMS) MaxBodyLen ¶
func (p *PinpointSMS) MaxBodyLen() int
MaxBodyLen returns the max permitted body size.
func (*PinpointSMS) MaxOTPLen ¶
func (p *PinpointSMS) MaxOTPLen() int
MaxOTPLen returns the maximum allowed length of the OTP value.
func (*PinpointSMS) ValidateAddress ¶
func (p *PinpointSMS) ValidateAddress(to string) error
ValidateAddress "validates" a phone number.
Click to show internal directories.
Click to hide internal directories.