fiber

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CustomErrorHandler added in v0.0.17

func CustomErrorHandler(defErrHan func(err error) error) func(*fiber.Ctx, error) error

func ErrHandler

func ErrHandler(ctx *fiber.Ctx, err error) error

func GenerateConfig

func GenerateConfig() fiber.Config

Types

type AuthMiddleware added in v0.0.5

type AuthMiddleware struct {
	PublicKey        string
	PrivateKey       string
	AuthHeader       string
	AuthHeaderDecode string
	Salt             string
}

func NewAuthMiddleware added in v0.0.7

func NewAuthMiddleware(
	publicKey string,
	privateKey string,
	authHeader string,
	authHeaderDecode string,
	salt string) *AuthMiddleware

func (*AuthMiddleware) DecodeToken added in v0.0.5

func (auth *AuthMiddleware) DecodeToken(ctx *fiber.Ctx) (err error)

type ReturnData

type ReturnData[T any] struct {
	Code    int    `json:"code"`
	Success bool   `json:"success"`
	Status  string `json:"status"`
	Data    T      `json:"data"`
}

func NewReturnData added in v0.0.17

func NewReturnData[T any](code int, success bool, status string, data T) ReturnData[T]

func (ReturnData[T]) WriteResponseBody

func (rcv ReturnData[T]) WriteResponseBody(ctx *fiber.Ctx) error

Jump to

Keyboard shortcuts

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