Documentation
¶
Overview ¶
Package validate holds the error types services use to reject input, so the HTTP layer can map them the same way for every module: a FieldError per bad field (422) and RateLimitError (429).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FieldError ¶
FieldError rejects one input field; the API reports it as a validation error.
func FieldErrors ¶
func FieldErrors(err error) []*FieldError
FieldErrors returns every FieldError in err (validation joins one per bad field).
func (*FieldError) Error ¶
func (e *FieldError) Error() string
type RateLimitError ¶
RateLimitError means too many attempts; retry after RetryAfter.
func (*RateLimitError) Error ¶
func (e *RateLimitError) Error() string
Click to show internal directories.
Click to hide internal directories.