derr

package
v0.20.4 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: Apache-2.0 Imports: 3 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnknown                       = cerr.NewAsertoError("E20000", codes.Internal, http.StatusInternalServerError, "an unknown error has occurred")
	ErrInvalidJSON                   = cerr.NewAsertoError("E20001", codes.Internal, http.StatusInternalServerError, "invalid json")
	ErrNotFound                      = cerr.NewAsertoError("E20002", codes.NotFound, http.StatusNotFound, "not found")
	ErrAlreadyExists                 = cerr.NewAsertoError("E20003", codes.AlreadyExists, http.StatusConflict, "already exists")
	ErrInvalidObjectType             = cerr.NewAsertoError("E20004", codes.Internal, http.StatusInternalServerError, "invalid object type")
	ErrInUse                         = cerr.NewAsertoError("E20005", codes.FailedPrecondition, http.StatusPreconditionFailed, "in use")
	ErrDeprecated                    = cerr.NewAsertoError("E20006", codes.OK, http.StatusOK, "deprecated")
	ErrInvalidRelationType           = cerr.NewAsertoError("E20007", codes.Internal, http.StatusInternalServerError, "invalid relation type")
	ErrInvalidPermission             = cerr.NewAsertoError("E20008", codes.Internal, http.StatusInternalServerError, "invalid permission")
	ErrInvalidObject                 = cerr.NewAsertoError("E20009", codes.Internal, http.StatusInternalServerError, "invalid object")
	ErrInvalidRelation               = cerr.NewAsertoError("E20010", codes.Internal, http.StatusInternalServerError, "invalid relation")
	ErrInvalidRelationTypePermission = cerr.NewAsertoError("E20011", codes.Internal, http.StatusInternalServerError, "invalid relation type permission")
	ErrDirectoryStoreTenantNotFound  = cerr.NewAsertoError("E20012", codes.NotFound, http.StatusNotFound, "tenant store not found")
	ErrHashMismatch                  = cerr.NewAsertoError("E20013", codes.InvalidArgument, http.StatusBadRequest, "hash value mismatch")
	ErrInvalidArgument               = cerr.NewAsertoError("E20015", codes.InvalidArgument, http.StatusBadRequest, "invalid argument")
	ErrInvalidID                     = cerr.NewAsertoError("E20016", codes.InvalidArgument, http.StatusBadRequest, "invalid ID")
	ErrAuthenticationFailed          = cerr.NewAsertoError("E20017", codes.FailedPrecondition, http.StatusUnauthorized, "authentication failed")
	ErrAuthorizationFailed           = cerr.NewAsertoError("E20018", codes.PermissionDenied, http.StatusUnauthorized, "authorization failed")
	ErrInvalidDecision               = cerr.NewAsertoError("E20019", codes.InvalidArgument, http.StatusBadRequest, "invalid decision")
	ErrInvalidTenantID               = cerr.NewAsertoError("E20020", codes.InvalidArgument, http.StatusBadRequest, "invalid tenant id")
	ErrInvalidTenantName             = cerr.NewAsertoError("E20021", codes.InvalidArgument, http.StatusBadRequest, "invalid tenant name")
	ErrDirectoryObjectNotFound       = cerr.NewAsertoError("E20022", codes.NotFound, http.StatusNotFound, "directory object not found")
	ErrNoTenantID                    = cerr.NewAsertoError("E20023", codes.InvalidArgument, http.StatusBadRequest, "no tenant id specified")
	ErrMaxDepthExceeded              = cerr.NewAsertoError("E20024", codes.Aborted, http.StatusInternalServerError, "graph depth exceeded")

	ErrObjectNotFound                = ErrNotFound.Str("type", "object")
	ErrObjectTypeNotFound            = ErrNotFound.Str("type", "object type")
	ErrObjectTypeAlreadyExists       = ErrAlreadyExists.Str("type", "object type")
	ErrObjectTypeInUse               = ErrInUse.Str("type", "object type")
	ErrObjectInUse                   = ErrInUse.Str("type", "object").Msg("object is in use by one or more relations")
	ErrGroupNotFound                 = ErrNotFound.Str("type", "group")
	ErrGroupAlreadyExists            = ErrAlreadyExists.Str("type", "group")
	ErrSubjectNotFound               = ErrNotFound.Str("type", "subject")
	ErrResourceNotFound              = ErrNotFound.Str("type", "resource")
	ErrRelationTypeInUse             = ErrInUse.Str("type", "relation type")
	ErrRelationNotFound              = ErrNotFound.Str("type", "relation")
	ErrRelationTypeNotFound          = ErrNotFound.Str("type", "relation type")
	ErrRelationTypeAlreadyExists     = ErrAlreadyExists.Str("type", "relation type")
	ErrPermissionAlreadyExists       = ErrAlreadyExists.Str("type", "permission")
	ErrPermissionNotFound            = ErrNotFound.Str("type", "permission")
	ErrPermissionInUse               = ErrInUse.Str("type", "permission").Msg("permission in use by one or more relation types")
	ErrInvalidCursor                 = ErrInvalidArgument.Msg("pagination cursor")
	ErrNotASubject                   = ErrInvalidArgument.Msg("not a subject")
	ErrInvalidObjectTypeIdentifier   = ErrInvalidArgument.Msg("object_type_identifier")
	ErrInvalidPermissionIdentifier   = ErrInvalidArgument.Msg("permission_identifier")
	ErrInvalidRelationTypeIdentifier = ErrInvalidArgument.Msg("relation_type_identifier")
	ErrInvalidObjectIdentifier       = ErrInvalidArgument.Msg("object_identifier")
	ErrInvalidRelationIdentifier     = ErrInvalidArgument.Msg("relation_identifier")
	ErrInvalidObjectTypeID           = ErrInvalidArgument.Msg("object_type_id")
	ErrInvalidRelationTypeID         = ErrInvalidArgument.Msg("relation_type_id")
	ErrInvalidPermissionID           = ErrInvalidArgument.Msg("permission_id")
	ErrInvalidObjectID               = ErrInvalidArgument.Msg("object_id")
)

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