biz

package
v0.0.0-...-8c797e3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2024 License: Apache-2.0, MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileUpload

func FileUpload(c *gin.Context)

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

func GetHeaderFull(c *gin.Context)

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

func GetJSON(c *gin.Context)

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

func GetPath(c *gin.Context)

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

func GetQuery(c *gin.Context)

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

func GetQueryFull(c *gin.Context)

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

func GetString(c *gin.Context)

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

func PostForm(c *gin.Context)

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

func PostFormFull(c *gin.Context)

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

func PostJsonModelBiz(c *gin.Context)

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

func PostQueryJsonMode(c *gin.Context)

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]

func Router

func Router(g *gin.Engine, basePath string)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL