-
Notifications
You must be signed in to change notification settings - Fork 7
/
connector.go
61 lines (58 loc) · 1.31 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
package pubsub
import (
"math"
"github.com/kubemq-hub/builder/connector/common"
)
func Connector() *common.Connector {
return common.NewConnector().
SetKind("gcp.pubsub").
SetDescription("GCP PubSub Target").
SetName("PubSub").
SetProvider("GCP").
SetCategory("Messaging").
SetTags("streaming", "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("int").
SetName("retries").
SetDescription("Set PubSub sending message retries").
SetMust(false).
SetDefault("0").
SetMin(0).
SetMax(math.MaxInt32),
).
AddMetadata(
common.NewMetadata().
SetName("topic_id").
SetKind("string").
SetDescription("Set PubSub request topic id").
SetDefault("").
SetMust(false),
).
AddMetadata(
common.NewMetadata().
SetName("tags").
SetKind("string").
SetDescription("Set PubSub request tags").
SetDefault("").
SetMust(false),
)
}