gfiber

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CookieDeleteMe     = "DeleteMe"
	CookieDeleteMaxAge = 0
)

Variables

View Source
var CookieExpireDelete = time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC)

Functions

func CheckHeaderParams

func CheckHeaderParams(name string, v *string, ctx fiber.Ctx) bool

func CheckHeaderParamsWithErrorMsg

func CheckHeaderParamsWithErrorMsg(name string, v *string, errorMsg string, ctx fiber.Ctx) bool

func CheckParamsWithErrorMsg

func CheckParamsWithErrorMsg(name string, str string, v *string, errorMsg string, ctx fiber.Ctx) bool

func CheckPostFormParams

func CheckPostFormParams(name string, v *string, ctx fiber.Ctx) bool

func CheckPostFormParamsWithErrorMsg

func CheckPostFormParamsWithErrorMsg(name string, v *string, errorMsg string, ctx fiber.Ctx) bool

func CheckQueryParams

func CheckQueryParams(name string, v *string, ctx fiber.Ctx) bool

func CheckQueryParamsWithErrorMsg

func CheckQueryParamsWithErrorMsg(name string, v *string, errorMsg string, ctx fiber.Ctx) bool

func ClearCookie

func ClearCookie(ctx fiber.Ctx, domain string, path string, keys ...string)

del cookie if len(keys)==0 this function will delete all cookies

func GetCookie

func GetCookie(name string, ctx fiber.Ctx) string

func GetHeader

func GetHeader(ctx fiber.Ctx, key string) string

func GetTraceContext added in v0.6.13

func GetTraceContext(ctx fiber.Ctx) context.Context

func NewServer

func NewServer(options server.Options, routerProvider func(engine *fiber.App), middleware ...any) server.Server

func PostFormArray

func PostFormArray(ctx fiber.Ctx, name string) []string

func QueryArray

func QueryArray(ctx fiber.Ctx, name string) []string

func SetCookie

func SetCookie(c cookie.Cookie, ctx fiber.Ctx)

func ShouldBindBody

func ShouldBindBody(ctx fiber.Ctx, 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

func ShouldBindHeader

func ShouldBindHeader(ctx fiber.Ctx, obj any) error

func ShouldBindParams

func ShouldBindParams(ctx fiber.Ctx, obj any) error

func ShouldBindQuery

func ShouldBindQuery(ctx fiber.Ctx, obj any) error

Types

type Server

type Server struct {
	Srv     *fiber.App
	Options server.Options
}

func (*Server) GetServeServer added in v0.3.3

func (server *Server) GetServeServer() any

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