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.
Index ¶
- Variables
- func Create(c helper.Context, input CreateMessageParams) (res schema.Response)
- func DeleteByAdmin(c helper.Context, messageId string) (res schema.Response)
- func DeleteMessageById(id string)
- func GetByAdmin(c helper.Context, id string) (res schema.Response)
- func GetMessageListByAdmin(c helper.Context, query Query) (res schema.Response)
- func Update(c helper.Context, messageId string, input UpdateParams) (res schema.Response)
- type CreateMessageParams
- type Query
- type UpdateParams
Constants ¶
This section is empty.
Variables ¶
View Source
var CreateRouter = router.Handler(func(c router.Context) { var ( input CreateMessageParams ) c.ResponseFunc(c.ShouldBindJSON(&input), func() schema.Response { return Create(helper.NewContext(&c), input) }) })
View Source
var DeleteByAdminRouter = router.Handler(func(c router.Context) { id := c.Param(ParamsIdName) c.ResponseFunc(nil, func() schema.Response { return DeleteByAdmin(helper.NewContext(&c), id) }) })
View Source
var GetAdminRouter = router.Handler(func(c router.Context) { id := c.Param(ParamsIdName) c.ResponseFunc(nil, func() schema.Response { return GetByAdmin(helper.NewContext(&c), id) }) })
管理员获取个人消息详情
View Source
var GetMessageListByAdminRouter = router.Handler(func(c router.Context) { var ( input Query ) c.ResponseFunc(c.ShouldBindQuery(&input), func() schema.Response { return GetMessageListByAdmin(helper.NewContext(&c), input) }) })
View Source
var (
ParamsIdName = "message_id"
)
View Source
var UpdateRouter = router.Handler(func(c router.Context) { var ( input UpdateParams ) id := c.Param(ParamsIdName) c.ResponseFunc(c.ShouldBindJSON(&input), func() schema.Response { return Update(helper.NewContext(&c), id, input) }) })
Functions ¶
func DeleteMessageById ¶
func DeleteMessageById(id string)
func GetByAdmin ¶
Get Message detail
func GetMessageListByAdmin ¶
用户获取自己的消息列表
Types ¶
type CreateMessageParams ¶
type UpdateParams ¶
Click to show internal directories.
Click to hide internal directories.