-
Notifications
You must be signed in to change notification settings - Fork 8
/
common.proto
133 lines (114 loc) · 2.38 KB
/
common.proto
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
syntax = "proto3";
option optimize_for = SPEED;
option java_multiple_files = true;
option go_package = "fivetran.com/fivetran_sdk";
package fivetran_sdk;
import "google/protobuf/timestamp.proto";
message ConfigurationFormRequest {}
message ConfigurationFormResponse {
bool schema_selection_supported = 1;
bool table_selection_supported = 2;
repeated FormField fields = 3;
repeated ConfigurationTest tests = 4;
}
message FormField {
string name = 1;
string label = 2;
bool required = 3;
optional string description = 4;
oneof type {
TextField text_field = 5;
DropdownField dropdown_field = 6;
ToggleField toggle_field = 7;
}
}
message DropdownField {
repeated string dropdown_field = 1;
}
message ToggleField {}
enum TextField {
PlainText = 0;
Password = 1;
Hidden = 2;
}
message ConfigurationTest {
string name = 1; // unique identifier for the test
string label = 2; // A few words indicating what we are testing, e.g. 'Connecting to database'
}
message TestRequest {
string name = 1;
map<string, string> configuration = 2;
}
message TestResponse {
oneof response {
bool success = 1;
string failure = 2;
// potential future warning
}
}
message SchemaList {
repeated Schema schemas = 1;
}
message TableList {
repeated Table tables = 1;
}
message Schema {
string name = 1;
repeated Table tables = 2;
}
enum DataType {
UNSPECIFIED = 0;
BOOLEAN = 1;
SHORT = 2;
INT = 3;
LONG = 4;
DECIMAL = 5;
FLOAT = 6;
DOUBLE = 7;
NAIVE_DATE = 8;
NAIVE_DATETIME = 9;
UTC_DATETIME = 10;
BINARY = 11;
XML = 12;
STRING = 13;
JSON = 14;
}
message DecimalParams {
uint32 precision = 1;
uint32 scale = 2;
}
enum OpType {
UPSERT = 0;
UPDATE = 1;
DELETE = 2;
TRUNCATE = 3;
}
message ValueType {
oneof inner {
bool null = 1;
bool bool = 2;
int32 short = 3;
int32 int = 4;
int64 long = 5;
float float = 6;
double double = 7;
google.protobuf.Timestamp naive_date = 8;
google.protobuf.Timestamp naive_datetime = 9;
google.protobuf.Timestamp utc_datetime = 10;
string decimal = 11;
bytes binary = 12;
string string = 13;
string json = 14;
string xml = 15;
}
}
message Table {
string name = 1;
repeated Column columns = 2;
}
message Column {
string name = 1;
DataType type = 2;
bool primary_key = 3;
optional DecimalParams decimal = 4;
}