-
Notifications
You must be signed in to change notification settings - Fork 12
/
json_rpc_types.go
51 lines (43 loc) · 1.25 KB
/
json_rpc_types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package enigma
import (
"encoding/json"
)
type (
rpcInvocationRequest struct {
Method string `json:"method"`
Handle int `json:"handle"`
ID int `json:"id"`
Params interface{} `json:"params"`
}
rpcInvocationResponse struct {
ID int `json:"id"`
Result *json.RawMessage `json:"result"`
Error *qixError `json:"error"`
}
rpcNotification struct {
Method string `json:"method"`
Params json.RawMessage `json:"params"`
}
onConnectedEvent struct {
SessionState string `json:"qSessionState"`
}
rpcStatusInfo struct {
Change []int `json:"change"`
Close []int `json:"close"`
Suspend []int `json:"suspend"`
}
// socketOutput represents a request message sent to Qlik Associative Engine
socketOutput struct {
JSONRPC string `json:"jsonrpc"`
Delta bool `json:"delta"`
rpcInvocationRequest
}
// socketInput is a response from an engine
socketInput struct {
JSONRPC string `json:"jsonrpc"`
Delta bool `json:"delta"`
rpcInvocationResponse //Include fields for rpc request responses
rpcNotification //Include fields for notifications from the serverside
rpcStatusInfo //Include close/change fields
}
)