23 lines
557 B
Go
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"`
|
|
}
|