response

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2021 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPagingParameters

func GetPagingParameters(r echo.Context) (int, int, string)

GetPagingParameters - Find query params limit and offset

Types

type ErrorReponse

type ErrorReponse struct {
	Message   string `json:"message"`
	ErrorCode int    `json:"errorCode"`
	MoreInfo  string `json:"moreInfo"`
}

ErrorReponse - Estructure representing error

func GenerateErrorResponse

func GenerateErrorResponse(message, moreInfo string, errorCode int) ErrorReponse

GenerateErrorResponse - Made a error response

type SuccessResponse

type SuccessResponse struct {
	Meta    meta        `json:"meta"`
	Records interface{} `json:"records"`
}

SuccessResponse - Estructure representing success

func GenerateSuccessResponse

func GenerateSuccessResponse(obj interface{}, limit, offset, recordCount int) SuccessResponse

GenerateSuccessResponse - Made a success response

Jump to

Keyboard shortcuts

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