Documentation ¶
Index ¶
- func FileUpload(c *gin.Context)
- func GetHeaderFull(c *gin.Context)
- func GetJSON(c *gin.Context)
- func GetPath(c *gin.Context)
- func GetQuery(c *gin.Context)
- func GetQueryFull(c *gin.Context)
- func GetString(c *gin.Context)
- func PostForm(c *gin.Context)
- func PostFormFull(c *gin.Context)
- func PostJsonModelBiz(c *gin.Context)
- func PostQueryJsonMode(c *gin.Context)
- func Router(g *gin.Engine, basePath string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileUpload ¶
FileUpload
@Summary Upload file for count file size @Description Upload file. warning api in prod will hide, abs remote api for dev @Tags biz @ID file.upload @Accept multipart/form-data @Produce json @Param file formData file true "this is a test file" @Success 200 {string} string "ok" @Failure 400 {object} errdef.Err "We need ID!!" @Failure 404 {object} errdef.Err "Can not find ID" @Router /file/upload [post]
func GetHeaderFull ¶
GetHeaderFull
@Summary /biz/header_full @Description for biz @Tags biz @Accept text/plain @Produce text/plain @Param BIZ_FOO header string true "header BIZ_FOO " default(foo) @Param BIZ_BAR header string true "header BIZ_BAR " default(bar) @Success 200 {object} parse_http.HeaderContent "value in parse_http.HeaderContent" @Failure 400 {object} errdef.Err "error at errdef.Err" @Router /biz/header_full [get]
func GetJSON ¶
GetJSON
@Summary api demo json @Description warning api in prod will hide, abs remote api for dev @Tags biz @Accept application/json @Produce application/json @Success 200 {object} biz.Biz "value in biz.Biz" @Failure 500 "" @Router /biz/json [get]
func GetPath ¶
GetPath
@Summary api path demo for route path @Description warning api in prod will hide, abs remote api for dev @Tags biz @Accept multipart/form-data @Produce json @Param some_id path string true "some id to show" @Success 200 {object} biz.Biz "value in biz.Biz" @Failure 400 {object} errdef.Err "error at errdef.Err" @Router /biz/path/{some_id} [get]
func GetQuery ¶
GetQuery
@Summary api demo for query. @Description warning api in prod will hide, abs remote api for dev @Tags biz @Accept json @Produce json @Param offset query int true "Offset" minimum(0) default(0) @Param limit query int false "limit" default(10) @Success 200 {object} biz.Biz "value in biz.Biz" @Failure 400 {object} errdef.Err "error at errdef.Err" @Router /biz/query [get]
func GetQueryFull ¶
GetQueryFull
@Summary /biz/query_full @Description for biz @Tags biz @Accept json @Produce json @Param foo query string true "params foo " default("") @Param bar query string true "params bar " default("") @Param baz query string true "params baz " default("") @Success 200 {object} parse_http.QueryContent "value in parse_http.QueryContent" @Failure 400 {object} errdef.Err "error at errdef.Err" @Router /biz/query_full [get]
func GetString ¶
GetString
@Summary sample demo string @Description get string of this api. warning api in prod will hide, abs remote api for dev @Tags biz @Accept json @Produce plain @Success 200 "OK" @Failure 500 "" @Router /biz/string [get]
func PostForm ¶
PostForm
@Summary api demo form with: x-www-form-urlencoded @Description warning api in prod will hide, abs remote api for dev @Tags biz @Accept x-www-form-urlencoded @Produce json @Param biz formData biz.Biz true "body model.Biz for post" @Success 200 {object} biz.Biz "value in model.Biz" @Failure 400 {object} errdef.Err "error at errdef.Err" @Router /biz/form [post]
func PostFormFull ¶
PostFormFull
@Summary /biz/form_full @Description for biz @Tags biz @Accept x-www-form-urlencoded @Produce json @Param foo formData string true "form item foo" default(foo) @Param bar formData string true "form item bar" default(bar) @Param baz formData string true "form item baz" default(baz) @Success 200 {object} parse_http.FormContent "value in parse_http.FormContent" @Failure 400 {object} errdef.Err "error at errdef.Err" @Router /biz/form_full [post]
func PostJsonModelBiz ¶
PostJsonModelBiz
@Summary api json struct biz.Biz @Description warning api in prod will hide, abs remote api for dev @Tags biz @Accept application/json @Produce application/json @Param biz body biz.Biz true "body biz.Biz for post" @Success 200 {object} biz.Biz "value in biz.Biz" @Failure 400 {object} errdef.Err "error at errdef.Err" @Router /biz/modelBiz [post]
func PostQueryJsonMode ¶
PostQueryJsonMode
@Summary api post query with json struct biz.Biz @Description warning api in prod will hide, abs remote api for dev @Tags biz @Accept application/json @Produce application/json @Param offset query int true "Offset" @Param limit query int false "limit" @Param biz body biz.Biz true "body biz.Biz for post" @Success 200 {object} biz.Biz "value in biz.Biz" @Failure 400 {object} errdef.Err "error at errdef.Err" @Router /biz/modelBizQuery [post]
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.