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.
Index ¶
- Variables
- func DeleteReportById(id string)
- func GetListByAdmin(c helper.Context, input QueryAdmin) (res schema.Response)
- func GetReportByAdmin(c helper.Context, id string) (res schema.Response)
- func UpdateByAdmin(c helper.Context, reportId string, input UpdateByAdminParams) (res schema.Response)
- type Query
- type QueryAdmin
- type UpdateByAdminParams
- type UpdateParams
Constants ¶
This section is empty.
Variables ¶
View Source
var GetListByAdminRouter = router.Handler(func(c router.Context) { var ( input QueryAdmin ) c.ResponseFunc(c.ShouldBindQuery(&input), func() schema.Response { return GetListByAdmin(helper.NewContext(&c), input) }) })
View Source
var GetReportByAdminRouter = router.Handler(func(c router.Context) { id := c.Param("report_id") c.ResponseFunc(nil, func() schema.Response { return GetReportByAdmin(helper.NewContext(&c), id) }) })
View Source
var UpdateByAdminRouter = router.Handler(func(c router.Context) { var ( input UpdateByAdminParams ) reportId := c.Param("report_id") c.ResponseFunc(c.ShouldBindJSON(&input), func() schema.Response { return UpdateByAdmin(helper.NewContext(&c), reportId, input) }) })
Functions ¶
func DeleteReportById ¶
func DeleteReportById(id string)
func GetListByAdmin ¶
func GetListByAdmin(c helper.Context, input QueryAdmin) (res schema.Response)
func UpdateByAdmin ¶
Types ¶
type Query ¶
type Query struct { schema.Query Type *model.ReportType `json:"type" form:"type"` // 类型 Status *model.ReportStatus `json:"status" form:"status"` // 状态 }
type QueryAdmin ¶
type UpdateByAdminParams ¶
type UpdateByAdminParams struct { UpdateParams Locked *bool `json:"locked"` // 是否锁定 }
type UpdateParams ¶
type UpdateParams struct {
Status *model.ReportStatus `json:"status" valid:"required~请选择要标记的状态"`
}
Click to show internal directories.
Click to hide internal directories.