Documentation
¶
Index ¶
- Variables
- func Env_password_Loaded_string(Type string) string
- func GenerateOTP(length int, Number_length int) string
- func GetOtpFromRedis(email string, ch chan string)
- func Image_Get_Api(c *gin.Context)
- func Movie_get_Api(c *gin.Context)
- func Run_Redis_Server(ch chan string)
- func Run_Server_Sql(ch chan string) (*sql.DB, error)
- func SaveOtpToRedis(email string, otp string, Storage int)
- func Send_Email_otp(ch chan string, name_file_Email string, otp_cod string, ...)
Constants ¶
This section is empty.
Variables ¶
var Amount int
var Amount_i int
var ContentType string
var ContentType_i string
var Directory_name string
var Directory_name_i string
var Drive string
var Drive_i string
var FileName string
var FileName_i string
===============================================
var Folder_name string
var Folder_name_i string
var NameFile string
var NameFile_i string
var Path string
var Path_i string
var RedisClient *redis.Client
var Unit int
var Unit_i int
Functions ¶
func Env_password_Loaded_string ¶
Env_password_Loaded_string ¶
Parameters: ¶
- This function receives the password from env, so its inputs are based on the parameters specified beforehand.
Example: ¶
High speed in receiving passwords and receiving passwords with high security
func GenerateOTP ¶
GenerateOTP ¶
This package is responsible for generating random numbers.
Parameters: ¶
length int = Number value For example : 10
Number_length = What number should the numbers be from? For example, the numbers used should be from 1 to 5.
Returns: ¶
string = This is the output value that is returned, for example 123456.
func GetOtpFromRedis ¶
GetOtpFromRedis ¶
Redis code recipient based on email ¶
Parameters: ¶
email string , ch chan string
Returns: ¶
OTP not found And Error retrieving OTP And otpcod
func Image_Get_Api ¶
This function is for capturing Image from the user. ¶
Parameters: ¶
- Amount_i int = File size value, for example 1 MB
- Unit_i int = The unit of value, for example 20, has three states:
1- 10 KB
2- 20 MB
3- 30 GB
- NameFile_i string = The name under which the user uploads their file.
- Folder_name_i string = The name of the folder where the Image is saved, for example, Uploads.
- Directory_name_i string = Directory path inside that folder, for example Image
- Drive_i string = The drive where the file is saved or the path itself, for example: D:/MyApp
var FileName_i string
var ContentType_i string
var Path_i string
These are the return parameters of this function.
func Movie_get_Api ¶
This function is for capturing video from the user. ¶
Parameters: ¶
- Amount int = File size value, for example 1 MB
- Unit int = The unit of value, for example 20, has three states:
1- 10 KB
2- 20 MB
3- 30 GB
- NameFile string = The name under which the user uploads their file.
- Folder_name string = The name of the folder where the video is saved, for example, Uploads.
- Directory_name string = Directory path inside that folder, for example video
- Drive string = The drive where the file is saved or the path itself, for example: D:/MyApp
var FileName string
var ContentType string
var Path string
var Emali string
var User string
var User_n string
These are the return parameters of this function.
func Run_Redis_Server ¶
func Run_Redis_Server(ch chan string)
Run_Redis_Server ¶
This is for starting redis ¶
To start:
Run_Redis_Server(ch chan string)
func Run_Server_Sql ¶
Run_Server_Sql ¶
It is for starting the mysql server.
Returns: ¶
- ch chan string
- database, err := Run_Server_Sql(ch)
func SaveOtpToRedis ¶
SaveOtpToRedis
It is for storing temporary code in the Redis system.
Parameters:
email string , otp string , Storage int
NOTE:
- Enter the storage duration based on your needs.
- Duration is based on minutes.
func Send_Email_otp ¶
func Send_Email_otp(ch chan string, name_file_Email string, otp_cod string, SetHeader_server string, SetHeader_Client string)
Send_Email ¶
This function is for sending emails [otp].
Parameters: ¶
- ch chan string
- name_file_Email string for Example Email_sign_in.html
- otp_cod string for Example 123456
- SetHeader_server for Example Company name
- SetHeader_Client for Example Recipient's email
NOTE: ¶
This code is only for the OTP system.
It gives an output to your html code which is for displaying the code.
Returns: ¶
It returns three states:
1- err in template execution
2- Failed to send email
3- Email sent successfully
Types ¶
This section is empty.