-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathresponse.go
94 lines (83 loc) · 2.07 KB
/
response.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
package ksqldb
type CommandStatus struct {
Message string
Status string
}
type Stream struct {
Name string
Topic string
Format string
Type string
}
type Table struct {
Name string
Topic string
Format string
Type string
IsWindowed bool
}
type Query struct {
QueryString string
Sinks string
ID string // The query ID
}
// this is not complete yet
type Schema struct {
Type string
// Fields
}
type Field struct {
Name string
Schema Schema
}
type QueryDescription struct {
StatementText string
Fields []Field
Sources []string
Sinks []string
ExecutionPlan string
Topology string
}
type QueryInfo struct {
QueryString string
Sinks []string
SinkKafkaTopics []string
Id string
StatusCount map[string]int
QueryType string
State string
}
type SourceDescription struct {
Name string
ReadQueries []QueryInfo
WriteQueries []QueryInfo
Fields []Field
Type string
Key string
Timestamp string
Format string
Topic string
Extended bool
// Extended only
Statistics string
ErrorStats string
Replication int
Partitions int
}
type KsqlResponseSlice []KsqlResponse
type StreamSlice []Stream
type TableSlice []Table
type QuerySlice []Query
type KsqlResponse struct {
StatementText string
Warnings []string
Type string `json:"@type"`
CommandId string `json:"commandId,omitempty"`
CommandSequenceNumber int64 `json:"commandSequenceNumber,omitempty"` // -1 if the operation was unsuccessful
CommandStatus CommandStatus `json:"commandStatus,omitempty"`
Stream *StreamSlice `json:"streams,omitempty"`
Tables *TableSlice `json:"tables,omitempty"`
Queries *QuerySlice `json:"queries,omitempty"`
QueryDescription *QueryDescription `json:"queryDescription,omitempty"`
SourceDescription *SourceDescription `json:"sourceDescription,omitempty"`
}