Documentation ¶
Index ¶
- Constants
- type IOTP
- type IOTPSMSGateway
- type OTP
- type Phone
- type Sinch
- func (s *Sinch) Call(_ *Phone, _ string, _ string) (string, string, error)
- func (s *Sinch) GetCode() string
- func (s *Sinch) GetName() string
- func (s *Sinch) SendOTP(phone *Phone, _ string) (string, string, error)
- func (s *Sinch) VerifyOTP(phone *Phone, code string) (string, string, bool, bool, error)
- type Twilio
- func (t *Twilio) Call(phone *Phone, _ string, customMessage string) (string, string, error)
- func (t *Twilio) GetCode() string
- func (t *Twilio) GetName() string
- func (t *Twilio) SendOTP(phone *Phone, _ string) (string, string, error)
- func (t *Twilio) VerifyOTP(phone *Phone, code string) (string, string, bool, bool, error)
Constants ¶
View Source
const SMSOTPProviderSinch = "Sinch"
View Source
const SMSOTPProviderTwilio = "Twilio"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IOTPSMSGateway ¶
type OTP ¶
type OTP struct { GatewayPriority []IOTPSMSGateway GatewayName map[string]IOTPSMSGateway }
func NewOTP ¶
func NewOTP(gateways ...IOTPSMSGateway) *OTP
type Phone ¶
type Phone struct { Number string ISO3166 phonenumber.ISO3166 }
type Sinch ¶ added in v0.9.91
func NewSinchSMSOTPProvider ¶ added in v0.9.91
Click to show internal directories.
Click to hide internal directories.