verify

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: 5 Imported by: 0

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

Jump to

Keyboard shortcuts

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