Documentation
¶
Index ¶
Constants ¶
View Source
const ( ProblemBase = "https://relic.sas.com/" ProblemKeyUsage = ProblemBase + "key-usage" )
Variables ¶
View Source
var ( ErrForbidden = &Problem{ Status: http.StatusForbidden, Type: ProblemBase + "forbidden", } ErrCertificateRequired = &Problem{ Status: http.StatusUnauthorized, Type: ProblemBase + "certificate-required", Detail: "A client certificate must be provided to use this service", } ErrCertificateNotRecognized = &Problem{ Status: http.StatusUnauthorized, Type: ProblemBase + "certificate-not-recognized", Detail: "The provided client certificate was not recognized or does not grant access to any resources", } ErrTokenRequired = &Problem{ Status: http.StatusUnauthorized, Type: ProblemBase + "token-required", Detail: "A bearer token or client certificate must be provided to use this service", } ErrUnknownSignatureType = &Problem{ Status: http.StatusBadRequest, Type: ProblemBase + "unknown-signature-type", Detail: "Unknown signature type specified", } ErrUnknownDigest = &Problem{ Status: http.StatusBadRequest, Type: ProblemBase + "unknown-digest-algorithm", Detail: "Unknown digest algorithm specified", } )
Functions ¶
func FromResponse ¶
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"`
// error-specific
Param string `json:"param,omitempty"`
Errors []string `json:"errors,omitempty"`
}
Problem implements a RFC 7807 HTTP "problem" response
func BadParameterError ¶
func MissingParameterError ¶
func NoCertificateError ¶
func TokenAuthorizationError ¶
type ResponseError ¶
func (ResponseError) Error ¶
func (e ResponseError) Error() string
func (ResponseError) Temporary ¶
func (e ResponseError) Temporary() bool
Click to show internal directories.
Click to hide internal directories.