http

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: Apache-2.0 Imports: 9 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseBody

func ParseBody(c *fiber.Ctx, v validation.Validator, i i18np.I18n, d interface{})

func ParseParams

func ParseParams(c *fiber.Ctx, v validation.Validator, i i18np.I18n, d interface{})

func ParseQuery

func ParseQuery(c *fiber.Ctx, v validation.Validator, i i18np.I18n, d interface{})

func RunServer

func RunServer(cfg Config) error

func RunServerOnAddr

func RunServerOnAddr(addr string, cfg Config) error

Types

type Config

type Config struct {
	Host           string
	Port           int
	Group          string
	AppName        string
	CreateHandler  func(router fiber.Router) fiber.Router
	I18n           *i18np.I18n
	AcceptLangs    []string
	BodyLimit      int
	ReadBufferSize int
	Debug          bool
}

type ErrorHandler added in v0.0.9

type ErrorHandler func(c *fiber.Ctx, err error) error

func NewErrorHandler

func NewErrorHandler(log bool) ErrorHandler

Jump to

Keyboard shortcuts

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