response

package
v0.0.0-...-d45fff1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusSuccess = "success"
	StatusFailure = "failure"
	StatusError   = "error"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Response

type Response struct {
	Status  string      `json:"status"`
	Message string      `json:"message,omitempty"`
	Data    interface{} `json:"data,omitempty"`
}

func BadRequest

func BadRequest(data interface{}) Response

func Forbidden

func Forbidden(data interface{}) Response

func InternalServerError

func InternalServerError() Response

func MethodNotAllowed

func MethodNotAllowed() Response

func NotFound

func NotFound() Response

func Success

func Success(data interface{}) Response

func Unauthorized

func Unauthorized() Response

Jump to

Keyboard shortcuts

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