Documentation ¶
Index ¶
Constants ¶
View Source
const ( SaltLength = 64 // On a scale of 3 - 31, how intense Bcrypt should be EncryptCost = 14 )
Variables ¶
View Source
var ( ErrBadRequest = &Error{"bad_request", 400, "Bad request", "Request body is not well-formed. It must be JSON."} ErrNotAcceptable = &Error{"not_acceptable", 406, "Not Acceptable", "Accept header must be set to 'application/vnd.api+json'."} ErrUnsupportedMediaType = &Error{"unsupported_media_type", 415, "Unsupported Media Type", "Content-Type header must be set to: 'application/vnd.api+json'."} ErrInternalServer = &Error{"internal_server_error", 500, "Internal Server Error", "Something went wrong."} )
Functions ¶
func GenerateHashAndSalt ¶
func WriteError ¶
func WriteError(w http.ResponseWriter, err *Error)
Types ¶
Click to show internal directories.
Click to hide internal directories.