Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateReq ¶
type CreateReq struct { g.Meta `path:"/demo" method:"post" tags:"DemoService" summary:"Create a demo record"` Fielda string `p:"fileda" v:"required|passport|length:4,30"` Fieldb string `p:"filedb" v:"required|length:10,30"` }
创建记录示例.
type DeleteReq ¶
type DeleteReq struct { g.Meta `path:"/demo/:id" method:"delete" tags:"DemoService" summary:"Delete a demo record"` ID uint `p:"id" in:"path" v:"required|integer|min:1"` }
删除记录示例.
type GetListReq ¶
type GetListReq struct { g.Meta `path:"/demo" method:"get" tags:"DemoService" summary:"Get demo records list"` api.CommonPaginationReq }
查询记录列表示例.
type GetListRes ¶
type GetListRes struct { api.CommonPaginationRes List []model.DemoListOutputItem `json:"list"` }
type GetOneReq ¶
type GetOneReq struct { g.Meta `path:"/demo/:fielda" method:"get" tags:"DemoService" summary:"Get demo info by fielda"` Fielda string `p:"fielda" in:"path" v:"required|length:4,30"` }
查询单条记录示例.
Click to show internal directories.
Click to hide internal directories.