httperror

package
v7.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProblemKeyUsage = "https://relic.sas.com/key-usage"
)

Variables

This section is empty.

Functions

func FromResponse

func FromResponse(resp *http.Response) error

Types

type Problem

type Problem struct {
	Status int    `json:"status"`
	Type   string `json:"type"`

	Title    string `json:"title,omitempty"`
	Detail   string `json:"detail,omitempty"`
	Instance string `json:"instance,omitempty"`
}

Problem implements a RFC 7087 HTTP "problem" response

func (Problem) Error

func (e Problem) Error() string

func (Problem) ServeHTTP

func (e Problem) ServeHTTP(rw http.ResponseWriter, req *http.Request)

func (Problem) Temporary

func (e Problem) Temporary() bool

type ResponseError

type ResponseError struct {
	Method     string
	URL        string
	Status     string
	StatusCode int
	BodyText   string
}

func (ResponseError) Error

func (e ResponseError) Error() string

func (ResponseError) Temporary

func (e ResponseError) Temporary() bool

Jump to

Keyboard shortcuts

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