Update dns_manager.go

This commit is contained in:
2025-01-08 00:52:33 +03:00
parent b2996de54d
commit 85e42ef70c

View File

@ -2,38 +2,38 @@ package dns_manager
type RecordType int type RecordType int
const ( const (
None RecordType = iota None RecordType = iota
A A
AAAA AAAA
MX MX
CNAME CNAME
TXT TXT
) )
type Record struct { type Record struct {
Type RecordType Type RecordType
Host string Host string
Content string Content string
TTL uint16 TTL uint16
} }
type actions interface { type Actions interface {
AddRecord(Record) Response AddRecord(Record) Response
DeleteRecord() Response DeleteRecord() Response
UpdateRecord(Record) Response UpdateRecord(Record) Response
ReadRecords() (error, *[]Record) ReadRecords() (error, *[]Record)
} }
type manager interface { type manager interface {
New() *actions New() Actions
} }
type Response struct { type Response struct {
error string error string
message string message string
} }
func New(manager_config manager) *actions { func New(manager_config manager) Actions {
return manager_config.New() return manager_config.New()
} }