ghertz

package
v0.6.20 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckHeaderParams

func CheckHeaderParams(name string, v *string, ctx *app.RequestContext) bool

func CheckHeaderParamsWithErrorMsg

func CheckHeaderParamsWithErrorMsg(name string, v *string, errorMsg string, ctx *app.RequestContext) bool

func CheckParamsWithErrorMsg

func CheckParamsWithErrorMsg(name string, str string, v *string, errorMsg string, ctx *app.RequestContext) bool

func CheckPostFormParams

func CheckPostFormParams(name string, v *string, ctx *app.RequestContext) bool

func CheckPostFormParamsWithErrorMsg

func CheckPostFormParamsWithErrorMsg(name string, v *string, errorMsg string, ctx *app.RequestContext) bool

func CheckQueryParams

func CheckQueryParams(name string, v *string, ctx *app.RequestContext) bool

func CheckQueryParamsWithErrorMsg

func CheckQueryParamsWithErrorMsg(name string, v *string, errorMsg string, ctx *app.RequestContext) bool

func GetHeader

func GetHeader(ctx *app.RequestContext, key string) string

func NewServer

func NewServer(options gServer.Options, routerProvider func(engine *server.Hertz), middlewares ...app.HandlerFunc) gServer.Server

func PostFormArray

func PostFormArray(ctx *app.RequestContext, name string) []string

func QueryArray

func QueryArray(ctx *app.RequestContext, name string) []string

func ShouldBindBody

func ShouldBindBody(ctx *app.RequestContext, obj any) error

ShouldBindBody binds the request body to a struct. It supports decoding the following content types based on the Content-Type header: application/json, application/xml, application/x-www-form-urlencoded, multipart/form-data If none of the content types above are matched, it will return a ErrUnprocessableEntity error

Types

type Server

type Server struct {
	Svr     *server.Hertz
	Options gServer.Options
}

func (*Server) Run

func (server *Server) Run(graceful ...func())

func (*Server) Shutdown

func (server *Server) Shutdown()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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