overflow_service_websocket/server/protocol.go

23 lines
557 B
Go
Raw Normal View History

2017-07-13 12:01:28 +00:00
package server
import (
"encoding/json"
"git.loafle.net/overflow/overflow_service_websocket/protocol"
)
2017-07-14 11:18:07 +00:00
// Request is protocol which Websocket Request
2017-07-13 12:01:28 +00:00
type Request struct {
Protocol string `json:"protocol"`
ID *json.RawMessage `json:"id"`
Body *json.RawMessage `json:"body"`
}
2017-07-14 11:18:07 +00:00
// Response is protocol which Websocket Response
2017-07-13 12:01:28 +00:00
type Response struct {
Protocol string `json:"protocol"`
ID *json.RawMessage `json:"id"`
Error *protocol.Error `json:"error,omitempty"`
Body *json.RawMessage `json:"body"`
}