Added first prototype of library

This commit is contained in:
2025-01-07 22:13:51 +03:00
parent ec65866001
commit c188f3fecd
2 changed files with 34 additions and 0 deletions

31
dns_manager.go Normal file
View File

@ -0,0 +1,31 @@
package dns_manager
type RecordType int
const (
None RecordType = iota
A
AAAA
MX
CNAME
TXT
)
type Record struct {
Type RecordType
Host string
Content string
TTL uint16
}
type Response struct {
error string
message string
}
type Actions interface {
AddRecord(Record) Response
DeleteRecord() Response
UpdateRecord(Record) Response
ReadRecords() (error, *[]Record)
}

3
go.mod Normal file
View File

@ -0,0 +1,3 @@
module git.uoc.run.place/OxFF/dns-manager
go 1.23.4