http

package
v0.0.0-...-1b2adb6 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const CustomErr = 499

CustomErr 自定义错误码

Variables

This section is empty.

Functions

func NewCustomErrHandler

func NewCustomErrHandler(v any) (int, any)

Types

type ErrorMsg

type ErrorMsg struct {
	Detail string `json:"detail"` // 错误详情
}

func NewErrorMsg

func NewErrorMsg(detail string) *ErrorMsg

type Validator

type Validator struct {
	Validator *validator.Validate
	Uni       *ut.UniversalTranslator
	Trans     map[string]ut.Translator
}

func NewValidator

func NewValidator() *Validator

func (*Validator) Validate

func (v *Validator) Validate(r *http.Request, data any) error

Directories

Path Synopsis
x
Package http provides a set of functions for working with HTTP requests and responses.
Package http provides a set of functions for working with HTTP requests and responses.

Jump to

Keyboard shortcuts

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