Documentation
¶
Index ¶
- func HttpErrorHandle(err error, response *http.Response) error
- type ErrorCode
- type ErrorMessage
- type ErrorType
- type PermitConnectionError
- type PermitContextError
- type PermitDuplicateEntityError
- type PermitError
- type PermitForbiddenError
- type PermitNotFoundError
- type PermitPaginationError
- type PermitTeapotError
- type PermitUnauthorizedError
- type PermitUnexpectedError
- type PermitUnprocessableEntityError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ErrorCode ¶
type ErrorCode string
const ( UnexpectedError ErrorCode = "UnexpectedError" NotFound ErrorCode = "NotFound" Conflict ErrorCode = "Conflict" PaginationError ErrorCode = "PaginationError" TeapotError ErrorCode = "TeapotError" ContextError ErrorCode = "ContextError" DuplicateEntity ErrorCode = "DuplicateEntity" ConnectionError ErrorCode = "ConnectionError" UnprocessableEntityError ErrorCode = "UnprocessableEntityError" EmptyDecisionLogs ErrorCode = "EmptyDecisionLogs" MissingRequestAttribute ErrorCode = "MissingRequestAttribute" ForbiddenAccess ErrorCode = "ForbiddenAccess" InvalidPermissionFormat ErrorCode = "InvalidPermissionFormat" MissingPermissions ErrorCode = "MissingPermissions" UnsupportedAttributeType ErrorCode = "UnsupportedAttributeType" MissingResourceAttribute ErrorCode = "MissingResourceAttribute" InvalidPolicyRepoStatus ErrorCode = "InvalidPolicyRepoStatus" MismatchAttributesTypes ErrorCode = "MismatchAttributesTypes" )
type ErrorMessage ¶
type ErrorMessage string
const ( EmptyErrorMessage ErrorMessage = "" PaginationMessage ErrorMessage = "The pagination page and size per page are invalid" ConflictMessage ErrorMessage = "The resource already exists" NotFoundMessage ErrorMessage = "The resource was not found" ForbiddenMessage ErrorMessage = "The access for this object is forbidden using the provided API key" ContextMessage ErrorMessage = "The context is missing or invalid" ContextUnexpectedMessage ErrorMessage = "The context is missing or invalid" DuplicateEntityMessage ErrorMessage = "The entity already exists" ConnectionErrorMessage ErrorMessage = "The connection to the api failed" UnprocessableEntityMessage ErrorMessage = "The entity send with the request is not valid" )
type PermitConnectionError ¶
type PermitConnectionError struct {
PermitError
}
type PermitContextError ¶
type PermitContextError struct {
PermitError
}
func NewPermitContextError ¶
func NewPermitContextError(additionalMessage ErrorMessage) *PermitContextError
type PermitDuplicateEntityError ¶
type PermitDuplicateEntityError struct {
PermitError
}
func NewPermitConnectionError ¶
func NewPermitConnectionError(err error) *PermitDuplicateEntityError
func NewPermitDuplicateEntityError ¶
func NewPermitDuplicateEntityError(err error) *PermitDuplicateEntityError
type PermitError ¶
type PermitError struct {
// contains filtered or unexported fields
}
func NewPermitError ¶
func NewPermitError(errorMessage ErrorMessage, errorCode ErrorCode, errorType ErrorType) PermitError
type PermitForbiddenError ¶
type PermitForbiddenError struct {
PermitError
}
func NewPermitForbiddenError ¶
func NewPermitForbiddenError() *PermitForbiddenError
type PermitNotFoundError ¶
type PermitNotFoundError struct {
PermitError
}
func NewPermitConflictError ¶
func NewPermitConflictError() *PermitNotFoundError
func NewPermitNotFoundError ¶
func NewPermitNotFoundError(err error) *PermitNotFoundError
type PermitPaginationError ¶
type PermitPaginationError struct {
PermitError
}
func NewPermitPaginationError ¶
func NewPermitPaginationError() *PermitPaginationError
type PermitTeapotError ¶
type PermitTeapotError struct {
PermitError
}
type PermitUnauthorizedError ¶
type PermitUnauthorizedError struct {
}
func NewPermitUnauthorizedError ¶
func NewPermitUnauthorizedError() *PermitUnauthorizedError
type PermitUnexpectedError ¶
type PermitUnexpectedError struct {
PermitError
}
func NewPermitUnexpectedError ¶
func NewPermitUnexpectedError(err error) *PermitUnexpectedError
type PermitUnprocessableEntityError ¶
type PermitUnprocessableEntityError struct {
PermitError
}
func NewPermitUnprocessableEntityError ¶
func NewPermitUnprocessableEntityError(err error) *PermitUnprocessableEntityError
Click to show internal directories.
Click to hide internal directories.