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.
Index ¶
- Variables
- func Get(c helper.Context, id string) (res schema.Response)
- func GetNotificationListByUser(c helper.Context, query Query) (res schema.Response)
- func MarkRead(c helper.Context, notificationID string) (res schema.Response)
- func MarkReadBatch(c helper.Context, notificationIDs []string) (res schema.Response)
- type MarkReadBatchParams
- type Query
Constants ¶
This section is empty.
Variables ¶
View Source
var GetNotificationListByUserRouter = router.Handler(func(c router.Context) { var input Query c.ResponseFunc(c.ShouldBindQuery(&input), func() schema.Response { return GetNotificationListByUser(helper.NewContext(&c), input) }) })
GetListRouter get list router
View Source
var GetRouter = router.Handler(func(c router.Context) { id := c.Param("id") c.ResponseFunc(nil, func() schema.Response { return Get(helper.NewContext(&c), id) }) })
GetRouter get notification detail router
View Source
var MarkReadBatchRouter = router.Handler(func(c router.Context) { var params MarkReadBatchParams c.ResponseFunc(c.ShouldBindJSON(¶ms), func() schema.Response { return MarkReadBatch(helper.NewContext(&c), params.IDs) }) })
Functions ¶
func GetNotificationListByUser ¶
GetList get notification list
Types ¶
type MarkReadBatchParams ¶ added in v0.7.0
type MarkReadBatchParams struct {
IDs []string `json:"ids"`
}
Click to show internal directories.
Click to hide internal directories.