role_errors

package
v1.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2025 License: MIT Imports: 5 Imported by: 0

README

📦 Package role_errors

Source Path: ./shared/errors/role_errors

🏷️ Variables

Var:

ErrApiBindCreateRole returns an API error response for failed Role creation request binding.

var ErrApiBindCreateRole = func(c echo.Context) error {
	return response.NewApiErrorResponse(c, "error", "bind failed: invalid create Role request", http.StatusBadRequest)
}

Var:

ErrApiBindUpdateRole returns an API error response for failed Role update request binding.

var ErrApiBindUpdateRole = func(c echo.Context) error {
	return response.NewApiErrorResponse(c, "error", "bind failed: invalid update Role request", http.StatusBadRequest)
}

Var:

ErrApiFailedCreateRole returns an API error response when Role creation fails.

var ErrApiFailedCreateRole = func(c echo.Context) error {
	return response.NewApiErrorResponse(c, "error", "failed to create Role", http.StatusInternalServerError)
}

Var:

ErrApiFailedDeleteAll returns an API error response when permanently deleting all Roles fails.

var ErrApiFailedDeleteAll = func(c echo.Context) error {
	return response.NewApiErrorResponse(c, "error", "failed to delete all Roles permanently", http.StatusInternalServerError)
}

Var:

ErrApiFailedDeletePermanent returns an API error response when permanently deleting a Role fails.

var ErrApiFailedDeletePermanent = func(c echo.Context) error {
	return response.NewApiErrorResponse(c, "error", "failed to delete Role permanently", http.StatusInternalServerError)
}

Var:

ErrApiFailedFindActive returns an API error response when fetching active Roles fails.

var ErrApiFailedFindActive = func(c echo.Context) error {
	return response.NewApiErrorResponse(c, "error", "failed to fetch active Roles", http.StatusInternalServerError)
}

Var:

ErrApiFailedFindAll returns an API error response when fetching all Roles fails.

var ErrApiFailedFindAll = func(c echo.Context) error {
	return response.NewApiErrorResponse(c, "error", "failed to fetch Roles", http.StatusInternalServerError)
}

Var:

ErrApiFailedFindTrashed returns an API error response when fetching trashed Roles fails.

var ErrApiFailedFindTrashed = func(c echo.Context) error {
	return response.NewApiErrorResponse(c, "error", "failed to fetch trashed Roles", http.StatusInternalServerError)
}

Var:

ErrApiFailedRestoreAll returns an API error response when restoring all trashed Roles fails.

var ErrApiFailedRestoreAll = func(c echo.Context) error {
	return response.NewApiErrorResponse(c, "error", "failed to restore all Roles", http.StatusInternalServerError)
}

Var:

ErrApiFailedRestoreRole returns an API error response when restoring a trashed Role fails.

var ErrApiFailedRestoreRole = func(c echo.Context) error {
	return response.NewApiErrorResponse(c, "error", "failed to restore Role", http.StatusInternalServerError)
}

Var:

ErrApiFailedTrashedRole returns an API error response when soft-deleting (trashing) a Role fails.

var ErrApiFailedTrashedRole = func(c echo.Context) error {
	return response.NewApiErrorResponse(c, "error", "failed to move Role to trash", http.StatusInternalServerError)
}

Var:

ErrApiFailedUpdateRole returns an API error response when Role update fails.

var ErrApiFailedUpdateRole = func(c echo.Context) error {
	return response.NewApiErrorResponse(c, "error", "failed to update Role", http.StatusInternalServerError)
}

Var:

ErrApiRoleInvalidId returns an API error response for an invalid Role ID.

var ErrApiRoleInvalidId = func(c echo.Context) error {
	return response.NewApiErrorResponse(c, "error", "invalid Role id", http.StatusNotFound)
}

Var:

ErrApiRoleNotFound returns an API error response when the requested Role is not found.

var ErrApiRoleNotFound = func(c echo.Context) error {
	return response.NewApiErrorResponse(c, "error", "Role not found", http.StatusNotFound)
}

Var:

ErrApiValidateCreateRole returns an API error response for invalid Role creation request validation.

var ErrApiValidateCreateRole = func(c echo.Context) error {
	return response.NewApiErrorResponse(c, "error", "validation failed: invalid create Role request", http.StatusBadRequest)
}

Var:

ErrApiValidateUpdateRole returns an API error response for invalid Role update request validation.

var ErrApiValidateUpdateRole = func(c echo.Context) error {
	return response.NewApiErrorResponse(c, "error", "validation failed: invalid update Role request", http.StatusBadRequest)
}

Var:

ErrCreateRole is returned when creating a new Role fails.

var ErrCreateRole = errors.New("failed to create Role")

Var:

ErrDeleteAllRoles is returned when permanently deleting all Roles fails.

var ErrDeleteAllRoles = errors.New("failed to permanently delete all Roles")

Var:

ErrDeleteRolePermanent is returned when permanently deleting a Role fails.

var ErrDeleteRolePermanent = errors.New("failed to permanently delete Role")

Var:

ErrFailedCreateRole is returned when there is a failure in creating a role.

var ErrFailedCreateRole = response.NewErrorResponse("Failed to create Role", http.StatusInternalServerError)

Var:

ErrFailedDeleteAll is returned when there is a failure in permanently deleting all roles.

var ErrFailedDeleteAll = response.NewErrorResponse("Failed to delete all Roles permanently", http.StatusInternalServerError)

Var:

ErrFailedDeletePermanent is returned when there is a failure in permanently deleting a role.

var ErrFailedDeletePermanent = response.NewErrorResponse("Failed to delete Role permanently", http.StatusInternalServerError)

Var:

ErrFailedFindActive is returned when there is a failure in fetching active roles.

var ErrFailedFindActive = response.NewErrorResponse("Failed to fetch active Roles", http.StatusInternalServerError)

Var:

ErrFailedFindAll is returned when there is a failure in fetching all roles.

var ErrFailedFindAll = response.NewErrorResponse("Failed to fetch Roles", http.StatusInternalServerError)

Var:

ErrFailedFindTrashed is returned when there is a failure in fetching trashed roles.

var ErrFailedFindTrashed = response.NewErrorResponse("Failed to fetch trashed Roles", http.StatusInternalServerError)

Var:

ErrFailedRestoreAll is returned when there is a failure in restoring all trashed roles.

var ErrFailedRestoreAll = response.NewErrorResponse("Failed to restore all Roles", http.StatusInternalServerError)

Var:

ErrFailedRestoreRole is returned when there is a failure in restoring a trashed role.

var ErrFailedRestoreRole = response.NewErrorResponse("Failed to restore Role", http.StatusInternalServerError)

Var:

ErrFailedTrashedRole is returned when there is a failure in moving a role to trash.

var ErrFailedTrashedRole = response.NewErrorResponse("Failed to move Role to trash", http.StatusInternalServerError)

Var:

ErrFailedUpdateRole is returned when there is a failure in updating a role.

var ErrFailedUpdateRole = response.NewErrorResponse("Failed to update Role", http.StatusInternalServerError)

Var:

ErrFindActiveRoles is returned when retrieving all active Roles fails.

var ErrFindActiveRoles = errors.New("failed to find active Roles")

Var:

ErrFindAllRoles is returned when retrieving all Roles from the database fails.

var ErrFindAllRoles = errors.New("failed to find all Roles")

Var:

ErrFindTrashedRoles is returned when retrieving trashed (soft-deleted) Roles fails.

var ErrFindTrashedRoles = errors.New("failed to find trashed Roles")

Var:

ErrInvalidRoleId returns an API error response for an invalid Role ID format.

var ErrInvalidRoleId = func(c echo.Context) error {
	return response.NewApiErrorResponse(c, "error", "invalid Role id", http.StatusBadRequest)
}

Var:

ErrRestoreAllRoles is returned when restoring all trashed Roles fails.

var ErrRestoreAllRoles = errors.New("failed to restore all Roles")

Var:

ErrRestoreRole is returned when restoring a trashed Role fails.

var ErrRestoreRole = errors.New("failed to restore Role from trash")

Var:

ErrRoleConflict indicates a conflict where a Role already exists.

var ErrRoleConflict = errors.New("failed Role already exists")

Var:

ErrRoleNotFound indicates that the requested Role was not found in the database.

var ErrRoleNotFound = errors.New("role not found")

Var:

ErrRoleNotFoundRes is returned when the requested role is not found.

var ErrRoleNotFoundRes = response.NewErrorResponse("Role not found", http.StatusNotFound)

Var:

ErrTrashedRole is returned when moving a Role to trash (soft-delete) fails.

var ErrTrashedRole = errors.New("failed to move Role to trash")

Var:

ErrUpdateRole is returned when updating an existing Role fails.

var ErrUpdateRole = errors.New("failed to update Role")

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrGrpcRoleNotFound  = response.NewGrpcError("error", "Role not found", int(codes.NotFound))
	ErrGrpcRoleInvalidId = response.NewGrpcError("error", "Invalid Role ID", int(codes.NotFound))

	ErrGrpcFailedFindAll     = response.NewGrpcError("error", "Failed to fetch Roles", int(codes.Internal))
	ErrGrpcFailedFindActive  = response.NewGrpcError("error", "Failed to fetch active Roles", int(codes.Internal))
	ErrGrpcFailedFindTrashed = response.NewGrpcError("error", "Failed to fetch trashed Roles", int(codes.Internal))

	ErrGrpcFailedCreateRole   = response.NewGrpcError("error", "Failed to create Role", int(codes.Internal))
	ErrGrpcFailedUpdateRole   = response.NewGrpcError("error", "Failed to update Role", int(codes.Internal))
	ErrGrpcValidateCreateRole = response.NewGrpcError("error", "validation failed: invalid create Role request", int(codes.InvalidArgument))
	ErrGrpcValidateUpdateRole = response.NewGrpcError("error", "validation failed: invalid update Role request", int(codes.InvalidArgument))

	ErrGrpcFailedTrashedRole     = response.NewGrpcError("error", "Failed to move Role to trash", int(codes.Internal))
	ErrGrpcFailedRestoreRole     = response.NewGrpcError("error", "Failed to restore Role", int(codes.Internal))
	ErrGrpcFailedDeletePermanent = response.NewGrpcError("error", "Failed to delete Role permanently", int(codes.Internal))

	ErrGrpcFailedRestoreAll = response.NewGrpcError("error", "Failed to restore all Roles", int(codes.Internal))
	ErrGrpcFailedDeleteAll  = response.NewGrpcError("error", "Failed to delete all Roles permanently", int(codes.Internal))
)
View Source
var ErrApiBindCreateRole = func(c echo.Context) error {
	return response.NewApiErrorResponse(c, "error", "bind failed: invalid create Role request", http.StatusBadRequest)
}

ErrApiBindCreateRole returns an API error response for failed Role creation request binding.

View Source
var ErrApiBindUpdateRole = func(c echo.Context) error {
	return response.NewApiErrorResponse(c, "error", "bind failed: invalid update Role request", http.StatusBadRequest)
}

ErrApiBindUpdateRole returns an API error response for failed Role update request binding.

View Source
var ErrApiFailedCreateRole = func(c echo.Context) error {
	return response.NewApiErrorResponse(c, "error", "failed to create Role", http.StatusInternalServerError)
}

ErrApiFailedCreateRole returns an API error response when Role creation fails.

View Source
var ErrApiFailedDeleteAll = func(c echo.Context) error {
	return response.NewApiErrorResponse(c, "error", "failed to delete all Roles permanently", http.StatusInternalServerError)
}

ErrApiFailedDeleteAll returns an API error response when permanently deleting all Roles fails.

View Source
var ErrApiFailedDeletePermanent = func(c echo.Context) error {
	return response.NewApiErrorResponse(c, "error", "failed to delete Role permanently", http.StatusInternalServerError)
}

ErrApiFailedDeletePermanent returns an API error response when permanently deleting a Role fails.

View Source
var ErrApiFailedFindActive = func(c echo.Context) error {
	return response.NewApiErrorResponse(c, "error", "failed to fetch active Roles", http.StatusInternalServerError)
}

ErrApiFailedFindActive returns an API error response when fetching active Roles fails.

View Source
var ErrApiFailedFindAll = func(c echo.Context) error {
	return response.NewApiErrorResponse(c, "error", "failed to fetch Roles", http.StatusInternalServerError)
}

ErrApiFailedFindAll returns an API error response when fetching all Roles fails.

View Source
var ErrApiFailedFindTrashed = func(c echo.Context) error {
	return response.NewApiErrorResponse(c, "error", "failed to fetch trashed Roles", http.StatusInternalServerError)
}

ErrApiFailedFindTrashed returns an API error response when fetching trashed Roles fails.

View Source
var ErrApiFailedRestoreAll = func(c echo.Context) error {
	return response.NewApiErrorResponse(c, "error", "failed to restore all Roles", http.StatusInternalServerError)
}

ErrApiFailedRestoreAll returns an API error response when restoring all trashed Roles fails.

View Source
var ErrApiFailedRestoreRole = func(c echo.Context) error {
	return response.NewApiErrorResponse(c, "error", "failed to restore Role", http.StatusInternalServerError)
}

ErrApiFailedRestoreRole returns an API error response when restoring a trashed Role fails.

View Source
var ErrApiFailedTrashedRole = func(c echo.Context) error {
	return response.NewApiErrorResponse(c, "error", "failed to move Role to trash", http.StatusInternalServerError)
}

ErrApiFailedTrashedRole returns an API error response when soft-deleting (trashing) a Role fails.

View Source
var ErrApiFailedUpdateRole = func(c echo.Context) error {
	return response.NewApiErrorResponse(c, "error", "failed to update Role", http.StatusInternalServerError)
}

ErrApiFailedUpdateRole returns an API error response when Role update fails.

View Source
var ErrApiRoleInvalidId = func(c echo.Context) error {
	return response.NewApiErrorResponse(c, "error", "invalid Role id", http.StatusNotFound)
}

ErrApiRoleInvalidId returns an API error response for an invalid Role ID.

View Source
var ErrApiRoleNotFound = func(c echo.Context) error {
	return response.NewApiErrorResponse(c, "error", "Role not found", http.StatusNotFound)
}

ErrApiRoleNotFound returns an API error response when the requested Role is not found.

View Source
var ErrApiValidateCreateRole = func(c echo.Context) error {
	return response.NewApiErrorResponse(c, "error", "validation failed: invalid create Role request", http.StatusBadRequest)
}

ErrApiValidateCreateRole returns an API error response for invalid Role creation request validation.

View Source
var ErrApiValidateUpdateRole = func(c echo.Context) error {
	return response.NewApiErrorResponse(c, "error", "validation failed: invalid update Role request", http.StatusBadRequest)
}

ErrApiValidateUpdateRole returns an API error response for invalid Role update request validation.

View Source
var ErrCreateRole = errors.New("failed to create Role")

ErrCreateRole is returned when creating a new Role fails.

View Source
var ErrDeleteAllRoles = errors.New("failed to permanently delete all Roles")

ErrDeleteAllRoles is returned when permanently deleting all Roles fails.

View Source
var ErrDeleteRolePermanent = errors.New("failed to permanently delete Role")

ErrDeleteRolePermanent is returned when permanently deleting a Role fails.

View Source
var ErrFailedCreateRole = response.NewErrorResponse("Failed to create Role", http.StatusInternalServerError)

ErrFailedCreateRole is returned when there is a failure in creating a role.

View Source
var ErrFailedDeleteAll = response.NewErrorResponse("Failed to delete all Roles permanently", http.StatusInternalServerError)

ErrFailedDeleteAll is returned when there is a failure in permanently deleting all roles.

View Source
var ErrFailedDeletePermanent = response.NewErrorResponse("Failed to delete Role permanently", http.StatusInternalServerError)

ErrFailedDeletePermanent is returned when there is a failure in permanently deleting a role.

View Source
var ErrFailedFindActive = response.NewErrorResponse("Failed to fetch active Roles", http.StatusInternalServerError)

ErrFailedFindActive is returned when there is a failure in fetching active roles.

View Source
var ErrFailedFindAll = response.NewErrorResponse("Failed to fetch Roles", http.StatusInternalServerError)

ErrFailedFindAll is returned when there is a failure in fetching all roles.

View Source
var ErrFailedFindTrashed = response.NewErrorResponse("Failed to fetch trashed Roles", http.StatusInternalServerError)

ErrFailedFindTrashed is returned when there is a failure in fetching trashed roles.

View Source
var ErrFailedRestoreAll = response.NewErrorResponse("Failed to restore all Roles", http.StatusInternalServerError)

ErrFailedRestoreAll is returned when there is a failure in restoring all trashed roles.

View Source
var ErrFailedRestoreRole = response.NewErrorResponse("Failed to restore Role", http.StatusInternalServerError)

ErrFailedRestoreRole is returned when there is a failure in restoring a trashed role.

View Source
var ErrFailedTrashedRole = response.NewErrorResponse("Failed to move Role to trash", http.StatusInternalServerError)

ErrFailedTrashedRole is returned when there is a failure in moving a role to trash.

View Source
var ErrFailedUpdateRole = response.NewErrorResponse("Failed to update Role", http.StatusInternalServerError)

ErrFailedUpdateRole is returned when there is a failure in updating a role.

View Source
var ErrFindActiveRoles = errors.New("failed to find active Roles")

ErrFindActiveRoles is returned when retrieving all active Roles fails.

View Source
var ErrFindAllRoles = errors.New("failed to find all Roles")

ErrFindAllRoles is returned when retrieving all Roles from the database fails.

View Source
var ErrFindTrashedRoles = errors.New("failed to find trashed Roles")

ErrFindTrashedRoles is returned when retrieving trashed (soft-deleted) Roles fails.

View Source
var ErrInvalidRoleId = func(c echo.Context) error {
	return response.NewApiErrorResponse(c, "error", "invalid Role id", http.StatusBadRequest)
}

ErrInvalidRoleId returns an API error response for an invalid Role ID format.

View Source
var ErrRestoreAllRoles = errors.New("failed to restore all Roles")

ErrRestoreAllRoles is returned when restoring all trashed Roles fails.

View Source
var ErrRestoreRole = errors.New("failed to restore Role from trash")

ErrRestoreRole is returned when restoring a trashed Role fails.

View Source
var ErrRoleConflict = errors.New("failed Role already exists")

ErrRoleConflict indicates a conflict where a Role already exists.

View Source
var ErrRoleNotFound = errors.New("role not found")

ErrRoleNotFound indicates that the requested Role was not found in the database.

View Source
var ErrRoleNotFoundRes = response.NewErrorResponse("Role not found", http.StatusNotFound)

ErrRoleNotFoundRes is returned when the requested role is not found.

View Source
var ErrTrashedRole = errors.New("failed to move Role to trash")

ErrTrashedRole is returned when moving a Role to trash (soft-delete) fails.

View Source
var ErrUpdateRole = errors.New("failed to update Role")

ErrUpdateRole is returned when updating an existing Role fails.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL