controllers

package
v0.0.0-...-bede71d Latest Latest
Warning

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

Go to latest
Published: May 15, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatController

type ChatController struct {
	Svc api_service.ChatService
}

func (*ChatController) ChatHistoryHandler

func (controller *ChatController) ChatHistoryHandler(c *fiber.Ctx) error

ChatHistoryHandler godoc @Summary Chat History @Description Retrieves the chat history between two users @Tags Chat @Accept json @Produce json @Param u1 query string true "Username of user 1" @Param u2 query string true "Username of user 2" @Success 200 {object} api_structure.Response @Failure 500 {object} api_structure.ErrorResponse @Router /chat-history [get]

func (*ChatController) ContactListHandler

func (controller *ChatController) ContactListHandler(c *fiber.Ctx) error

ContactListHandler godoc @Summary Contact List @Description Retrieves the contact list of a user @Tags User @Security BearerAuth @Accept json @Produce json @Success 200 {object} api_structure.Response @Failure 500 {object} api_structure.ErrorResponse @Router /contact-list [get]

func (*ChatController) VerifyContactHandler

func (controller *ChatController) VerifyContactHandler(c *fiber.Ctx) error

VerifyContactHandler godoc @Summary Verify Contact @Description Verifies the contact of a user @Tags User @Security BearerAuth @Accept json @Produce json @Success 200 {object} api_structure.Response @Failure 500 {object} api_structure.ErrorResponse @Router /verify-contact [get]

type UserController

type UserController struct {
	Svc        api_service.UserService
	RedisModel api_model.UserModel
}

func (*UserController) LoginHandler

func (controller *UserController) LoginHandler(c *fiber.Ctx) error

LoginHandler godoc @Summary Login User @Description Logs in a user @Tags User @Accept json @Produce json @Param body body api_structure.User true "Request body" @Success 200 {object} api_structure.Response @Failure 500 {object} api_structure.ErrorResponse @Router /login [post]

func (*UserController) RegisterHandler

func (controller *UserController) RegisterHandler(c *fiber.Ctx) error

RegisterHandler godoc @Summary Register User @Description Registers a new user @Tags User @Accept json @Produce json @Param body body api_structure.User true "Request body" @Success 200 {object} api_structure.Response @Failure 500 {object} api_structure.ErrorResponse @Router /register [post]

type WsController

type WsController struct {
	Scv api_model.RedisService
}

func (*WsController) WsHandler

func (redisModel *WsController) WsHandler(c *websocket.Conn)

WsHandler handles WebSocket connections and message sending @Summary WebSocket Handler @Description Handles WebSocket connections and message sending @Tags WebSocket @Router /ws [get]

Jump to

Keyboard shortcuts

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