response

package
v0.4.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BadRequest

func BadRequest(c *fiber.Ctx, err error)

func BadRequestErrors

func BadRequestErrors(c *fiber.Ctx, errors []map[string]string)

func Created

func Created(c *fiber.Ctx, data interface{})

func InternalServerError

func InternalServerError(c *fiber.Ctx, err error)

func NoContent

func NoContent(c *fiber.Ctx)

func Ok

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

Types

type ErrorResponse

type ErrorResponse struct {
	Success bool                `json:"success"`
	Status  int                 `json:"status"`
	Error   []map[string]string `json:"error"`
	Data    interface{}         `json:"data"`
	Message *string             `json:"message"`
}

type SuccessOkResponse

type SuccessOkResponse struct {
	Success bool        `json:"success"`
	Status  int         `json:"status"`
	Error   interface{} `json:"error"`
	Data    interface{} `json:"data"`
}

Jump to

Keyboard shortcuts

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