response

package
v0.0.0-...-d481519 Latest Latest
Warning

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

Go to latest
Published: May 4, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BadRequest

func BadRequest()

func Success

func Success(msg string, data interface{}) interface{}

Types

type ErrorBody

type ErrorBody struct {
	Error   bool        `json:"error"`
	Message string      `json:"message"`
	Reason  interface{} `json:"reason"`
}

func Error

func Error(msg string, reason interface{}) ErrorBody

type SuccessBody

type SuccessBody struct {
	Error   bool        `json:"error"`
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

func SuccessForTest

func SuccessForTest(body string) (*SuccessBody, error)

Jump to

Keyboard shortcuts

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