Documentation ¶
Index ¶
- Constants
- func HandleBizError(w http.ResponseWriter, data interface{})
- func HandleBizSuccess(w http.ResponseWriter, data interface{})
- func HandleErrorRpcRequest(w http.ResponseWriter)
- func HandleErrorRpcResponse(w http.ResponseWriter, code int32, msg string)
- func HandleErrorServerBusy(w http.ResponseWriter)
- func HandleMethodError(w http.ResponseWriter, data interface{})
- func HandleRequestError(w http.ResponseWriter, data interface{})
Constants ¶
View Source
const ( PingUrl = "/ping" // Ping RegisterUrl = "/register" // 注册 LoginUrl = "/login" // 登录 GetProfileUrl = "/user/profile" // 获取信息 UpdateProfileUrl = "/user/update" // 更新信息 ShowAvatarUrl = "/avatar/show/" // 展示头像 UploadAvatarUrl = "/avatar/upload" // 上传头像 LogoutUrl = "/logout" // 退出登录 )
Variables ¶
This section is empty.
Functions ¶
func HandleBizError ¶
func HandleBizError(w http.ResponseWriter, data interface{})
HandleBizError 处理业务错误结果
func HandleBizSuccess ¶
func HandleBizSuccess(w http.ResponseWriter, data interface{})
HandleBizSuccess 处理业务成功结果
func HandleErrorRpcRequest ¶
func HandleErrorRpcRequest(w http.ResponseWriter)
HandleErrorRpcRequest 处理RPC请求错误
func HandleErrorRpcResponse ¶
func HandleErrorRpcResponse(w http.ResponseWriter, code int32, msg string)
HandleErrorRpcResponse 处理RPC结果错误
func HandleErrorServerBusy ¶
func HandleErrorServerBusy(w http.ResponseWriter)
HandleErrorServerBusy 处理服务繁忙
func HandleMethodError ¶
func HandleMethodError(w http.ResponseWriter, data interface{})
HandleMethodError 处理方法错误
func HandleRequestError ¶
func HandleRequestError(w http.ResponseWriter, data interface{})
HandleRequestError 处理请求错误
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.