webutil

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Response

func Response(c *fiber.Ctx, status int, message string, data any) error

Response is a takes in a Fiber context object, an HTTP status code, a message string and some data.

func StatusBadRequest

func StatusBadRequest(c *fiber.Ctx, data any) error

StatusBadRequest is ...

func StatusNotFound

func StatusNotFound(c *fiber.Ctx) error

StatusNotFound is ...

func StatusOK

func StatusOK(c *fiber.Ctx, message string, data any) error

StatusOK is ...

Types

type HTTPResponse

type HTTPResponse struct {
	Success bool   `json:"success"`
	Message string `json:"message"`
	Result  any    `json:"result,omitempty"`
}

HTTPResponse represents response body of API

Jump to

Keyboard shortcuts

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