Documentation ¶
Overview ¶
Copyright 2019-2020 Axetroy. All rights reserved. MIT license.
Copyright 2019-2020 Axetroy. All rights reserved. MIT license.
Copyright 2019-2020 Axetroy. All rights reserved. MIT license.
Copyright 2019-2020 Axetroy. All rights reserved. MIT license.
Copyright 2019-2020 Axetroy. All rights reserved. MIT license.
Copyright 2019-2020 Axetroy. All rights reserved. MIT license.
Copyright 2019-2020 Axetroy. All rights reserved. MIT license.
Index ¶
- Variables
- func DeleteByUser(c helper.Context, messageId string) (res schema.Response)
- func DeleteMessageById(id string)
- func Get(c helper.Context, id string) (res schema.Response)
- func GetMessageListByUser(c helper.Context, query Query) (res schema.Response)
- func MarkAllRead(c helper.Context) (res schema.Response)
- func MarkBatchRead(c helper.Context, input MarkBatchParams) (res schema.Response)
- func MarkRead(c helper.Context, id string) (res schema.Response)
- func Status(c helper.Context) (res schema.Response)
- type MarkBatchParams
- type Query
Constants ¶
This section is empty.
Variables ¶
View Source
var DeleteByUserRouter = router.Handler(func(c router.Context) { id := c.Param("message_id") c.ResponseFunc(nil, func() schema.Response { return DeleteByUser(helper.NewContext(&c), id) }) })
View Source
var GetMessageListByUserRouter = router.Handler(func(c router.Context) { var ( input Query ) c.ResponseFunc(c.ShouldBindQuery(&input), func() schema.Response { return GetMessageListByUser(helper.NewContext(&c), input) }) })
View Source
var GetRouter = router.Handler(func(c router.Context) { id := c.Param("message_id") c.ResponseFunc(nil, func() schema.Response { return Get(helper.NewContext(&c), id) }) })
GetRouter get Message detail router
View Source
var GetStatusRouter = router.Handler(func(c router.Context) { c.ResponseFunc(nil, func() schema.Response { return Status(helper.NewContext(&c)) }) })
GetRouter get Message detail router
View Source
var ReadAllRouter = router.Handler(func(c router.Context) { c.ResponseFunc(nil, func() schema.Response { return MarkAllRead(helper.NewContext(&c)) }) })
View Source
var ReadBatchRouter = router.Handler(func(c router.Context) { var input MarkBatchParams c.ResponseFunc(c.ShouldBindJSON(&input), func() schema.Response { return MarkBatchRead(helper.NewContext(&c), input) }) })
Functions ¶
func DeleteMessageById ¶
func DeleteMessageById(id string)
func GetMessageListByUser ¶
用户获取自己的消息列表
func MarkBatchRead ¶ added in v0.5.4
func MarkBatchRead(c helper.Context, input MarkBatchParams) (res schema.Response)
Types ¶
type MarkBatchParams ¶ added in v0.5.4
type MarkBatchParams struct {
IDs []string `json:"ids" validate:"required" comment:"ID组"`
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.