Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( OK = add(0, "OK") NoLogin = add(101, "NOT_LOGIN") RequestErr = add(400, "INVALID_ARGUMENT") AccessDenied = add(403, "PERMISSION_DENIED") NotFound = add(404, "NOT_FOUND") MethodNotAllowed = add(405, "METHOD_NOT_ALLOWED") Canceled = add(498, "CANCELED") ServerErr = add(500, "INTERNAL_ERROR") Deadline = add(504, "DEADLINE_EXCEEDED") LimitExceed = add(509, "RESOURCE_EXHAUSTED") )
Functions ¶
func ErrHandler ¶
Types ¶
type XCode ¶
func CodeFromError ¶
func GrpcStatusToXCode ¶
GrpcStatusToXCode 将 gRPC的错误状态转换为自定义的错误代码 (XCode)
Click to show internal directories.
Click to hide internal directories.