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.
Index ¶
- Variables
- func DeleteReportById(id string)
- func GetListByAdmin(c helper.Context, query Query) (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 UpdateByAdminParams
Constants ¶
This section is empty.
Variables ¶
View Source
var GetListByAdminRouter = router.Handler(func(c router.Context) { var ( input Query ) 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 GetTypesRouter = router.Handler(func(c router.Context) { c.ResponseFunc(nil, func() schema.Response { return schema.Response{ Message: "", Status: schema.StatusSuccess, Data: model.ReportTypes, } }) })
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 UpdateByAdmin ¶
Types ¶
type Query ¶
type Query struct { schema.Query Uid *string `json:"uid" url:"uid" validate:"omitempty,max=32" comment:"用户ID"` // 用户ID Type *model.ReportType `json:"type" url:"type" validate:"omitempty" comment:"类型"` // 类型 Status *model.ReportStatus `json:"status" url:"status" validate:"omitempty,number" comment:"状态"` // 状态 }
type UpdateByAdminParams ¶
type UpdateByAdminParams struct { Status *model.ReportStatus `json:"status" validate:"omitempty,number,gte=0" comment:"状态"` // 更改状态 Locked *bool `json:"locked" validate:"omitempty" comment:"是否锁定"` // 是否锁定 }
Click to show internal directories.
Click to hide internal directories.