19 lines
558 B
Go
19 lines
558 B
Go
package service
|
|
|
|
import "context"
|
|
|
|
// DDNSRecord 表示一条 DNS 记录
|
|
type DDNSRecord struct {
|
|
Type string // "A", "AAAA", "TXT"
|
|
Name string // 子域名或记录名,例如 "nas" 或 "_meshray._mesh"
|
|
Value string // 记录值(IP 或 TXT内容)
|
|
}
|
|
|
|
// DDNSProvider 是所有 DNS 服务商的通用接口
|
|
type DDNSProvider interface {
|
|
// TestConnectivity 测试认证连通性
|
|
TestConnectivity(ctx context.Context) error
|
|
// SyncRecords 批量同步多条记录
|
|
SyncRecords(ctx context.Context, baseDomain string, records []DDNSRecord) error
|
|
}
|