handler

package
v0.0.0-...-115b5aa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2022 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KafkaConn *kafka.Conn

Functions

func AddClients

func AddClients(ctx *fiber.Ctx) error

AddClients godoc @Summary Registers the client details @Description Adds the clients for a logged in user @Tags Add Client @Accept json @Produce json @Param Body body []models.SwaggerClient true "Add the client details" @Param Authorization header string true "Authentication header" @Success 201 {object} config.ApiResponse{} @Success 200 {object} config.ApiResponse{} @Failure 400 {object} config.ApiResponse{} @Security ApiKeyAuth @Router /api/clients [post]

func AddTemplate

func AddTemplate(ctx *fiber.Ctx) error

AddTemplate godoc @Summary Add the mail template @Description Add the mail template @Tags Add template @Accept json @Produce json @Param Body body models.SwaggerTemplate true "Add the template details" @Param Authorization header string true "Authentication header" @Success 201 {object} config.ApiResponse{} @Failure 400 {object} config.ApiResponse{} @Failure 412 {object} config.ApiResponse{} @Failure 500 {object} config.ApiResponse{} @Security ApiKeyAuth @Router /api/addTemplate [post]

func AddUserVariable

func AddUserVariable(ctx *fiber.Ctx) error

AddUserVariable godoc @Summary Add the user variable @Description Add the user variable @Tags Add user variable @Accept json @Produce json @Param Body body models.VariableTemplateInput true "Add the template details" @Param Authorization header string true "Authentication header" @Success 201 {object} config.ApiResponse{} @Failure 400 {object} config.ApiResponse{} @Failure 424 {object} config.ApiResponse{} @Failure 500 {object} config.ApiResponse{} @Security ApiKeyAuth @Router /api/clientDetails [post]

func CheckAuditLog

func CheckAuditLog(ctx *fiber.Ctx) error

CheckAuditLog godoc @Summary CheckAuditLog @Description CheckAuditLog @Tags CheckAuditLog @Accept json @Produce json @Success 200 {object} config.ApiResponse{} @Failure 500 {object} config.ApiResponse{} @Router /api/checkAuditLog [get]

func DeleteAccount

func DeleteAccount(ctx *fiber.Ctx) error

DeleteAccount godoc @Summary Delete the User Account @Description Deletes the user account permanently. All the data gets lost permanently @Tags Delete the Account @Accept json @Produce json @Param Authorization header string true "Authentication header" @Success 200 {object} config.ApiResponse{} @Failure 500 {object} config.ApiResponse{} @Security ApiKeyAuth @Router /privacy/deleteAccount [delete]

func DeleteClient

func DeleteClient(ctx *fiber.Ctx) error

DeleteClient godoc @Summary Delete the client @Description Delete the client @Tags Delete Client @Accept json @Produce json @Param mailId path string true "mail id" @Param Authorization header string true "Authentication header" @Success 200 {object} config.ApiResponse{} @Failure 204 {object} config.ApiResponse{} @Failure 500 {object} config.ApiResponse{} @Security ApiKeyAuth @Router /api/deleteClient [delete]

func DeleteScheduleMail

func DeleteScheduleMail(ctx *fiber.Ctx) error

DeleteScheduleMail godoc @Summary Deletes the scheduled job @Description Deletes the scheduled job for sending mail @Tags Delete Scheduled Job @Accept json @Produce json @Param Authorization header string true "Authentication header" @Param Body body models.DeleteJob true "Delete job Input" @Success 200 {object} config.ApiResponse{} @Failure 400 {object} config.ApiResponse{} @Failure 401 {object} config.ApiResponse{} @Failure 500 {object} config.ApiResponse{} @Security ApiKeyAuth @Router /api/deleteScheduleMail [post]

func DeleteTemplate

func DeleteTemplate(ctx *fiber.Ctx) error

DeleteTemplate godoc @Summary Delete the template @Description Delete the template @Tags Delete Template @Accept json @Produce json @Param id path string true "Template name" @Param Authorization header string true "Authentication header" @Success 200 {object} config.ApiResponse{} @Failure 204 {object} config.ApiResponse{} @Failure 500 {object} config.ApiResponse{} @Security ApiKeyAuth @Router /api/deleteTemplate [delete]

func DeleteUserVariable

func DeleteUserVariable(ctx *fiber.Ctx) error

DeleteUserVariable godoc @Summary Delete the user variable @Description Delete the user variable @Tags Delete user variable @Accept json @Produce json @Param Authorization header string true "Authentication header" @Param Body body models.DeleteTemplateInput true "delete user variable" @Success 200 {object} config.ApiResponse{} @Failure 204 {object} config.ApiResponse{} @Failure 403 {object} config.ApiResponse{} @Failure 500 {object} config.ApiResponse{} @Security ApiKeyAuth @Router /api/clientDetails [delete]

func ForgotPassword

func ForgotPassword(ctx *fiber.Ctx) error

ForgotPassword godoc @Summary ForgotPassword @Description ForgotPassword @Tags ForgotPassword @Accept json @Produce json @Param Body body models.ForgotPassword true "forgot password" @Success 200 {object} config.ApiResponse{} @Failure 400 {object} config.ApiResponse{} @Failure 500 {object} config.ApiResponse{} @Router /auth/forgotPassword [post]

func GetClientVariable

func GetClientVariable(ctx *fiber.Ctx) error

GetClientVariable godoc @Summary Fetch the client variable (variable that can be replaced in a given email template) @Description Fetch the client variable @Tags Fetch Client variable @Accept json @Produce json @Param clientID path string true "client ID" @Param Authorization header string true "Authentication header" @Success 200 {object} config.ApiResponse{} @Failure 403 {object} config.ApiResponse{} @Failure 500 {object} config.ApiResponse{} @Security ApiKeyAuth @Router /api/clientDetails [get]

func GetClients

func GetClients(ctx *fiber.Ctx) error

GetClients godoc @Summary Fetch the clients @Description Fetch the clients @Tags Fetch Client @Accept json @Produce json @Param Authorization header string true "Authentication header" @Success 200 {object} []models.SwaggerClient{} @Failure 204 {object} config.ApiResponse{} @Security ApiKeyAuth @Router /api/clients [get]

func GetNewPassword

func GetNewPassword(ctx *fiber.Ctx) error

GetNewPassword godoc @Summary GetNewPassword @Description GetNewPassword @Tags GetNewPassword @Accept json @Produce json @Param id path string true "uuid" @Success 200 {object} config.ApiResponse{} @Failure 400 {object} config.ApiResponse{} @Failure 412 {object} config.ApiResponse{} @Failure 500 {object} config.ApiResponse{} @Router /auth/getNewPassword [post]

func GetSubsDetail

func GetSubsDetail(ctx *fiber.Ctx) error

GetSubsDetail godoc @Summary Current subscription details @Description Get the current subscription details @Tags Subscription details @Accept json @Produce json @Param Authorization header string true "Authentication header" @Success 200 {object} config.ApiResponse{} @Failure 500 {object} config.ApiResponse{} @Security ApiKeyAuth @Router /api/subscriptionDetails [get]

func GetTemplates

func GetTemplates(ctx *fiber.Ctx) error

GetTemplates godoc @Summary Fetch the templates @Description Fetch all the registered mail templates @Tags Template details @Accept json @Produce json @Param Authorization header string true "Authentication header" @Success 200 {object} config.ApiResponse{} @Failure 500 {object} config.ApiResponse{} @Security ApiKeyAuth @Router /api/getTemplates [get]

func GetUsers

func GetUsers(ctx *fiber.Ctx) error

GetUsers godoc @Summary Fetch the users @Description Fetch the users registered in system @Tags Get User @Accept json @Produce json @Param Authorization header string true "Authentication header" @Success 200 {object} config.ApiResponse{} @Failure 403 {object} config.ApiResponse{} @Failure 500 {object} config.ApiResponse{} @Security ApiKeyAuth @Router /api/users [get]

func Login

func Login(ctx *fiber.Ctx) error

Login godoc @Summary Authenticate the user @Description Authenticates a user and provides jwt token @Tags login @Accept json @Produce json @Param Body body models.LoginInput true "User login" @Success 200 {object} config.ApiResponse{} @Failure 400 {object} config.ApiResponse{} @Failure 500 {object} config.ApiResponse{} @Router /auth/login [post]

func Logout

func Logout(ctx *fiber.Ctx) error

Logout godoc @Summary Logout @Description Logout @Tags Logout @Accept json @Produce json @Param Authorization header string true "Authentication header" @Success 200 {object} config.ApiResponse{} @Security ApiKeyAuth @Router /privacy/logout [post]

func RedisPoolInit

func RedisPoolInit()

func ScheduleMail

func ScheduleMail(ctx *fiber.Ctx) error

ScheduleMail godoc @Summary schedule the mail for clients @Description schedule the mail for clients @Tags Schedule Mail @Accept json @Produce json @Param Body body []models.SendMailInput true "Send Mail Input" @Param Authorization header string true "Authentication header" @Success 200 {object} config.ApiResponse{} @Failure 400 {object} config.ApiResponse{} @Failure 204 {object} config.ApiResponse{} @Failure 417 {object} config.ApiResponse{} @Failure 500 {object} config.ApiResponse{} @Security ApiKeyAuth @Router /api/scheduleMail [post]

func SendMail

func SendMail(ctx *fiber.Ctx) error

SendMail godoc @Summary Send mail to client @Description Sends the mail to the registered client @Tags Send Mail @Accept json @Produce json @Param Body body []models.SendMailInput true "Send Mail Input" @Param Authorization header string true "Authentication header" @Success 200 {object} config.ApiResponse{} @Failure 400 {object} config.ApiResponse{} @Failure 204 {object} config.ApiResponse{} @Failure 417 {object} config.ApiResponse{} @Failure 500 {object} config.ApiResponse{} @Security ApiKeyAuth @Router /api/sendMail [post]

func Signup

func Signup(ctx *fiber.Ctx) error

Signup godoc @Summary The user account registration @Description Registers the user account @Tags signup @Accept json @Produce json @Param Body body models.SignupInput true "User SignupDetails" @Success 200 {object} config.ApiResponse{} @Failure 400 {object} config.ApiResponse{} @Failure 500 {object} config.ApiResponse{} @Router /auth/signup [post]

func Subscribe

func Subscribe(ctx *fiber.Ctx) error

Subscribe godoc @Summary User subscription @Description user can subscribe to a specific plan @Tags Subscribe @Accept json @Produce json @Param Body body models.SubscriptionInput true "subscription details" @Param Authorization header string true "Authentication header" @Success 200 {object} config.ApiResponse{} @Failure 400 {object} config.ApiResponse{} @Failure 424 {object} config.ApiResponse{} @Failure 500 {object} config.ApiResponse{} @Security ApiKeyAuth @Router /api/subscribe [post]

func UpdateClient

func UpdateClient(ctx *fiber.Ctx) error

UpdateClient godoc @Summary Update the client details @Description Update the client details @Tags Update Client @Accept json @Produce json @Param Body body models.SwaggerClient true "client details" @Param mailId path string true "mail id" @Param Authorization header string true "Authentication header" @Success 200 {object} config.ApiResponse{} @Failure 400 {object} config.ApiResponse{} @Failure 204 {object} config.ApiResponse{} @Failure 500 {object} config.ApiResponse{} @Security ApiKeyAuth @Router /api/updateClient [put]

func UpdatePassword

func UpdatePassword(ctx *fiber.Ctx) error

UpdatePassword godoc @Summary The user password update @Description Helps the user to update the password @Tags UpdatePassword @Accept json @Produce json @Param Body body models.UpdatePassword true "Update Password" @Param Authorization header string true "Authentication header" @Success 200 {object} config.ApiResponse{} @Failure 400 {object} config.ApiResponse{} @Failure 412 {object} config.ApiResponse{} @Failure 204 {object} config.ApiResponse{} @Failure 500 {object} config.ApiResponse{} @Security ApiKeyAuth @Router /privacy/updatePassword [post]

func UpdateTemplate

func UpdateTemplate(ctx *fiber.Ctx) error

UpdateTemplate godoc @Summary Update the template @Description Update the template details @Tags Update Template @Accept json @Produce json @Param id path string true "template name" @Param Authorization header string true "Authentication header" @Success 200 {object} config.ApiResponse{} @Failure 400 {object} config.ApiResponse{} @Failure 204 {object} config.ApiResponse{} @Failure 500 {object} config.ApiResponse{} @Security ApiKeyAuth @Router /api/updateTemplate [put]

Types

type CacheConn

type CacheConn struct {
	// contains filtered or unexported fields
}
var Cache CacheConn

Jump to

Keyboard shortcuts

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