Documentation
¶
Overview ¶
Package verify contains the verify controller
Package verify contains the verify controller ¶
Package verify contains the verify controller
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
VerifyService domainVerify.Service
}
Controller is a struct that contains the verify service
func (*Controller) NewCreateOTP ¶
func (c *Controller) NewCreateOTP(ctx *gin.Context)
NewCreateOTP godoc
@Tags verifys
@Summary Create New SMS/whatsapp Verify OTP
@Description Create new SMS/whatsapp verify OTP from external system like Twilio
@Accept json
@Produce json
@Param data body NewCreateOTPRequest true "body data"
@Success 201 {object} domainVerify.Response
@Failure 400 {object} VerifyResponse
@Failure 500 {object} VerifyResponse
@Router /otp/create [post]
func (*Controller) NewValidateOTP ¶
func (c *Controller) NewValidateOTP(ctx *gin.Context)
NewValidateOTP godoc
@Tags verifys
@Summary Validates a SMS/whatsapp OTP
@Description Validate a SMS/whatsapp OTP from external system like Twilio
@Accept json
@Produce json
@Param data body NewValidateOTPRequest true "body data"
@Success 201 {object} domainVerify.Response
@Failure 400 {object} VerifyResponse
@Failure 500 {object} VerifyResponse
@Router /otp/validate [post]
type NewCreateOTPRequest ¶
type NewCreateOTPRequest struct {
To string `json:"to" example:"+919901170563, rajesh.biswas@purplease.com" binding:"required"`
Channel string `json:"channel" example:"sms, whatsapp, call, email" binding:"required"`
}
NewCreateOTPRequest is a struct that contains the new verify OTP request information
type NewValidateOTPRequest ¶
type NewValidateOTPRequest struct {
To string `json:"to,omitempty" example:"+919901170563, rajesh.biswas@purplease.com" validate:"required"`
Code string `json:"code,omitempty" example:"123456" validate:"required"`
}
NewValidateOTPRequest is a struct that contains the new validate OTP request information
type VerifyResponse ¶
type VerifyResponse struct {
Verify string `json:"verify"`
}
VerifyResponse is a struct that contains the response body for the verify
Click to show internal directories.
Click to hide internal directories.