Documentation ¶
Index ¶
Constants ¶
View Source
const (
InternalError = "Service Internal Error"
)
Variables ¶
This section is empty.
Functions ¶
func RegisterErrCode ¶
func RegisterErrCode(pairs ...CodePair)
RegisterErrCode append custom error code
func ServerErrorInterceptor ¶
func ServerErrorInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
ServerErrorInterceptor transfer a error to status error
func ServiceErr2GRPCErr ¶
ServiceErr2GRPCErr serviceErr covert to GRPCErr
Types ¶
Click to show internal directories.
Click to hide internal directories.