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 ¶
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)