handler

package
v0.0.0-...-22fc0f8 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CodeOK         = 2
	CodeRedirect   = 3
	CodeUserSide   = 4
	CodeServerSide = 5
)

Variables

View Source
var InternalServerErrorResult = Result{
	Code: CodeServerSide,
	Msg:  "internal server error",
}
View Source
var JWTKey = []byte("xQUPmbb2TP9CUyFZkgOnV3JQdr22ZNBx")

Functions

This section is empty.

Types

type Result

type Result struct {
	Data any    `json:"data"`
	Msg  string `json:"message"`
	Code int    `json:"code"`
}

type RetroHandler

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

func NewRetroHandler

func NewRetroHandler(svc service.RetroService) *RetroHandler

func (*RetroHandler) AddPostitResolution

func (h *RetroHandler) AddPostitResolution(ctx *gin.Context)

func (*RetroHandler) ChangePostitResolution

func (h *RetroHandler) ChangePostitResolution(ctx *gin.Context)

func (*RetroHandler) CreatePostit

func (h *RetroHandler) CreatePostit(ctx *gin.Context)

func (*RetroHandler) CreateRetro

func (h *RetroHandler) CreateRetro(ctx *gin.Context)

func (*RetroHandler) CreateTemplate

func (h *RetroHandler) CreateTemplate(ctx *gin.Context)

func (*RetroHandler) DeletePostitByID

func (h *RetroHandler) DeletePostitByID(ctx *gin.Context)

func (*RetroHandler) DeletePostitResolution

func (h *RetroHandler) DeletePostitResolution(ctx *gin.Context)

func (*RetroHandler) DeleteRetroByID

func (h *RetroHandler) DeleteRetroByID(ctx *gin.Context)

func (*RetroHandler) DeleteTemplateByID

func (h *RetroHandler) DeleteTemplateByID(ctx *gin.Context)

func (*RetroHandler) GetRetroByID

func (h *RetroHandler) GetRetroByID(ctx *gin.Context)

GetRetroByID returns everything relative to a retro

func (*RetroHandler) GetRetros

func (h *RetroHandler) GetRetros(ctx *gin.Context)

func (*RetroHandler) GetTemplateByID

func (h *RetroHandler) GetTemplateByID(ctx *gin.Context)

func (*RetroHandler) GetTemplates

func (h *RetroHandler) GetTemplates(ctx *gin.Context)

func (*RetroHandler) GetTopVotePostits

func (h *RetroHandler) GetTopVotePostits(ctx *gin.Context)

func (*RetroHandler) RegisterRoutes

func (h *RetroHandler) RegisterRoutes(server *gin.Engine)

func (*RetroHandler) UpdatePostitByID

func (h *RetroHandler) UpdatePostitByID(ctx *gin.Context)

func (*RetroHandler) VotePostitByID

func (h *RetroHandler) VotePostitByID(ctx *gin.Context)

type UserClaims

type UserClaims struct {
	jwt.RegisteredClaims
	UID int64
}

type UserHandler

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

func NewUserHandler

func NewUserHandler(svc service.UserService) *UserHandler

func (*UserHandler) LoginJWT

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

func (*UserHandler) RegisterRoutes

func (h *UserHandler) RegisterRoutes(server *gin.Engine)

func (*UserHandler) SignUp

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

type WebSocketConnection

type WebSocketConnection struct {
	*websocket.Conn
}

type WebSocketHandler

type WebSocketHandler struct{}

func NewWebSocketHandler

func NewWebSocketHandler() *WebSocketHandler

func (*WebSocketHandler) ListenForWS

func (h *WebSocketHandler) ListenForWS(conn *WebSocketConnection)

func (*WebSocketHandler) ListenToWsChannel

func (h *WebSocketHandler) ListenToWsChannel()

func (*WebSocketHandler) RegisterRoutes

func (h *WebSocketHandler) RegisterRoutes(server *gin.Engine)

func (*WebSocketHandler) WsEndPoint

func (h *WebSocketHandler) WsEndPoint(ctx *gin.Context)

type WsJSONResponse

type WsJSONResponse struct {
	Action  string `json:"action"`
	Message string `json:"message"`
}

type WsPayload

type WsPayload struct {
	Conn   WebSocketConnection `json:"-"`
	Action string              `json:"action"`
}

Jump to

Keyboard shortcuts

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