response

package
v0.0.0-...-e662f33 Latest Latest
Warning

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

Go to latest
Published: May 19, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIErrorFromCode

func APIErrorFromCode(c *fiber.Ctx, code int64, message ...string) error

func APIOkWithData

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

Types

type APIResponseError

type APIResponseError struct {
	OK      bool   `json:"ok"`
	Code    int64  `json:"code"`
	Message string `json:"message"`
}

func NewErrorResponse

func NewErrorResponse(code int64, msg string) *APIResponseError

type APIResponseOK

type APIResponseOK struct {
	OK   bool        `json:"ok"`
	Data interface{} `json:"data,omitempty"`
}

func NewSuccessResponse

func NewSuccessResponse(data interface{}) *APIResponseOK

Jump to

Keyboard shortcuts

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