Added some godocs to a few websocket related structs (#13451)
* Added some godocs to a few websocket related structs * Incoporate review comments * Fix more review comments
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
80dd2915db
Коммит
f2a14ae976
@@ -199,11 +199,14 @@ func WebSocketEventFromJson(data io.Reader) *WebSocketEvent {
|
||||
return &ev
|
||||
}
|
||||
|
||||
// WebSocketResponse represents a response received through the WebSocket
|
||||
// for a request made to the server. This is available through the ResponseChannel
|
||||
// channel in WebSocketClient.
|
||||
type WebSocketResponse struct {
|
||||
Status string `json:"status"`
|
||||
SeqReply int64 `json:"seq_reply,omitempty"`
|
||||
Data map[string]interface{} `json:"data,omitempty"`
|
||||
Error *AppError `json:"error,omitempty"`
|
||||
Status string `json:"status"` // The status of the response. For example: OK, FAIL.
|
||||
SeqReply int64 `json:"seq_reply,omitempty"` // A counter which is incremented for every response sent.
|
||||
Data map[string]interface{} `json:"data,omitempty"` // The data contained in the response.
|
||||
Error *AppError `json:"error,omitempty"` // A field that is set if any error has occurred.
|
||||
}
|
||||
|
||||
func (m *WebSocketResponse) Add(key string, value interface{}) {
|
||||
|
||||
Ссылка в новой задаче
Block a user