-
Notifications
You must be signed in to change notification settings - Fork 66
/
utils_zonepolicy.go
35 lines (27 loc) · 995 Bytes
/
utils_zonepolicy.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
// SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Gardener contributors
//
// SPDX-License-Identifier: Apache-2.0
package utils
import (
"github.com/gardener/controller-manager-library/pkg/resources"
api "github.com/gardener/external-dns-management/pkg/apis/dns/v1alpha1"
)
var DNSHostedZonePolicyType = (*api.DNSHostedZonePolicy)(nil)
type DNSHostedZonePolicyObject struct {
resources.Object
}
func (this *DNSHostedZonePolicyObject) DNSHostedZonePolicyObject() *api.DNSHostedZonePolicy {
return this.Data().(*api.DNSHostedZonePolicy)
}
func DNSHostedZonePolicy(o resources.Object) *DNSHostedZonePolicyObject {
if o.IsA(DNSHostedZonePolicyType) {
return &DNSHostedZonePolicyObject{o}
}
return nil
}
func (this *DNSHostedZonePolicyObject) Spec() *api.DNSHostedZonePolicySpec {
return &this.DNSHostedZonePolicyObject().Spec
}
func (this *DNSHostedZonePolicyObject) Status() *api.DNSHostedZonePolicyStatus {
return &this.DNSHostedZonePolicyObject().Status
}