webresponse

package module
v0.0.0-...-050041f Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2019 License: MIT Imports: 3 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

webresponse

Documentation

Index

Constants

View Source
const (
	StatusSuccess = "success"
	StatusInfo    = "info"
	StatusError   = "error"
	StatusWarning = "warning"
)

Variables

View Source
var (
	Successful    error = nil
	ErrBadRequest       = errors.New(
		"We're sorry, but there was an error in communication.  Please try again.",
	)
	ErrForbidden = errors.New(
		"We're sorry, but you are not logged in.  Please login to continue.",
	)
	ErrInternalServer = errors.New(
		"We're sorry, but something went wrong on our end.  Please try again later.",
	)
)

Functions

func Error

func Error(err error) []byte

func General

func General(payload map[string]string) []byte

func Status

func Status(status string, statusType string) []byte

func Success

func Success(message string) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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