Documentation ¶
Index ¶
- Constants
- Variables
- func AddOTPtoRedis(otp string, email string, c context.Context) error
- func GenerateOTP() string
- func GenerateRandomString(n int) string
- func RedisConnect()
- func ResponseError(w http.ResponseWriter, code int, message string)
- func ResponseJSON(w http.ResponseWriter, code int, payload interface{})
- func SMTPConnect()
- func SendOTP(otp string, recipient string) error
- func VerifyOTP(otp string, email string, c context.Context) (error, bool)
Constants ¶
View Source
const (
OTPLength = 6
)
Variables ¶
View Source
var RedisClient *redis.Client
View Source
var SMTPClient *smtp.Client
Functions ¶
func GenerateOTP ¶
func GenerateOTP() string
func GenerateRandomString ¶
func RedisConnect ¶
func RedisConnect()
func ResponseError ¶
func ResponseError(w http.ResponseWriter, code int, message string)
func ResponseJSON ¶
func ResponseJSON(w http.ResponseWriter, code int, payload interface{})
func SMTPConnect ¶
func SMTPConnect()
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.