Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BadRequest = New(http.StatusBadRequest, "bad request") Forbidden = New(http.StatusForbidden, "forbidden") NotFound = New(http.StatusNotFound, "not found") MethodNotAllowed = New(http.StatusMethodNotAllowed, "method not allowed") Conflict = New(http.StatusConflict, "conflict") Internal = New(http.StatusInternalServerError, "internal server error") )
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct {
Code int `json:"code" xml:"code"`
Message string `json:"message,omitempty" xml:"message,omitempty"`
Metadata map[string]any `json:"metadata,omitempty" xml:"metadata,omitempty"`
// contains filtered or unexported fields
}
func (*Error) AppendMetadata ¶
func (*Error) WithMetadata ¶
Click to show internal directories.
Click to hide internal directories.