Skip to content

Commit 5a3ba17

Browse files
committed
add shared_cluster for LB inputs; update cluster_id to pointer
1 parent 1adb269 commit 5a3ba17

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

pkg/types.go

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ type LoadBalancer struct {
598598
Status string `json:"status"`
599599
ExternalAddresses []string `json:"external_addresses"`
600600
LocationID int64 `json:"location_id"`
601-
ClusterID string `json:"cluster_id"`
601+
ClusterID *string `json:"cluster_id"`
602602
Created time.Time `json:"created_at"`
603603
Updated time.Time `json:"updated_at"`
604604
}
@@ -612,7 +612,7 @@ type L4LoadBalancer struct {
612612
ExternalAddresses []string `json:"external_addresses"`
613613
LocationID int64 `json:"location_id"`
614614
StoreLogs bool `json:"store_logs"`
615-
ClusterID string `json:"cluster_id"`
615+
ClusterID *string `json:"cluster_id"`
616616
Created time.Time `json:"created_at"`
617617
Updated time.Time `json:"updated_at"`
618618
}
@@ -648,7 +648,8 @@ type L4UpstreamZoneInput struct {
648648
type L4LoadBalancerUpdateInput struct {
649649
Name *string `json:"name,omitempty"`
650650
StoreLogs *bool `json:"store_logs,omitempty"`
651-
ClusterID string `json:"cluster_id,omitempty"`
651+
ClusterID *string `json:"cluster_id,omitempty"`
652+
SharedCluster *bool `json:"shared_cluster,omitempty"`
652653
VHostZones []L4VHostZoneInput `json:"vhost_zones,omitempty"`
653654
UpstreamZones []L4UpstreamZoneInput `json:"upstream_zones,omitempty"`
654655
}
@@ -658,7 +659,7 @@ type L4LoadBalancerCreateInput struct {
658659
Name string `json:"name"`
659660
LocationID int64 `json:"location_id"`
660661
StoreLogs *bool `json:"store_logs,omitempty"`
661-
ClusterID string `json:"cluster_id,omitempty"`
662+
ClusterID *string `json:"cluster_id,omitempty"`
662663
VHostZones []L4VHostZoneInput `json:"vhost_zones"`
663664
UpstreamZones []L4UpstreamZoneInput `json:"upstream_zones"`
664665
}
@@ -675,7 +676,7 @@ type L7LoadBalancer struct {
675676
Geoip bool `json:"geoip"`
676677
StoreLogs bool `json:"store_logs"`
677678
StoreLogsRegionID int64 `json:"store_logs_region_id"`
678-
ClusterID string `json:"cluster_id"`
679+
ClusterID *string `json:"cluster_id"`
679680
Created time.Time `json:"created_at"`
680681
Updated time.Time `json:"updated_at"`
681682
}
@@ -740,7 +741,8 @@ type L7LoadBalancerUpdateInput struct {
740741
Geoip *bool `json:"geoip,omitempty"`
741742
NewExternalIpsCount *int `json:"new_external_ips_count,omitempty"`
742743
DeleteExternalIps []string `json:"delete_external_ips,omitempty"`
743-
ClusterID string `json:"cluster_id,omitempty"`
744+
ClusterID *string `json:"cluster_id,omitempty"`
745+
SharedCluster *bool `json:"shared_cluster,omitempty"`
744746
VHostZones []L7VHostZoneInput `json:"vhost_zones,omitempty"`
745747
UpstreamZones []L7UpstreamZoneInput `json:"upstream_zones,omitempty"`
746748
}
@@ -752,7 +754,7 @@ type L7LoadBalancerCreateInput struct {
752754
StoreLogs *bool `json:"store_logs,omitempty"`
753755
StoreLogsRegionID *int `json:"store_logs_region_id,,omitempty"`
754756
Geoip *bool `json:"geoip,omitempty"`
755-
ClusterID string `json:"cluster_id,omitempty"`
757+
ClusterID *string `json:"cluster_id,omitempty"`
756758
VHostZones []L7VHostZoneInput `json:"vhost_zones"`
757759
UpstreamZones []L7UpstreamZoneInput `json:"upstream_zones"`
758760
}

0 commit comments

Comments
 (0)