Versions in this module Expand all Collapse all v0 v0.3.3 Feb 27, 2024 v0.3.2 Feb 21, 2024 Changes in this version + var AllResponses = map[string]struct{} + var ErrBadResendRequest = response("Unable to resend email - please update request and try again.") + var ErrConflictingFields = errors.New("only one field can be set") + var ErrExpiredCredentials = errors.New("datum credentials have expired") + var ErrInvalidCredentials = errors.New("datum credentials are missing or invalid") + var ErrInvalidEmail = response("Please enter a valid email address.") + var ErrInvalidField = errors.New("invalid or unparsable field") + var ErrInvalidUserClaims = errors.New("user claims invalid or unavailable") + var ErrLogBackIn = response("Logged out of your account - please log back in!") + var ErrMemberNotFound = response("Team member with the specified ID was not found.") + var ErrMissingField = errors.New("missing required field") + var ErrMissingID = errors.New("missing required id") + var ErrMissingOrganizationDomain = response("Organization domain is required.") + var ErrMissingOrganizationName = response("Organization name is required.") + var ErrModelIDMismatch = errors.New("resource id does not match id of endpoint") + var ErrOrganizationNotFound = response("Organization with the specified ID was not found.") + var ErrPasswordMismatch = errors.New("passwords do not match") + var ErrPasswordResetFailed = response(...) + var ErrPasswordTooWeak = errors.New(...) + var ErrRequestNewInvite = response("Invalid invitation link - please request a new one!") + var ErrRequestNewReset = response("Unable to reset your password - please request a new password reset.") + var ErrRestrictedField = errors.New("field restricted for request") + var ErrSendPasswordResetFailed = response(...) + var ErrSomethingWentWrong = response("Oops - something went wrong!") + var ErrTryLoginAgain = response("Unable to login with those details - please try again!") + var ErrTryOrganizationAgain = response("Unable to create or access that organization - please try again!") + var ErrTryProfileAgain = response("Unable to create or access user profile - please try again!") + var ErrTryRegisterAgain = response("Unable to register with those details - please try again!") + var ErrTryResendAgain = response("Unable to resend email - please try again!") + var ErrUnknownUserRole = errors.New("unknown user role") + var ErrUnparsable = errors.New("could not parse request") + var ErrUserExists = errors.New("user or organization already exists") + var ErrVerificationFailed = response("Email verification failed. Please contact support@datum.net for assistance.") + var ErrVerifyEmail = response("Please verify your email address and try again!") + func ConflictingFields(fields ...string) error + func ErrorStatus(err error) int + func HTTPErrorResponse(err interface{}) *echo.HTTPError + func InvalidField(field string) error + func MissingField(field string) error + func NotAllowed(c echo.Context) error + func NotFound(c echo.Context) error + func RestrictedField(field string) error + func Unauthorized(c echo.Context) error + func Unverified(c echo.Context) error + type FieldError struct + Err error + Field string + func (e *FieldError) Error() string + func (e *FieldError) Is(target error) bool + func (e *FieldError) Unwrap() error + type MissingRequiredFieldError struct + RequiredField string + func NewMissingRequiredFieldError(field string) *MissingRequiredFieldError + func (e *MissingRequiredFieldError) Error() string + type Reply struct + Error string + Success bool + Unverified bool + func ErrorResponse(err interface{}) Reply + type StatusError struct + Reply Reply + StatusCode int + func (e *StatusError) Error() string