internal

package
v0.0.0-...-844d4e4 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	AccountSID          string
	AuthToken           string
	VerifyServiceSID    string
	WhatsappPhoneNumber string
	SMSPhoneNumber      string
}

Client represents the Twilio API client

func NewTwilioClient

func NewTwilioClient(cfg config.Config) *Client

NewTwilioClient creates a new instance of the Twilio client

func (*Client) SendOTPVerification

func (c *Client) SendOTPVerification(req *model.OTPRequest) (*model.VerifyResponse, error)

SendOTPVerification sends an whatsapp/SMS OTP message using the Twilio API

func (*Client) SendSMS

func (c *Client) SendSMS(req *model.MessageRequest) (*model.MessageResponse, error)

SendSMS sends an SMS message using the Twilio API

func (*Client) SendWhatsapp

func (c *Client) SendWhatsapp(req *model.MessageRequest) (*model.MessageResponse, error)

SendWhatsapp sends an whatsapp message using the Twilio API

func (*Client) ValidateOTPVerification

func (c *Client) ValidateOTPVerification(req *model.ValidateOTPRequest) (*model.VerifyResponse, error)

ValidateOTPVerification validates an whatsapp/SMS OTP message using the Twilio API

Jump to

Keyboard shortcuts

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