Documentation ¶
Index ¶
- Variables
- type ImplTwilio
- func (t *ImplTwilio) MakeTwilioRequest(method string, urlPath string, content url.Values, target interface{}) error
- func (t *ImplTwilio) MakeWhatsappTwilioRequest(ctx context.Context, method string, urlPath string, content url.Values, ...) error
- func (t *ImplTwilio) PhoneNumberVerificationCode(ctx context.Context, to string, code string, marketingMessage string) (bool, error)
- func (t *ImplTwilio) Room(ctx context.Context) (*dto.Room, error)
- func (t *ImplTwilio) SaveTwilioCallbackResponse(ctx context.Context, data dto.Message) error
- func (t *ImplTwilio) SaveTwilioVideoCallbackStatus(ctx context.Context, data dto.CallbackData) error
- func (t *ImplTwilio) SendSMS(ctx context.Context, to string, msg string) error
- func (t *ImplTwilio) TemporaryPIN(ctx context.Context, to string, message string) (bool, error)
- func (t *ImplTwilio) TwilioAccessToken(ctx context.Context) (*dto.AccessToken, error)
- type UsecaseTwilio
Constants ¶
This section is empty.
Variables ¶
var ( TwilioWhatsappSIDEnvVarName = "TWILIO_WHATSAPP_SID" TwilioWhatsappSenderEnvVarName = "TWILIO_WHATSAPP_SENDER" )
TODO: check if this will be an alternative to inaccessible fields from the services
Functions ¶
This section is empty.
Types ¶
type ImplTwilio ¶
type ImplTwilio struct { WhatsappAccountSID string Sender string // contains filtered or unexported fields }
ImplTwilio is the twilio service implementation
func NewImplTwilio ¶
func NewImplTwilio( infrastructure infrastructure.Interactor, ) *ImplTwilio
NewImplTwilio initializes a twilio service instance
func (*ImplTwilio) MakeTwilioRequest ¶ added in v0.0.25
func (t *ImplTwilio) MakeTwilioRequest( method string, urlPath string, content url.Values, target interface{}, ) error
MakeTwilioRequest makes a twilio request
func (*ImplTwilio) MakeWhatsappTwilioRequest ¶ added in v0.0.25
func (t *ImplTwilio) MakeWhatsappTwilioRequest( ctx context.Context, method string, urlPath string, content url.Values, target interface{}, ) error
MakeWhatsappTwilioRequest makes a twilio request
func (*ImplTwilio) PhoneNumberVerificationCode ¶
func (t *ImplTwilio) PhoneNumberVerificationCode( ctx context.Context, to string, code string, marketingMessage string, ) (bool, error)
PhoneNumberVerificationCode sends Phone Number verification codes via WhatsApp
func (*ImplTwilio) Room ¶
Room represents a real-time audio, data, video, and/or screen-share session, and is the basic building block for a Programmable Video application.
func (*ImplTwilio) SaveTwilioCallbackResponse ¶
SaveTwilioCallbackResponse saves the twilio callback response for future analysis
func (*ImplTwilio) SaveTwilioVideoCallbackStatus ¶
func (t *ImplTwilio) SaveTwilioVideoCallbackStatus( ctx context.Context, data dto.CallbackData, ) error
SaveTwilioVideoCallbackStatus saves status callback data
func (*ImplTwilio) TemporaryPIN ¶
TemporaryPIN send PIN via whatsapp to user
func (*ImplTwilio) TwilioAccessToken ¶
func (t *ImplTwilio) TwilioAccessToken( ctx context.Context, ) (*dto.AccessToken, error)
TwilioAccessToken is used to generate short-lived credentials used to authenticate the client-side application to Twilio.
type UsecaseTwilio ¶
type UsecaseTwilio interface { MakeTwilioRequest( method string, urlPath string, content url.Values, target interface{}, ) error MakeWhatsappTwilioRequest( ctx context.Context, method string, urlPath string, content url.Values, target interface{}, ) error Room( ctx context.Context, ) (*dto.Room, error) TwilioAccessToken( ctx context.Context, ) (*dto.AccessToken, error) SendSMS( ctx context.Context, to string, msg string, ) error SaveTwilioVideoCallbackStatus( ctx context.Context, data dto.CallbackData, ) error PhoneNumberVerificationCode( ctx context.Context, to string, code string, marketingMessage string, ) (bool, error) SaveTwilioCallbackResponse( ctx context.Context, data dto.Message, ) error TemporaryPIN( ctx context.Context, to string, message string, ) (bool, error) }
UsecaseTwilio defines twilio service usecases interface