messagehandler

package
v1.24.3 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: Apache-2.0 Imports: 10 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 {
	base.BaseHandler
}

func (*MessageHandler) ListMessage

func (h *MessageHandler) ListMessage(c *gin.Context)

ListMessage 获取我的消息列表

@Tags			Message
@Summary		获取我的消息列表
@Description	获取我的消息列表
@Accept			json
@Produce		json
@Param			page			query		int															false	"page"
@Param			size			query		int															false	"page"
@Param			is_read			query		bool														false	"是否已读,不指定则是所有"
@Param			message_type	query		string														false	"消息类型(message、alert、approve),不指定则是所有"
@Success		200				{object}	handlers.ResponseStruct{Data=[]models.UserMessageStatus}	"messages"
@Router			/v1/message [get]
@Security		JWT

func (*MessageHandler) ReadMessage

func (h *MessageHandler) ReadMessage(c *gin.Context)

ReadMessage 获取消息详情

@Tags			Message
@Summary		获取消息详情
@Description	获取消息详情,获取之后将自动标记成了已读
@Accept			json
@Produce		json
@Param			message_id		path		uint											true	"message_id"
@Param			message_type	path		uint											true	"消息类型(message/alert)"
@Success		200				{object}	handlers.ResponseStruct{Data=models.Message}	"messages"
@Router			/v1/message/{message_id} [put]
@Security		JWT

func (*MessageHandler) RegistRouter

func (h *MessageHandler) RegistRouter(rg *gin.RouterGroup)

type MessageRet

type MessageRet []models.Message

func (MessageRet) Len

func (a MessageRet) Len() int

func (MessageRet) Less

func (a MessageRet) Less(i, j int) bool

func (MessageRet) Swap

func (a MessageRet) Swap(i, j int)

Jump to

Keyboard shortcuts

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