overflow_service_websocket/server/protocol.go
crusader 0d428d20c0 ing
2017-07-14 20:18:07 +09:00

23 lines
557 B
Go

package server
import (
"encoding/json"
"git.loafle.net/overflow/overflow_service_websocket/protocol"
)
// Request is protocol which Websocket Request
type Request struct {
Protocol string `json:"protocol"`
ID *json.RawMessage `json:"id"`
Body *json.RawMessage `json:"body"`
}
// Response is protocol which Websocket Response
type Response struct {
Protocol string `json:"protocol"`
ID *json.RawMessage `json:"id"`
Error *protocol.Error `json:"error,omitempty"`
Body *json.RawMessage `json:"body"`
}