Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrSucceed = ErrCodeMsg{0, "ok"} ErrInvalidParam = ErrCodeMsg{100, "invalid parameter"} ErrServerInner = ErrCodeMsg{101, "server inner error"} ErrLoginFailed = ErrCodeMsg{102, "login failed, please retry"} ErrLoginNeeded = ErrCodeMsg{103, "login first"} ErrInvalidBranch = ErrCodeMsg{200, "branch unavailable"} ErrExistOnLocal = ErrCodeMsg{201, "branch exist in symbol store"} ErrUnknownBranch = ErrCodeMsg{202, "unknown branch"} )
Functions ¶
Types ¶
type BranchList ¶
BranchList return branch list of current symbol store
type ErrCodeMsg ¶
ErrCodeMsg is predefined error code and error message
type RestResponse ¶
type RestResponse struct { ErrCodeMsg Data interface{} `json:"data"` }
RestResponse is the basic struct used to wrap data back to client in json format.
func (*RestResponse) WriteJSON ¶
func (r *RestResponse) WriteJSON(w http.ResponseWriter) error
WriteJSON write json reponse to client
Click to show internal directories.
Click to hide internal directories.