response

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetermineFormat

func DetermineFormat(c fiber.Ctx) string

func Initialize added in v0.3.6

func Initialize(v string)

func ParseExpandQuery added in v0.3.6

func ParseExpandQuery(c fiber.Ctx) []string

func SendCreated

func SendCreated(c fiber.Ctx, data interface{}) error

func SendError

func SendError(c fiber.Ctx, statusCode int, message string) error

func SendFormatted

func SendFormatted(c fiber.Ctx, statusCode int, data interface{}) error

func SendJSON added in v0.4.6

func SendJSON(c fiber.Ctx, statusCode int, data interface{}) error

func SendSuccess

func SendSuccess(c fiber.Ctx, data interface{}) error

TODO refactor to more flexible Send method with status code

func SetCommonHeaders added in v0.3.6

func SetCommonHeaders(c fiber.Ctx)

func SetContentTypeHeader added in v0.4.6

func SetContentTypeHeader(c fiber.Ctx, format string)

func ValidateAndRespond

func ValidateAndRespond(c fiber.Ctx, s interface{}) error

func ValidateStruct

func ValidateStruct(s interface{}) error

Types

type ValidationExample

type ValidationExample struct {
	Email    string `json:"email" validate:"required,email"`
	Password string `json:"password" validate:"required,min=8"`
	Age      int    `json:"age" validate:"gte=0,lte=130"`
}

Jump to

Keyboard shortcuts

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