package
Version:
v0.1.6
Opens a new window with list of versions in this module.
Published: Oct 9, 2019
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
BadRequest generates a 400 error.
Conflict generates a 409 error.
Forbidden generates a 403 error.
InternalServerError generates a 500 error.
New generates a custom error.
NotFound generates a 404 error.
Unauthorized generates a 401 error.
type Error struct {
ID string `json:"id"`
Code int32 `json:"code"`
Detail string `json:"detail"`
Status string `json:"status"`
}
Error implements the error interface.
Parse tries to parse a JSON string into an error. If that// fails, it will set the given string as the error detail.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.