helper

package
v0.0.0-...-344b8df Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPResponse

type HTTPResponse struct {
	Code    int         `json:"status"`
	Success bool        `json:"success"`
	Message string      `json:"message"`
	Meta    *Meta       `json:"meta,omitempty"`
	Data    interface{} `json:"data,omitempty"`
	Error   interface{} `json:"error,omitempty"`
}

HTTPResponse model

func NewHTTPResponse

func NewHTTPResponse(code int, message string, params ...interface{}) *HTTPResponse

NewHTTPResponse constructor

func (*HTTPResponse) SetResponse

func (h *HTTPResponse) SetResponse(c echo.Context) error

SetResponse method

type Meta

type Meta struct {
	Page   int `json:"page"`
	Offset int `json:"offset"`
	Limit  int `json:"limit"`
	Total  int `json:"totalRecords"`
}

Meta model

Jump to

Keyboard shortcuts

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