handlers

package
v0.0.0-...-1249312 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCampaignCustomerHandler

func CreateCampaignCustomerHandler(c *gin.Context)

CreateCampaignCustomerHandler creates a new campaign customer @Summary Create a campaign customer @Description Create a new campaign customer @Tags CampaignCustomers @Accept json @Produce json @Param campaignCustomer body models.CampaignCustomer true "Campaign customer data" @Success 201 {object} models.CampaignCustomer @Failure 400 {object} models.ErrorResponse @Failure 500 {object} models.ErrorResponse @Router /campaign-customers [post]

func CreateCampaignHandler

func CreateCampaignHandler(c *gin.Context)

CreateCampaignHandler creates a new drip campaign @Summary Create a campaign @Description Create a new drip campaign @Tags Campaigns @Accept json @Produce json @Param campaign body models.DripCampaign true "Campaign data" @Success 201 {object} models.DripCampaign @Failure 400 {object} models.ErrorResponse @Failure 500 {object} models.ErrorResponse @Router /campaigns [post]

func CreateCustomerHandler

func CreateCustomerHandler(c *gin.Context)

CreateCustomerHandler creates a new customer @Summary Create a customer @Description Create a new customer @Tags Customers @Accept json @Produce json @Param customer body models.Customer true "Customer data" @Success 201 {object} models.Customer @Failure 400 {object} models.ErrorResponse @Failure 500 {object} models.ErrorResponse @Router /customers [post]

func CreateEmailTemplateHandler

func CreateEmailTemplateHandler(c *gin.Context)

CreateEmailTemplateHandler creates a new email template @Summary Create an email template @Description Create a new email template @Tags EmailTemplates @Accept json @Produce json @Param emailTemplate body models.EmailTemplate true "Email template data" @Success 201 {object} models.EmailTemplate @Failure 400 {object} models.ErrorResponse @Failure 500 {object} models.ErrorResponse @Router /email-templates [post]

func CreateStageHandler

func CreateStageHandler(c *gin.Context)

CreateStageHandler creates a new stage @Summary Create a stage @Description Create a new stage @Tags Stages @Accept json @Produce json @Param stage body models.Stage true "Stage data" @Success 201 {object} models.Stage @Failure 400 {object} models.ErrorResponse @Failure 500 {object} models.ErrorResponse @Router /stages [post]

func CreateStepHandler

func CreateStepHandler(c *gin.Context)

CreateStepHandler creates a new step @Summary Create a step @Description Create a new step @Tags Steps @Accept json @Produce json @Param step body models.Step true "Step data" @Success 201 {object} models.Step @Failure 400 {object} models.ErrorResponse @Failure 500 {object} models.ErrorResponse @Router /steps [post]

func CreateUserHandler

func CreateUserHandler(c *gin.Context)

CreateUserHandler creates a new user

func DeleteCampaignCustomerHandler

func DeleteCampaignCustomerHandler(c *gin.Context)

DeleteCampaignCustomerHandler deletes a specific campaign customer by ID @Summary Delete a campaign customer @Description Delete a specific campaign customer by ID @Tags CampaignCustomers @Produce json @Param id path int true "Campaign customer ID" @Success 200 {object} models.SuccessResponse @Failure 404 {object} models.ErrorResponse @Failure 500 {object} models.ErrorResponse @Router /campaign-customers/{id} [delete]

func DeleteCampaignHandler

func DeleteCampaignHandler(c *gin.Context)

DeleteCampaignHandler deletes a specific drip campaign by ID @Summary Delete a campaign @Description Delete a specific drip campaign by ID @Tags Campaigns @Produce json @Param id path int true "Campaign ID" @Success 200 {object} models.SuccessResponse @Failure 404 {object} models.ErrorResponse @Failure 500 {object} models.ErrorResponse @Router /campaigns/{id} [delete]

func DeleteCustomerHandler

func DeleteCustomerHandler(c *gin.Context)

DeleteCustomerHandler deletes a specific customer by ID @Summary Delete a customer @Description Delete a specific customer by ID @Tags Customers @Produce json @Param id path int true "Customer ID" @Success 200 {object} models.SuccessResponse @Failure 404 {object} models.ErrorResponse @Failure 500 {object} models.ErrorResponse @Router /customers/{id} [delete]

func DeleteEmailTemplateHandler

func DeleteEmailTemplateHandler(c *gin.Context)

DeleteEmailTemplateHandler deletes a specific email template by ID @Summary Delete an email template @Description Delete a specific email template by ID @Tags EmailTemplates @Produce json @Param id path int true "Email template ID" @Success 200 {object} models.SuccessResponse @Failure 404 {object} models.ErrorResponse @Failure 500 {object} models.ErrorResponse @Router /email-templates/{id} [delete]

func DeleteStageHandler

func DeleteStageHandler(c *gin.Context)

DeleteStageHandler deletes a specific stage by ID @Summary Delete a stage @Description Delete a specific stage by ID @Tags Stages @Produce json @Param id path int true "Stage ID" @Success 200 {object} models.SuccessResponse @Failure 404 {object} models.ErrorResponse @Failure 500 {object} models.ErrorResponse @Router /stages/{id} [delete]

func DeleteStepHandler

func DeleteStepHandler(c *gin.Context)

DeleteStepHandler deletes a specific step by ID @Summary Delete a step @Description Delete a specific step by ID @Tags Steps @Produce json @Param id path int true "Step ID" @Success 200 {object} models.SuccessResponse @Failure 404 {object} models.ErrorResponse @Failure 500 {object} models.ErrorResponse @Router /steps/{id} [delete]

func DeleteUserHandler

func DeleteUserHandler(c *gin.Context)

DeleteUserHandler deletes a specific user by ID

func GetCampaignCustomerHandler

func GetCampaignCustomerHandler(c *gin.Context)

GetCampaignCustomerHandler retrieves a specific campaign customer by ID @Summary Get a campaign customer @Description Retrieve a specific campaign customer by ID @Tags CampaignCustomers @Produce json @Param id path int true "Campaign customer ID" @Success 200 {object} models.CampaignCustomer @Failure 404 {object} models.ErrorResponse @Router /campaign-customers/{id} [get]

func GetCampaignCustomersHandler

func GetCampaignCustomersHandler(c *gin.Context)

GetCampaignCustomersHandler retrieves all campaign customers @Summary Get all campaign customers @Description Retrieve all campaign customers @Tags CampaignCustomers @Produce json @Success 200 {array} models.CampaignCustomer @Failure 500 {object} models.ErrorResponse @Router /campaign-customers [get]

func GetCampaignHandler

func GetCampaignHandler(c *gin.Context)

GetCampaignHandler retrieves a specific drip campaign by ID @Summary Get a campaign @Description Retrieve a specific drip campaign by ID @Tags Campaigns @Produce json @Param id path int true "Campaign ID" @Success 200 {object} models.DripCampaign @Failure 404 {object} models.ErrorResponse @Router /campaigns/{id} [get]

func GetCampaignsHandler

func GetCampaignsHandler(c *gin.Context)

GetCampaignsHandler retrieves all drip campaigns @Summary Get all campaigns @Description Retrieve all drip campaigns @Tags Campaigns @Produce json @Success 200 {array} models.DripCampaign @Failure 500 {object} models.ErrorResponse @Router /campaigns [get]

func GetCustomerHandler

func GetCustomerHandler(c *gin.Context)

GetCustomerHandler retrieves a specific customer by ID @Summary Get a customer @Description Retrieve a specific customer by ID @Tags Customers @Produce json @Param id path int true "Customer ID" @Success 200 {object} models.Customer @Failure 404 {object} models.ErrorResponse @Router /customers/{id} [get]

func GetCustomersHandler

func GetCustomersHandler(c *gin.Context)

GetCustomersHandler retrieves all customers @Summary Get all customers @Description Retrieve all customers @Tags Customers @Produce json @Success 200 {array} models.Customer @Failure 500 {object} models.ErrorResponse @Router /customers [get]

func GetEmailTemplateHandler

func GetEmailTemplateHandler(c *gin.Context)

func GetEmailTemplatesHandler

func GetEmailTemplatesHandler(c *gin.Context)

GetEmailTemplatesHandler retrieves all email templates @Summary Get all email templates @Description Retrieve all email templates @Tags EmailTemplates @Produce json @Success 200 {array} models.EmailTemplate @Failure 500 {object} models.ErrorResponse @Router /email-templates [get]

func GetSettingsHandler

func GetSettingsHandler(c *gin.Context)

GetSettingsHandler retrieves the user settings @Summary Get settings @Description Retrieve the user settings @Tags Settings @Produce json @Success 200 {object} models.Settings @Failure 404 {object} models.ErrorResponse @Router /settings [get]

func GetStageHandler

func GetStageHandler(c *gin.Context)

GetStageHandler retrieves a specific stage by ID @Summary Get a stage @Description Retrieve a specific stage by ID @Tags Stages @Produce json @Param id path int true "Stage ID" @Success 200 {object} models.Stage @Failure 404 {object} models.ErrorResponse @Router /stages/{id} [get]

func GetStagesHandler

func GetStagesHandler(c *gin.Context)

GetStagesHandler retrieves all stages @Summary Get all stages @Description Retrieve all stages @Tags Stages @Produce json @Success 200 {array} models.Stage @Failure 500 {object} models.ErrorResponse @Router /stages [get]

func GetStepHandler

func GetStepHandler(c *gin.Context)

GetStepHandler retrieves a specific step by ID @Summary Get a step @Description Retrieve a specific step by ID @Tags Steps @Produce json @Param id path int true "Step ID" @Success 200 {object} models.Step @Failure 404 {object} models.ErrorResponse @Router /steps/{id} [get]

func GetStepsHandler

func GetStepsHandler(c *gin.Context)

GetStepsHandler retrieves all steps @Summary Get all steps @Description Retrieve all steps @Tags Steps @Produce json @Success 200 {array} models.Step @Failure 500 {object} models.ErrorResponse @Router /steps [get]

func GetUserHandler

func GetUserHandler(c *gin.Context)

GetUserHandler retrieves a specific user by ID

func GetUsersHandler

func GetUsersHandler(c *gin.Context)

GetUsersHandler retrieves all users

func LoginHandler

func LoginHandler(c *gin.Context)

LoginHandler authenticates user credentials and generates a JWT token @Summary User login @Description Authenticate user credentials and generate a JWT token @Tags Auth @Accept json @Produce json @Param credentials body models.LoginRequest true "User credentials" @Success 200 {object} models.TokenResponse @Failure 400 {object} models.ErrorResponse @Failure 401 {object} models.ErrorResponse @Router /login [post]

func SendEmailHandler

func SendEmailHandler(c *gin.Context)

SendEmailHandler sends an email using Gmail SMTP with simple authentication @Summary Send an email @Description Send an email using Gmail SMTP with simple authentication @Tags Email @Accept json @Produce json @Param emailRequest body models.EmailRequest true "Email request data" @Success 200 {object} models.SuccessResponse @Failure 400 {object} models.ErrorResponse @Failure 500 {object} models.ErrorResponse @Router /send-email [post]

func UpdateCampaignCustomerHandler

func UpdateCampaignCustomerHandler(c *gin.Context)

UpdateCampaignCustomerHandler updates a specific campaign customer by ID @Summary Update a campaign customer @Description Update a specific campaign customer by ID @Tags CampaignCustomers @Accept json @Produce json @Param id path int true "Campaign customer ID" @Param campaignCustomer body models.CampaignCustomer true "Updated campaign customer data" @Success 200 {object} models.CampaignCustomer @Failure 400 {object} models.ErrorResponse @Failure 404 {object} models.ErrorResponse @Failure 500 {object} models.ErrorResponse @Router /campaign-customers/{id} [put]

func UpdateCampaignHandler

func UpdateCampaignHandler(c *gin.Context)

UpdateCampaignHandler updates a specific drip campaign by ID @Summary Update a campaign @Description Update a specific drip campaign by ID @Tags Campaigns @Accept json @Produce json @Param id path int true "Campaign ID" @Param campaign body models.DripCampaign true "Updated campaign data" @Success 200 {object} models.DripCampaign @Failure 400 {object} models.ErrorResponse @Failure 404 {object} models.ErrorResponse @Failure 500 {object} models.ErrorResponse @Router /campaigns/{id} [put]

func UpdateCustomerHandler

func UpdateCustomerHandler(c *gin.Context)

UpdateCustomerHandler updates a specific customer by ID @Summary Update a customer @Description Update a specific customer by ID @Tags Customers @Accept json @Produce json @Param id path int true "Customer ID" @Param customer body models.Customer true "Updated customer data" @Success 200 {object} models.Customer @Failure 400 {object} models.ErrorResponse @Failure 404 {object} models.ErrorResponse @Failure 500 {object} models.ErrorResponse @Router /customers/{id} [put]

func UpdateEmailTemplateHandler

func UpdateEmailTemplateHandler(c *gin.Context)

UpdateEmailTemplateHandler updates a specific email template by ID @Summary Update an email template @Description Update a specific email template by ID @Tags EmailTemplates @Accept json @Produce json @Param id path int true "Email template ID" @Param emailTemplate body models.EmailTemplate true "Updated email template data" @Success 200 {object} models.EmailTemplate @Failure 400 {object} models.ErrorResponse @Failure 404 {object} models.ErrorResponse @Failure 500 {object} models.ErrorResponse @Router /email-templates/{id} [put]

func UpdateSettingsHandler

func UpdateSettingsHandler(c *gin.Context)

UpdateSettingsHandler updates the user settings @Summary Update settings @Description Update the user settings @Tags Settings @Accept json @Produce json @Param settings body models.Settings true "Updated settings data" @Success 200 {object} models.Settings @Failure 400 {object} models.ErrorResponse @Failure 500 {object} models.ErrorResponse @Router /settings [put]

func UpdateStageHandler

func UpdateStageHandler(c *gin.Context)

UpdateStageHandler updates a specific stage by ID @Summary Update a stage @Description Update a specific stage by ID @Tags Stages @Accept json @Produce json @Param id path int true "Stage ID" @Param stage body models.Stage true "Updated stage data" @Success 200 {object} models.Stage @Failure 400 {object} models.ErrorResponse @Failure 404 {object} models.ErrorResponse @Failure 500 {object} models.ErrorResponse @Router /stages/{id} [put]

func UpdateStepHandler

func UpdateStepHandler(c *gin.Context)

UpdateStepHandler updates a specific step by ID @Summary Update a step @Description Update a specific step by ID @Tags Steps @Accept json @Produce json @Param id path int true "Step ID" @Param step body models.Step true "Updated step data" @Success 200 {object} models.Step @Failure 400 {object} models.ErrorResponse @Failure 404 {object} models.ErrorResponse @Failure 500 {object} models.ErrorResponse @Router /steps/{id} [put]

func UpdateUserHandler

func UpdateUserHandler(c *gin.Context)

UpdateUserHandler updates a specific user by ID

Types

This section is empty.

Jump to

Keyboard shortcuts

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