respond

package
v0.0.0-...-248868a Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const ErrMaxStack = 5

Variables

This section is empty.

Functions

func Fail

func Fail(c *fiber.Ctx, status, errorCode int, err error) error

func Success

func Success(c *fiber.Ctx, status int, content interface{}) error

Types

type Causer

type Causer interface {
	Cause() error
}

type Error

type Error struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

func (*Error) Error

func (err *Error) Error() string

type Response

type Response struct {
	Data       interface{} `json:"data,omitempty"`
	Message    string      `json:"message"`
	Code       string      `json:"code"`
	StatusCode int         `json:"statusCode"`
	Error      string      `json:"error,omitempty"`
	Latency    string      `json:"latency"`
}

Jump to

Keyboard shortcuts

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