-
Notifications
You must be signed in to change notification settings - Fork 6
/
post_create_table_controller_gen.go
56 lines (51 loc) · 1.58 KB
/
post_create_table_controller_gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Package sample ...
// generated version: devel
package sample
import (
"github.com/go-generalize/api_gen/samples/standard/server/props"
"github.com/labstack/echo/v4"
)
// PostCreateTableController ...
type PostCreateTableController struct {
*props.ControllerProps
}
// NewPostCreateTableController ...
func NewPostCreateTableController(cp *props.ControllerProps) *PostCreateTableController {
p := &PostCreateTableController{
ControllerProps: cp,
}
return p
}
// PostCreateTable ...
// @Summary WIP
// @Description WIP
// @Accept json
// @Produce json
// @Param ID body string false ""
// @Param Text body string false ""
// @Param Flag body Flag false ""
// @Param map body map[Flag]Flag false ""
// @Success 200 {object} PostCreateTableResponse
// @Failure 400 {object} wrapper.APIError
// @Failure 500 {object} wrapper.APIError
// @Router /create_table [POST]
func (p *PostCreateTableController) PostCreateTable(
c echo.Context, req *PostCreateTableRequest,
) (res *PostCreateTableResponse, err error) {
// API Error Usage: github.com/go-generalize/api_gen/samples/standard/server/wrapper
//
// return nil, wrapper.NewAPIError(http.StatusBadRequest)
//
// return nil, wrapper.NewAPIError(http.StatusBadRequest).SetError(err)
//
// body := map[string]interface{}{
// "code": http.StatusBadRequest,
// "message": "invalid request parameter.",
// }
// return nil, wrapper.NewAPIError(http.StatusBadRequest, body).SetError(err)
panic("require implements.") // FIXME require implements.
}
// AutoBind - use echo.Bind
func (p *PostCreateTableController) AutoBind() bool {
return true
}