Documentation ¶
Index ¶
- Constants
- type HandlerFunc
- type PermissionState
- type PermissionStatus
- type Response
- type ResponseMetadata
- type RuntimeError
- func NewAuthenticationFailedErr() RuntimeError
- func NewAuthenticationFailedMessageErr(message string) RuntimeError
- func NewForeignKeyConstraintError(column string) RuntimeError
- func NewHttpMethodNotAllowedError(message string) RuntimeError
- func NewInputMalformedError(message string) RuntimeError
- func NewMethodNotFoundError() RuntimeError
- func NewNotFoundError() RuntimeError
- func NewNotNullError(column string) RuntimeError
- func NewPermissionError() RuntimeError
- func NewUniquenessError(columns []string) RuntimeError
- func NewValidationError(message string) RuntimeError
Constants ¶
View Source
const ( // An unexpected internal error happened. ErrInternal = "ERR_INTERNAL" // The input arguments provided are not valid. ErrInvalidInput = "ERR_INVALID_INPUT" // The input provided is malformed and cannot be parsed. ErrInputMalformed = "ERR_INPUT_MALFORMED" // Authentication failed when trying to identify the identity. ErrAuthenticationFailed = "ERR_AUTHENTICATION_FAILED" // Permission denied when trying to access some resource. ErrPermissionDenied = "ERR_PERMISSION_DENIED" // Record cannot be found with the provided parameters. ErrRecordNotFound = "ERR_RECORD_NOT_FOUND" // The path or action does not exist. ErrMethodNotFound = "ERR_ACTION_NOT_FOUND" // The HTTP method is not allowed for this request. ErrHttpMethodNotAllowed = "ERR_HTTP_METHOD_NOT_ALLOWED" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HandlerFunc ¶ added in v0.372.0
type PermissionState ¶
type PermissionState struct {
Status PermissionStatus `json:"status"`
}
func NewPermissionState ¶
func NewPermissionState() *PermissionState
func (*PermissionState) Grant ¶
func (ps *PermissionState) Grant()
type PermissionStatus ¶
type PermissionStatus string
const ( PermissionGranted PermissionStatus = "granted" PermissionUnknown PermissionStatus = "unknown" )
type Response ¶
func InternalServerErrorResponse ¶ added in v0.373.0
func NewJsonResponse ¶
func NewJsonResponse(status int, body any, meta *ResponseMetadata) Response
func NewRedirectResponse ¶ added in v0.373.0
type ResponseMetadata ¶ added in v0.373.0
type RuntimeError ¶
func NewAuthenticationFailedErr ¶
func NewAuthenticationFailedErr() RuntimeError
func NewAuthenticationFailedMessageErr ¶ added in v0.368.0
func NewAuthenticationFailedMessageErr(message string) RuntimeError
func NewForeignKeyConstraintError ¶
func NewForeignKeyConstraintError(column string) RuntimeError
func NewHttpMethodNotAllowedError ¶ added in v0.368.0
func NewHttpMethodNotAllowedError(message string) RuntimeError
func NewInputMalformedError ¶ added in v0.368.0
func NewInputMalformedError(message string) RuntimeError
func NewMethodNotFoundError ¶ added in v0.368.0
func NewMethodNotFoundError() RuntimeError
func NewNotFoundError ¶
func NewNotFoundError() RuntimeError
func NewNotNullError ¶
func NewNotNullError(column string) RuntimeError
func NewPermissionError ¶
func NewPermissionError() RuntimeError
func NewUniquenessError ¶
func NewUniquenessError(columns []string) RuntimeError
func NewValidationError ¶ added in v0.368.0
func NewValidationError(message string) RuntimeError
func (RuntimeError) Error ¶
func (r RuntimeError) Error() string
func (RuntimeError) Extensions ¶
func (r RuntimeError) Extensions() map[string]any
Click to show internal directories.
Click to hide internal directories.