handlers

package
v0.0.0-...-476e770 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateActionRoomHandle

func CreateActionRoomHandle(c *fiber.Ctx) error

CreateActionRoomHandle handles the creation of a new actionRoom @Summary Create a new actionRoom @Description Handles the creation of a new actionRoom by parsing the request body and saving the actionRoom to the database @Tags actions @Accept json @Produce json @Security JWT @Param Authorization header string true "Authentication" default(Bearer <Add_token_here>) @Param body body models.CreateActionRoomModel true "Create ActionRoom Model" @Success 200 {object} object{objectId=string} "ActionRoom created successfully" @Failure 400 {object} utils.TelarError "Bad request" @Failure 500 {object} utils.TelarError "Internal server error" @Router /room [post]

func DeleteActionRoomHandle

func DeleteActionRoomHandle(c *fiber.Ctx) error

DeleteActionRoomHandle handles the deletion of an actionRoom @Summary Delete an actionRoom @Description Handles the deletion of an actionRoom by its ID @Tags actions @Produce json @Security JWT @Param Authorization header string true "Authentication" default(Bearer <Add_token_here>) @Param roomId path string true "ActionRoom ID" @Success 200 {string} string "OK" @Failure 400 {object} utils.TelarError "Bad request" @Failure 500 {object} utils.TelarError "Internal server error" @Router /room/{roomId} [delete]

func DispatchHandle

func DispatchHandle(c *fiber.Ctx) error

DispatchHandle handles the creation of a new actionRoom @Summary Create a new actionRoom @Description Handles the creation of a new actionRoom by dispatching a request to the websocket server @Tags actions @Produce json @Security JWT @Param Authorization header string true "Authentication" default(Bearer <Add_token_here>) @Param roomId path string true "ActionRoom ID" @Success 200 {string} string "OK" @Failure 400 {object} utils.TelarError "Bad request" @Failure 500 {object} utils.TelarError "Internal server error" @Router /dispatch/{roomId} [post]

func GetAccessKeyHandle

func GetAccessKeyHandle(c *fiber.Ctx) error

GetAccessKeyHandle handles retrieving the access key for the current user @Summary Get access key @Description Retrieves the access key for the current user @Tags actions @Produce json @Security JWT @Param Authorization header string true "Authentication" default(Bearer <Add_token_here>) @Success 200 {object} object{accessKey=string} "Access key retrieved successfully" @Failure 400 {object} utils.TelarError "Bad request" @Failure 500 {object} utils.TelarError "Internal server error" @Router /room/access-key [get]

func GetActionRoomHandle

func GetActionRoomHandle(c *fiber.Ctx) error

GetActionRoomHandle handles retrieving an actionRoom by its ID @Summary Get an actionRoom @Description Retrieves an actionRoom by its ID @Tags actions @Produce json @Security JWT @Param Authorization header string true "Authentication" default(Bearer <Add_token_here>) @Param roomId path string true "ActionRoom ID" @Success 200 {object} models.ActionRoomModel "ActionRoom retrieved successfully" @Failure 400 {object} utils.TelarError "Bad request" @Failure 500 {object} utils.TelarError "Internal server error" @Router /room/{roomId} [get]

func SetAccessKeyHandle

func SetAccessKeyHandle(c *fiber.Ctx) error

SetAccessKeyHandle handles setting a new access key for the current user @Summary Set access key @Description Sets a new access key for the current user @Tags actions @Produce json @Security JWT @Param Authorization header string true "Authentication" default(Bearer <Add_token_here>) @Success 200 {object} object{accessKey=string} "Access key set successfully" @Failure 400 {object} utils.TelarError "Bad request" @Failure 500 {object} utils.TelarError "Internal server error" @Router /room/access-key [put]

func UpdateActionRoomHandle

func UpdateActionRoomHandle(c *fiber.Ctx) error

UpdateActionRoomHandle handles updating an existing actionRoom @Summary Update an actionRoom @Description Updates an existing actionRoom with new data @Tags actions @Accept json @Produce json @Security JWT @Param Authorization header string true "Authentication" default(Bearer <Add_token_here>) @Param body body models.ActionRoomModel true "ActionRoom Model" @Success 200 {string} string "OK" @Failure 400 {object} utils.TelarError "Bad request" @Failure 500 {object} utils.TelarError "Internal server error" @Router /room [put]

func VerifyAccessKeyHandle

func VerifyAccessKeyHandle(c *fiber.Ctx) error

VerifyAccessKeyHandle handles verifying the access key for the current user @Summary Verify access key @Description Verifies the access key for the current user @Tags actions @Accept json @Produce json @Security JWT @Param Authorization header string true "Authentication" default(Bearer <Add_token_here>) @Param body body models.ActionVerifyModel true "Action Verify Model" @Success 200 {object} object{isVerified=bool} "Access key verified successfully" @Failure 400 {object} utils.TelarError "Bad request" @Failure 500 {object} utils.TelarError "Internal server error" @Router /room/verify [post]

Types

This section is empty.

Jump to

Keyboard shortcuts

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