Categorygithub.com/zhwei820/errors
modulepackage
1.0.2
Repository: https://github.com/zhwei820/errors.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

Abortedf returns an error which satisfaction IsAborted().
AlreadyExistsf returns an error which satisfies.
Annotate is used to add extra context to an existing error.
Annotatef is used to add extra context to an existing error.
Cause returns the cause of the given error.
No description provided by the author
Errorf creates a new annotated error and records the location that the error is created.
ErrorStack returns a string representation of the annotated error.
FailedPreconditionf returns an error which satisfaction IsFailedPrecondition().
Forbiddenf returns an error which satistifes IsForbidden().
GRPCErrToError grpc error to code error.
Response response json, if the above api doesn't satisfy your demands, should be used.
ResponseErr response error, if err is not code error type, default return http.StatusInternalServerError.
ResponseOk response ok.
No description provided by the author
Internalf returns an error which internal server error.
Is .
IsAborted is aborted error.
IsAlreadyExists is already exists.
IsAnyBizCodeErr is any biz code error.
IsBizCodeError is biz code error.
IsDuplicateError is duplicate error.
IsFailedPrecondition is failed precondition errors.
IsForbidden is forbidden error.
IsInternal is internal error.
IsNotFound is not Fund.
IsNotImplemented is not implemented.
IsNotValid is not valid error.
IsUnauthorized is unauthorized.
IsUnavailable is unavailable error.
NewAborted returns an error which wraps err that satisfies.
NewAlreadyExists returns an error which wraps err and satisfies.
NewBizCodeError new biz code error with biz code and translated message Suggest using NewCodeError for more detailed code.
NewBizCodeErrorf new biz code error with biz code and custom message Suggest using NewCodeErrorf for more detailed code.
NewCodeError new code error.
NewCodeErrorf new code errorf.
NewFailedPrecondition returns an error which wraps err that satisfies.
NewForbidden returns an error which wraps err that satisfies.
NewInternal == NewInternal return an error which internal server error.
NewNotFound returns an error which wraps err that satisfies.
NewNotImplemented returns an error which wraps err and satisfies.
NewNotValid returns an error which wraps err and satisfies IsNotValid().
NewUnauthorized returns an error which wraps err and satisfies.
NewUnavailable returns an error which server unavailable.
NotFoundf returns an error which satisfies IsNotFound().
NotImplementedf returns an error which satisfies IsNotImplemented().
NotValidf returns an error which satisfies IsNotValid().
No description provided by the author
Response response json, if the above api doesn't satisfy your demands, should be used.
ResponseErr response error, if err is not code error type, default return http.StatusInternalServerError.
ResponseOk response ok.
No description provided by the author
ToGRPCReturnError generate grpc api return error.
ToGRPCStatus to grpc status error.
No description provided by the author
No description provided by the author
Unauthorizedf returns an error which satisfies IsUnauthorized().
Unavailablef returns an error which server unavailable.
V2MysqlErr gorm version 2 mysql error.
Wrap changes the Cause of the error.
Wrapf changes the Cause of the error, and adds an annotation.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
403.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
401.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author

# Structs

No description provided by the author
CodeError represents an error on timeout.
Err holds a description of an error along with information about where the error was created.
No description provided by the author
No description provided by the author
TransInfo used to pack translate messages.

# Type aliases

No description provided by the author
No description provided by the author