message

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 message contains the message controller

Package message contains the message controller

Package message contains the message controller

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	MessageService domainMessage.Service
}

Controller is a struct that contains the message service

func (*Controller) NewSMSMessage

func (c *Controller) NewSMSMessage(ctx *gin.Context)

NewSMSMessage godoc

@Tags			messages
@Summary		Create New SMS Message
@Description	Create new SMS message on the external system like TWILIO
@Accept			json
@Produce		json
@Param			data	body		NewMessageRequest	true	"body data"
@Success		201		{object}	domainMessage.Response
@Failure		400		{object}	MessageResponse
@Failure		500		{object}	MessageResponse
@Router			/messages/sms [post]

func (*Controller) NewWhatsappMessage

func (c *Controller) NewWhatsappMessage(ctx *gin.Context)

NewWhatsappMessage godoc

@Tags			messages
@Summary		Create New Whatsapp Message
@Description	Create new Whatsapp message on the external system like TWILIO
@Accept			json
@Produce		json
@Param			data	body		NewMessageRequest	true	"body data"
@Success		201		{object}	domainMessage.Response
@Failure		400		{object}	MessageResponse
@Failure		500		{object}	MessageResponse
@Router			/messages/whatsapp [post]

type MessageResponse

type MessageResponse struct {
	Message string `json:"message"`
}

MessageResponse is a struct that contains the response body for the message

type NewMessageRequest

type NewMessageRequest struct {
	PhoneNumber string `json:"phone_number" example:"+919901170563" binding:"required"`
	Body        string `json:"body" example:"Something" binding:"required"`
}

NewMessageRequest is a struct that contains the new message request information

Jump to

Keyboard shortcuts

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