package
0.9.1
Repository: https://github.com/coding-hui/iam.git
Documentation: pkg.go.dev

# Constants

ErrAssignRoleFailed - 400: User role assignment fails.
ErrBind - 400: Error occurred while binding the request body to the struct.
ErrCannotDeleteBuiltInOrg - 400: Built-in organizations cannot be deleted.
ErrCannotDisableBuiltInOrg - 400: Built-in organizations cannot be disabled.
ErrDatabase - 500: Database error.
ErrDecodingFailed - 500: Decoding failed due to an error with the data.
ErrDecodingJSON - 500: JSON data could not be decoded.
ErrDecodingYaml - 500: Yaml data could not be decoded.
ErrDeleteOneself - 400: Unable to delete yourself.
ErrEncodingFailed - 500: Encoding failed due to an error with the data.
ErrEncodingJSON - 500: JSON data could not be encoded.
ErrEncodingYaml - 500: Yaml data could not be encoded.
ErrEncrypt - 401: Error occurred while encrypting the user password.
ErrEntityInvalid - 500: Entity is invalid.
ErrExpired - 401: Token expired.
ErrIdentityProviderNotFound - 401: Identity provider not found.
ErrIndexInvalid - 500: Entity index is invalid.
ErrInvalidAuthHeader - 401: Invalid authorization header.
ErrInvalidJSON - 500: Data is not valid JSON.
ErrInvalidRefreshToken - 401: Refresh token format is incorrect, please check.
ErrInvalidRequest - 404: Invalid request.
ErrInvalidYaml - 500: Data is not valid Yaml.
ErrMaxDepartmentsReached - 400: The number of departments has reached its limit.
ErrMemberAlreadyInDepartment - 400: Member is already in department.
ErrMissingHeader - 401: The `Authorization` header was empty.
ErrMissingLoginValues - 401: Missing Username or Password.
ErrNilEntity - 500: Entity is nil.
ErrOrgAlreadyDisabled - 400: The organization is already disabled.
ErrOrgAlreadyEnabled - 400: The organization is already enabled.
ErrOrgAlreadyExist - 400: Organization already exist.
ErrOrgHasDisabled - 401: The organization has been disabled.
ErrOrgNotFound - 404: Organization not found.
ErrPageNotFound - 404: Page not found.
ErrParam - 400: Invalid request params.
ErrPasswordIncorrect - 401: Invalid Username or Password.
ErrPermissionDenied - 403: Permission denied.
ErrPolicyAlreadyExist - 400: Policy already exist.
ErrPolicyNameIsEmpty - 400: Policy name is empty.
ErrPolicyNotFound - 404: Policy not found.
ErrPrimaryEmpty - 500: Primary key is empty.
ErrReachMaxCount - 400: Secret reach the max count.
ErrRecordExist - 500: Data record is exist.
ErrRecordNotExist - 500: Data record is not exist.
ErrResourceAlreadyExist - 400: Resource already exist.
ErrResourceHasAssignedPolicy - 400: The resource has been assigned permission policies.
ErrResourceInstanceIdIsEmpty - 400: Resource instanceId is empty.
ErrResourceNameIsEmpty - 400: Resource name is empty.
ErrResourceNotFound - 404: Resource not found.
ErrRevokeRoleFailed - 400: User role revoke fails.
ErrRoleAlreadyExist - 400: Role already exist.
ErrRoleHasAssignedUser - 400: The role has been assigned to a user.
ErrRoleNameIsEmpty - 400: Role name is empty.
ErrRoleNotFound - 404: Role not found.
ErrSecretNotFound - 404: Secret not found.
ErrSignatureInvalid - 401: Signature is invalid.
ErrSubDepartmentsExist - 400: Sub departments exist and cannot be deleted.
ErrSuccess - 200: OK.
ErrTableNameEmpty - 500: Entity table name is empty.
ErrTokenInvalid - 401: Token invalid.
ErrTokenIssuedAt - 401: Token used before issued.
ErrTokenMalformed - 401: Token is malformed.
ErrTokenNotValidYet - 401: Token is not valid yet.
ErrUnauthorized - 403: Unauthorized.
ErrUnknown - 500: Internal server error.
ErrUnsupportedAssignTarget - 400: The assignment target is not supported.
ErrUnsupportedRevokeTarget - 400: The revoke target is not supported.
ErrUserAlreadyDisabled - 400: The user is already disabled.
ErrUserAlreadyEnabled - 400: The user is already enabled.
ErrUserAlreadyExist - 400: User already exist.
ErrUserHasDisabled - 401: The account has been disabled.
ErrUserNameIsEmpty - 400: Username is empty.
ErrUserNotFound - 404: User not found.
ErrValidation - 400: Validation failed.

# Structs

ErrCode implements `github.com/coding-hui/common/errors`.Coder interface.