-
Notifications
You must be signed in to change notification settings - Fork 68
/
project_integration.go
96 lines (78 loc) · 2.17 KB
/
project_integration.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
package model
import (
"github.com/mongodb/mongodb-atlas-kubernetes/v2/pkg/api/v1/project"
)
type ProjectIntegration project.Integration
func NewPIntegration(iType string) *ProjectIntegration {
return &ProjectIntegration{
Type: iType,
}
}
func (i *ProjectIntegration) WithLicenseKeyRef(name, ns string) *ProjectIntegration {
i.LicenseKeyRef.Name = name
i.LicenseKeyRef.Namespace = ns
return i
}
func (i *ProjectIntegration) WithAccountID(id string) *ProjectIntegration {
i.AccountID = id
return i
}
func (i *ProjectIntegration) WithWriteTokenRef(name, ns string) *ProjectIntegration {
i.WriteTokenRef.Name = name
i.WriteTokenRef.Namespace = ns
return i
}
func (i *ProjectIntegration) WithReadTokenRef(name, ns string) *ProjectIntegration {
i.ReadTokenRef.Name = name
i.ReadTokenRef.Namespace = ns
return i
}
func (i *ProjectIntegration) WithAPIKeyRef(name, ns string) *ProjectIntegration {
i.APIKeyRef.Name = name
i.APIKeyRef.Namespace = ns
return i
}
func (i *ProjectIntegration) WithRegion(region string) *ProjectIntegration {
i.Region = region
return i
}
func (i *ProjectIntegration) WithServiceKeyRef(name, ns string) *ProjectIntegration {
i.ServiceKeyRef.Name = name
i.ServiceKeyRef.Namespace = ns
return i
}
func (i *ProjectIntegration) WithAPITokenRef(name, ns string) *ProjectIntegration {
i.APITokenRef.Name = name
i.APITokenRef.Namespace = ns
return i
}
func (i *ProjectIntegration) WithTeamName(t string) *ProjectIntegration {
i.TeamName = t
return i
}
func (i *ProjectIntegration) WithChannelName(c string) *ProjectIntegration {
i.ChannelName = c
return i
}
func (i *ProjectIntegration) WithRoutingKeyRef(name, ns string) *ProjectIntegration {
i.RoutingKeyRef.Name = name
i.RoutingKeyRef.Namespace = ns
return i
}
func (i *ProjectIntegration) WithFlowName(f string) *ProjectIntegration {
i.FlowName = f
return i
}
func (i *ProjectIntegration) WithOrgName(o string) *ProjectIntegration {
i.OrgName = o
return i
}
func (i *ProjectIntegration) WithURL(url string) *ProjectIntegration {
i.URL = url
return i
}
func (i *ProjectIntegration) WithSecretRef(name, ns string) *ProjectIntegration {
i.SecretRef.Name = name
i.SecretRef.Namespace = ns
return i
}