-
Notifications
You must be signed in to change notification settings - Fork 67
/
state.go
30 lines (24 loc) · 957 Bytes
/
state.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
// SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Gardener contributors
//
// SPDX-License-Identifier: Apache-2.0
package alicloud
import (
"github.com/aliyun/alibaba-cloud-sdk-go/services/alidns"
"github.com/gardener/external-dns-management/pkg/dns"
"github.com/gardener/external-dns-management/pkg/dns/provider/raw"
)
type Record alidns.Record
var _ raw.Record = &Record{}
func (r *Record) GetType() string { return r.Type }
func (r *Record) GetId() string { return r.RecordId }
func (r *Record) GetDNSName() string { return GetDNSName(alidns.Record(*r)) }
func (r *Record) GetSetIdentifier() string { return "" }
func (r *Record) GetValue() string {
if r.Type == dns.RS_TXT {
return raw.EnsureQuotedText(r.Value)
}
return r.Value
}
func (r *Record) GetTTL() int { return r.TTL }
func (r *Record) SetTTL(ttl int) { r.TTL = ttl }
func (r *Record) Copy() raw.Record { n := *r; return &n }