ginx

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindForm

func BindForm(c *gin.Context, obj any) bool

func BindJSON

func BindJSON(c *gin.Context, obj any) bool

func BindQuery

func BindQuery(c *gin.Context, obj any) bool

func BindUri

func BindUri(c *gin.Context, obj any) bool

func QueryBool

func QueryBool(c *gin.Context, key string) bool

func QueryFloat

func QueryFloat(c *gin.Context, key string) float64

func QueryInt

func QueryInt(c *gin.Context, key string) int

func QueryString

func QueryString(c *gin.Context, key string) string

func ResponseError

func ResponseError(c *gin.Context, err error)

func ResponseFail

func ResponseFail(c *gin.Context, code int, message string)

func ResponseOk

func ResponseOk(c *gin.Context, data any)

Types

type Engine

type Engine struct {
	*gin.Engine
}

func New

func New() *Engine

type Error

type Error struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

func NewError

func NewError(code int, message string) *Error

func (*Error) Error

func (e *Error) Error() string

type Response

type Response struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	Data    any    `json:"data,omitempty"`
}

Jump to

Keyboard shortcuts

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