-
Notifications
You must be signed in to change notification settings - Fork 129
/
Copy pathbuilder_v2_gw_api.go
64 lines (52 loc) · 1.46 KB
/
builder_v2_gw_api.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
package kong2kic
import (
"log"
"github.com/kong/go-database-reconciler/pkg/file"
)
type KICv2GatewayAPIBuilder struct {
kicContent *KICContent
}
func newKICv2GatewayAPIBuilder() *KICv2GatewayAPIBuilder {
return &KICv2GatewayAPIBuilder{
kicContent: &KICContent{},
}
}
func (b *KICv2GatewayAPIBuilder) buildServices(content *file.Content) {
err := populateKICServicesWithAnnotations(content, b.kicContent)
if err != nil {
log.Fatal(err)
}
}
func (b *KICv2GatewayAPIBuilder) buildRoutes(content *file.Content) {
err := populateKICIngressesWithGatewayAPI(content, b.kicContent)
if err != nil {
log.Fatal(err)
}
}
func (b *KICv2GatewayAPIBuilder) buildGlobalPlugins(content *file.Content) {
err := populateKICKongClusterPlugins(content, b.kicContent)
if err != nil {
log.Fatal(err)
}
}
func (b *KICv2GatewayAPIBuilder) buildConsumers(content *file.Content) {
err := populateKICConsumers(content, b.kicContent)
if err != nil {
log.Fatal(err)
}
}
func (b *KICv2GatewayAPIBuilder) buildConsumerGroups(content *file.Content) {
err := populateKICConsumerGroups(content, b.kicContent)
if err != nil {
log.Fatal(err)
}
}
func (b *KICv2GatewayAPIBuilder) buildCACertificates(content *file.Content) {
populateKICCACertificate(content, b.kicContent)
}
func (b *KICv2GatewayAPIBuilder) buildCertificates(content *file.Content) {
populateKICCertificates(content, b.kicContent)
}
func (b *KICv2GatewayAPIBuilder) getContent() *KICContent {
return b.kicContent
}