-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathconnector.go
134 lines (132 loc) · 3.28 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
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
134
package firebase
import (
"github.com/kubemq-hub/builder/connector/common"
)
func Connector() *common.Connector {
return common.NewConnector().
SetKind("gcp.firebase").
SetDescription("GCP Firebase Target").
SetName("Firebase").
SetProvider("GCP").
SetCategory("Store").
SetTags("db", "no-sql", "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("bool").
SetName("auth_client").
SetDescription("Set Firebase target is a auth client").
SetMust(false).
SetDefault("false"),
).
AddProperty(
common.NewProperty().
SetKind("bool").
SetName("db_client").
SetTitle("Is DB Client").
SetDescription("Set Firebase target is a db client").
SetMust(false).
SetDefault("false"),
).
AddProperty(
common.NewProperty().
SetKind("string").
SetName("db_url").
SetTitle("DB URL").
SetDescription("Set Firebase db url").
SetMust(false).
SetDefault(""),
).
AddProperty(
common.NewProperty().
SetKind("bool").
SetName("messaging_client").
SetTitle("Is Messaging Client").
SetDescription("Set Firebase target is a messaging client").
SetMust(false).
SetDefault("false"),
).
AddMetadata(
common.NewMetadata().
SetName("method").
SetKind("string").
SetDescription("Set GCP Firebase execution method").
SetOptions([]string{"custom_token", "verify_token", "retrieve_user", "create_user", "delete_user", "delete_multiple_users", "list_users", "get_db", "delete_db", "set_db", "send_message", "send_multi"}).
SetDefault("create_user").
SetMust(true),
).
AddMetadata(
common.NewMetadata().
SetName("retrieve_by").
SetKind("string").
SetDescription("Set GCP Firebase retrieve by type").
SetOptions([]string{"by_uid", "by_email", "by_phone"}).
SetDefault("by_uid").
SetMust(false),
).
AddMetadata(
common.NewMetadata().
SetName("token_id").
SetKind("string").
SetDescription("Set Firebase token id").
SetDefault("").
SetMust(false),
).
AddMetadata(
common.NewMetadata().
SetName("uid").
SetKind("string").
SetDescription("Set Firebase user uid").
SetDefault("").
SetMust(false),
).
AddMetadata(
common.NewMetadata().
SetName("email").
SetKind("string").
SetDescription("Set Firebase user email").
SetDefault("").
SetMust(false),
).
AddMetadata(
common.NewMetadata().
SetName("phone").
SetKind("string").
SetDescription("Set Firebase user phone").
SetDefault("").
SetMust(false),
).
AddMetadata(
common.NewMetadata().
SetName("ref_path").
SetKind("string").
SetDescription("Set Firebase reference path").
SetDefault("").
SetMust(false),
).
AddMetadata(
common.NewMetadata().
SetName("child_ref").
SetKind("string").
SetDescription("Set Firebase child path").
SetDefault("").
SetMust(false),
)
}