problem

package
v0.0.0-...-25ebc1e Latest Latest
Warning

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

Go to latest
Published: May 31, 2022 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const CANCEL_BAD_REQUEST = ERROR_BASE_URL + "cancel"
View Source
const (
	ContentType_PROBLEM_JSON = "application/problem+json"
)
View Source
const ERROR_BASE_URL = "http://readium.org/license-status-document/error/"
View Source
const FILTER_BAD_REQUEST = ERROR_BASE_URL + "filter"
View Source
const REGISTRATION_BAD_REQUEST = ERROR_BASE_URL + "registration"
View Source
const RENEW_BAD_REQUEST = ERROR_BASE_URL + "renew"
View Source
const RENEW_REJECT = ERROR_BASE_URL + "renew/date"
View Source
const RETURN_BAD_REQUEST = ERROR_BASE_URL + "return"
View Source
const SERVER_INTERNAL_ERROR = ERROR_BASE_URL + "server"

Variables

This section is empty.

Functions

func Error

func Error(w http.ResponseWriter, r *http.Request, problem Problem, status int)

func NotFoundHandler

func NotFoundHandler(w http.ResponseWriter, r *http.Request)

func PanicReport

func PanicReport(err interface{})

func PrintStack

func PrintStack()

Types

type Problem

type Problem struct {
	Type string `json:"type,omitempty"`
	//optionnal
	Title    string `json:"title,omitempty"`
	Status   int    `json:"status,omitempty"` //if present = http response code
	Detail   string `json:"detail,omitempty"`
	Instance string `json:"instance,omitempty"`
}

Jump to

Keyboard shortcuts

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