response

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2020 License: MIT Imports: 4 Imported by: 9

Documentation

Index

Constants

View Source
const (
	// ERROR represent ERROR status
	ERROR = "ERROR"
	// SUCCESS represent OK status
	SUCCESS = "OK"
)

Variables

This section is empty.

Functions

func CreatedWithData

func CreatedWithData(data interface{}, c echo.Context) error

CreatedWithData response

func Fail

func Fail(c echo.Context) error

Fail response

func FailDetailedwithCode

func FailDetailedwithCode(code int, data interface{}, msg string, c echo.Context) error

FailDetailedwithCode response

func FailWithDataMessage

func FailWithDataMessage(data interface{}, msg string, c echo.Context) error

FailWithDataMessage response

func FailWithDetailed

func FailWithDetailed(status string, data interface{}, msg string, c echo.Context) error

FailWithDetailed response

func FailWithMessage

func FailWithMessage(msg string, c echo.Context) error

FailWithMessage response

func FailWithMessageWithCode

func FailWithMessageWithCode(code int, msg string, c echo.Context) error

FailWithMessageWithCode response

func OK

func OK(c echo.Context) error

OK response

func OKDetailed

func OKDetailed(data interface{}, msg string, c echo.Context) error

OKDetailed response

func OKWithData

func OKWithData(data interface{}, c echo.Context) error

OKWithData response

func OKWithMesssage

func OKWithMesssage(msg string, c echo.Context) error

OKWithMesssage response

func Result

func Result(httpStatus int, status string, data interface{}, msg string, c echo.Context) error

Result response

Types

type Response

type Response struct {
	Message string      `json:"message"`
	Result  interface{} `json:"result"`
}

Response type

type RootResponse

type RootResponse struct {
	Status     string     `json:"status"`
	Response   Response   `json:"response"`
	ServerInfo ServerInfo `json:"serverInfo"`
}

RootResponse type

type ServerInfo

type ServerInfo struct {
	ServerTime string `json:"serverTime"`
}

ServerInfo type

Jump to

Keyboard shortcuts

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