handlers

package
v0.0.0-...-54354b8 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OnlineUsers = make(map[string]*websocket.Conn)

Functions

This section is empty.

Types

type AdminHandler

type AdminHandler struct {
	// contains filtered or unexported fields
}

func NewAdminHandler

func NewAdminHandler(uc *usecase.AdminUseCase) *AdminHandler

func (*AdminHandler) BlockUser

func (h *AdminHandler) BlockUser(ctx *gin.Context)

func (*AdminHandler) Login

func (h *AdminHandler) Login(ctx *gin.Context)

func (*AdminHandler) UnblockUser

func (h *AdminHandler) UnblockUser(ctx *gin.Context)

type ChatHandler

type ChatHandler struct {
	// contains filtered or unexported fields
}

func NewChatHandler

func NewChatHandler(uc *usecase.ChatUseCase) *ChatHandler

func (*ChatHandler) SendChat

func (h *ChatHandler) SendChat(ctx *gin.Context)

type CommentHandler

type CommentHandler struct {
	// contains filtered or unexported fields
}

func NewCommentHandler

func NewCommentHandler(uc *usecase.CommentUseCase) *CommentHandler

func (*CommentHandler) CreateComment

func (h *CommentHandler) CreateComment(ctx *gin.Context)

func (*CommentHandler) DeleteComment

func (h *CommentHandler) DeleteComment(ctx *gin.Context)

func (*CommentHandler) GetCommentsByPostId

func (h *CommentHandler) GetCommentsByPostId(ctx *gin.Context)

type PostHandler

type PostHandler struct {
	// contains filtered or unexported fields
}

func NewPostHandler

func NewPostHandler(uc *usecase.PostUseCase) *PostHandler

func (*PostHandler) CreatePost

func (h *PostHandler) CreatePost(ctx *gin.Context)

func (*PostHandler) GetAllPosts

func (h *PostHandler) GetAllPosts(ctx *gin.Context)

func (*PostHandler) LikePost

func (h *PostHandler) LikePost(ctx *gin.Context)

func (*PostHandler) UnlikePost

func (h *PostHandler) UnlikePost(ctx *gin.Context)

type UserHandler

type UserHandler struct {
	// contains filtered or unexported fields
}

func NewUserHandler

func NewUserHandler(uc *usecase.UserUseCase) *UserHandler

func (*UserHandler) FollowUser

func (h *UserHandler) FollowUser(ctx *gin.Context)

func (*UserHandler) GetFollowers

func (h *UserHandler) GetFollowers(ctx *gin.Context)

func (*UserHandler) GetFollowing

func (h *UserHandler) GetFollowing(ctx *gin.Context)

func (*UserHandler) Login

func (h *UserHandler) Login(ctx *gin.Context)

func (*UserHandler) SignUp

func (h *UserHandler) SignUp(ctx *gin.Context)

func (*UserHandler) UnfollowUser

func (h *UserHandler) UnfollowUser(ctx *gin.Context)

func (*UserHandler) VerifyOtp

func (h *UserHandler) VerifyOtp(ctx *gin.Context)

type WebSocketConnection

type WebSocketConnection struct {
	// contains filtered or unexported fields
}

func NewWebsocketHandler

func NewWebsocketHandler(uc *usecase.ChatUseCase) *WebSocketConnection

func (*WebSocketConnection) EstablishConnection

func (ws *WebSocketConnection) EstablishConnection(ctx *gin.Context)

func (*WebSocketConnection) SendMessage

func (ws *WebSocketConnection) SendMessage(ctx context.Context, msg []byte, userId string)

Jump to

Keyboard shortcuts

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