response

package
v0.0.0-...-03efb0c Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Noop res = iota
	ERequestNotValid
	EBadRequest
	EInternalServerError
	EOk
)

Variables

This section is empty.

Functions

func BadRequest

func BadRequest(ctx *fiber.Ctx, message interface{}) error

cannot parse body request / query params / path params

func InternalServerError

func InternalServerError(ctx *fiber.Ctx) error

func Ok

func Ok(ctx *fiber.Ctx, data interface{}) error

func RequestNotValid

func RequestNotValid(ctx *fiber.Ctx, validationError interface{}) error

body request / query params / path params is in wrong format

Types

type ResponseFactory

type ResponseFactory interface {
	Create() error
}

func Make

func Make(resType res, ctx *fiber.Ctx, message interface{}) ResponseFactory

Jump to

Keyboard shortcuts

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