Debian Codegraph @

proto/types/v1/types.proto

raw ◀ ▶
1 Debian patch touch this file
1 syntax = "proto3";
2
3 package types.v1;
4
•5 option go_package = "types/v1;typesv1";
6
7 import "google/protobuf/duration.proto";
8 import "google/protobuf/timestamp.proto";
9
10 enum ScalarType {
11 unknown = 0;
12 str = 1;
13 f64 = 2;
14 i64 = 3;
15 bool = 4;
16 ts = 5;
17 dur = 6;
18 }
19
20 message VarType {
21 message ArrayType {
22 VarType items = 1;
23 }
24 message ObjectType {
25 map<string, VarType> kvs = 1;
26 }
27 message MapType {
28 VarType key = 1;
29 VarType value = 2;
30 }
31 message Null {}
32 oneof type {
33 ScalarType scalar = 1;
34 ArrayType array = 2;
35 ObjectType object = 3;
36 MapType map = 4;
37 Null null = 5;
38 }
39 }
40
41 message KV {
42 string key = 1;
43 Val value = 2;
44 }
45
46 message Val {
47 VarType type = 100;
48 oneof kind {
49 string str = 201;
50 double f64 = 202;
51 int64 i64 = 203;
52 bool bool = 204;
53 google.protobuf.Timestamp ts = 205;
54 google.protobuf.Duration dur = 206;
55 Arr arr = 207;
56 Obj obj = 208;
57 Map map = 209;
58 Null null = 210;
59 }
60 }
61
62 message Obj {
63 repeated KV kvs = 1;
64 }
65
66 message Arr {
67 repeated Val items = 1;
68 }
69
70 message Map {
71 message Entry {
72 Val key = 1;
73 Val value = 2;
74 }
75 repeated Entry entries = 1;
76 }
77
78 message Null {}
79
80 message Scalar {
81 VarType type = 100;
82 oneof kind {
83 string str = 201;
84 double f64 = 202;
85 int64 i64 = 203;
86 bool bool = 204;
87 google.protobuf.Timestamp ts = 207;
88 google.protobuf.Duration dur = 208;
89 }
90 }
91
92 message FlatKV {
93 string key = 1;
94 Scalar value = 2;
95 }
96
97 message FlatArr {
98 repeated Scalar items = 1;
99 }
100
101 message TableType {
102 message Column {
103 string name = 1;
104 VarType type = 2;
105 }
106 repeated Column columns = 1;
107 }
108
109 message Table {
110 TableType type = 1;
111 repeated Arr rows = 2;
112 }
113
114 message DataStreamType {
115 oneof type {
116 MultiDataStreamType multi = 1;
117 TabularType tabular = 2;
118 VarType single_value = 3;
119 Timeseries timeseries = 5;
120 }
121 }
122
123 message MultiDataStreamType {
124 DataStreamType streams = 1;
125 }
126
127 message TabularType {
128 message LogEventType {
129 // log events contain,
130 // - machine_id
131 // - session_id
132 // - event_id (for ordering only within a machine/session pair
133 // - parsed_at (timestamp of when the log event was parsed)
134 // - timestamp (from a value found in the log, otherwise parsed_at)
135 // - level
136 // - message
137 // - key-value pairs
138 }
139 oneof type {
140 TableType table = 1;
141 LogEventType log_events = 2;
142 }
143 }
144
145 message Timeseries {
146 // each row will contain a timestamp along with a value
147 // value of this type
148 VarType type = 1;
149 }