handlers

package
v0.0.0-...-12d4a3b Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageHandler

type MessageHandler struct {
	Usecase domain.MessageUsecase
}

func (*MessageHandler) ListMessagesHandler

func (m *MessageHandler) ListMessagesHandler(ctx *gin.Context)

ListMessagesHandler godoc

@Summary		Get all Messages
@Description	Get all Messages from the database or cache and return it
@Produce		json
@Tags			Message
@Param			id	path		string	true	"room id"	example("667aa959e88fab79e20b728c")
@Success		200	{object}	helpers.ListMessages
@Failure		400	{object}	helpers.BadRequest
@Failure		500	{object}	helpers.InternalServerError
@router			/room/{id} [get]

type RoomHandler

type RoomHandler struct {
	Usecase domain.RoomUsecase
}

func (*RoomHandler) CreateRoomHandler

func (r *RoomHandler) CreateRoomHandler(ctx *gin.Context)

CreateRoomHandler godoc

@Summary		Create Room
@Description	Create a Room with the provided data
@Accept			json
@Produce		json
@Tags			Room
@Param			templateRequest	body		entities.RoomRequest	true	"room data"
@Success		201				{object}	helpers.RoomCreated
@Failure		400				{object}	helpers.BadRequest
@Failure		408				{object}	helpers.RoomExists
@Failure		500				{object}	helpers.InternalServerError
@router			/room [post]

func (*RoomHandler) ListRoomsHandler

func (r *RoomHandler) ListRoomsHandler(ctx *gin.Context)

ListRoomsHandler godoc

@Summary		Get all Rooms
@Description	Get all Rooms from the database or cache and return it
@Produce		json
@Tags			Room
@Success		200	{object}	helpers.ListRooms
@Failure		500	{object}	helpers.InternalServerError
@router			/room [get]

Jump to

Keyboard shortcuts

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