common

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResponseJSON

func ResponseJSON(rw http.ResponseWriter, data interface{})

ResponseJSON .

func WriteError

func WriteError(err error, rw http.ResponseWriter) (int, error)

WriteError .

Types

type HTTPError

type HTTPError struct {
	Code     int
	Message  interface{}
	Internal error // Stores the error returned by an external dependency
}

HTTPError represents an error that occurred while handling a request.

func (*HTTPError) Error

func (e *HTTPError) Error() string

Jump to

Keyboard shortcuts

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