middlewares

package
v0.0.0-...-a28d39e Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HandlerError = func(c fiber.Ctx, err error) error {
	var e *fiber.Error
	if errors.As(err, &e) {
		return render.Error(c, err)
	}

	return nil
}

HandlerError handler error fiber

Functions

func AcceptLanguage

func AcceptLanguage() fiber.Handler

AcceptLanguage header Accept-Language

func AuthorizationAPIKey

func AuthorizationAPIKey() fiber.Handler

AuthorizationAPIKey authorization x-api-key

func AuthorizationAdminRequired

func AuthorizationAdminRequired() fiber.Handler

AuthorizationAdminRequired authorization admin basicauth

func AuthorizationRequired

func AuthorizationRequired() fiber.Handler

AuthorizationRequired authorization jwt and basicauth

func Available

func Available() fiber.Handler

Available available ปิด/เปิด ระบบ

func Logger

func Logger() fiber.Handler

Logger logger

func Maintenance

func Maintenance() fiber.Handler

Maintenance maintenance กรณีปิดระบบ ดึง body html

func Notfound

func Notfound() fiber.Handler

Notfound not found route

func ValidateAPIKey

func ValidateAPIKey(c fiber.Ctx, key string) (bool, error)

ValidateAPIKey verify api-key

func WrapError

func WrapError() fiber.Handler

WrapError wrap error

Types

This section is empty.

Jump to

Keyboard shortcuts

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