Documentation
¶
Index ¶
- type IntegrationService
- func (s *IntegrationService) CreateOTP(ctx context.Context, req *model.OTPRequest) (*model.VerifyResponse, error)
- func (s *IntegrationService) CreateSMS(ctx context.Context, req *model.MessageRequest) (*model.MessageResponse, error)
- func (s *IntegrationService) CreateWhatsapp(ctx context.Context, req *model.MessageRequest) (*model.MessageResponse, error)
- func (s *IntegrationService) Run() error
- func (s *IntegrationService) ValidateOTP(ctx context.Context, req *model.ValidateOTPRequest) (*model.VerifyResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IntegrationService ¶
type IntegrationService struct {
TwilioClient *internal.Client
OutreachClient *outreach.Client
Config config.Config
}
IntegrationService handles the integration between Twilio and Outreach
func NewIntegrationService ¶
func NewIntegrationService(cfg config.Config) *IntegrationService
NewIntegrationService creates a new instance of the IntegrationService
func (*IntegrationService) CreateOTP ¶
func (s *IntegrationService) CreateOTP(ctx context.Context, req *model.OTPRequest) (*model.VerifyResponse, error)
CreateOTP exposes twilio service to send OTP message to Whatsapp or SMS
func (*IntegrationService) CreateSMS ¶
func (s *IntegrationService) CreateSMS(ctx context.Context, req *model.MessageRequest) (*model.MessageResponse, error)
CreateSMS exposes twilio service to send SMS
func (*IntegrationService) CreateWhatsapp ¶
func (s *IntegrationService) CreateWhatsapp(ctx context.Context, req *model.MessageRequest) (*model.MessageResponse, error)
CreateWhatsapp exposes twilio service to send Whatsapp message
func (*IntegrationService) Run ¶
func (s *IntegrationService) Run() error
Run starts the integration process
func (*IntegrationService) ValidateOTP ¶
func (s *IntegrationService) ValidateOTP(ctx context.Context, req *model.ValidateOTPRequest) (*model.VerifyResponse, error)
ValidateOTP exposes twilio service to validate a OTP message
Click to show internal directories.
Click to hide internal directories.