binding

package module
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindChangeRequest

func BindChangeRequest(c *gin.Context, ctxKey string, request audit.IChangeRequest) (err error)

BindChangeRequest Bind general change request(Update/Delete)

func BindID

func BindID(c *gin.Context) (id uint, err error)

BindID Bind param ID

func BindJSON

func BindJSON(c *gin.Context, ctxKey string, request interface{}) error

BindJSON binds general JSON request. It will return error if request doesn't have body.

func BindQuery

func BindQuery(c *gin.Context, ctxKey string, request interface{}) (err error)

BindQuery Bind general form request

func BindURI added in v0.1.6

func BindURI(c *gin.Context, ctxKey string, request interface{}) (err error)

BindURI binds param from uri

func BindURIUint added in v0.1.5

func BindURIUint(c *gin.Context, uri string) (val uint, err error)

BindURIUint binds uint from uri

func ShouldBindJSON added in v0.1.3

func ShouldBindJSON(c *gin.Context, ctxKey string, request interface{}) error

ShouldBindJSON binds general JSON request. It will ignore request without body.

Types

This section is empty.

Jump to

Keyboard shortcuts

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