-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathconnector.go
82 lines (80 loc) · 2.02 KB
/
connector.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
package bigtable
import (
"github.com/kubemq-hub/builder/connector/common"
)
func Connector() *common.Connector {
return common.NewConnector().
SetKind("gcp.bigtable").
SetDescription("GCP Bigtable Target").
SetName("Big Table").
SetProvider("GCP").
SetCategory("Store").
SetTags("db", "sql", "distributed", "cloud", "managed").
AddProperty(
common.NewProperty().
SetKind("string").
SetName("project_id").
SetTitle("Project ID").
SetDescription("Set GCP project ID").
SetMust(true).
SetDefault(""),
).
AddProperty(
common.NewProperty().
SetKind("multilines").
SetName("credentials").
SetTitle("Json Credentials").
SetDescription("Set GCP credentials").
SetMust(true).
SetDefault(""),
).
AddProperty(
common.NewProperty().
SetKind("string").
SetName("instance").
SetDescription("Set Bigtable instance").
SetMust(true).
SetDefault(""),
).
AddMetadata(
common.NewMetadata().
SetName("method").
SetKind("string").
SetDescription("Set GCP Bigtable execution method").
SetOptions([]string{"write", "write_batch", "get_row", "get_all_rows", "delete_row", "get_tables", "create_table", "delete_table", "create_column_family", "get_all_rows_by_column"}).
SetDefault("write").
SetMust(true),
).
AddMetadata(
common.NewMetadata().
SetName("table_name").
SetKind("string").
SetDescription("Set Bigtable table name").
SetDefault("").
SetMust(false),
).
AddMetadata(
common.NewMetadata().
SetName("column_family").
SetKind("string").
SetDescription("Set Bigtable column family").
SetDefault("").
SetMust(false),
).
AddMetadata(
common.NewMetadata().
SetName("row_key_prefix").
SetKind("string").
SetDescription("Set Bigtable row key prefix").
SetDefault("").
SetMust(false),
).
AddMetadata(
common.NewMetadata().
SetName("column_name").
SetKind("string").
SetDescription("Set Bigtable column name").
SetDefault("").
SetMust(false),
)
}