dnsexit-manager/dnsexit_manager.go

46 lines
782 B
Go
Raw Normal View History

2025-01-08 00:04:21 +03:00
package dnsexit_manager
import (
"sync"
2025-01-08 01:03:32 +03:00
dns "smeh/dns-manager"
2025-01-08 00:04:21 +03:00
)
const API_BASE = "https://api.dnsexit.com/dns/"
type Config struct {
2025-01-08 01:03:32 +03:00
API_KEY string
2025-01-08 00:04:21 +03:00
}
type client struct {
2025-01-08 01:03:32 +03:00
Lock sync.Mutex
API_KEY string
}
2025-01-08 00:04:21 +03:00
2025-01-08 01:03:32 +03:00
func (c client) AddRecord(rec dns.Record) dns.Response {
new_response := dns.Response{}
return new_response
2025-01-08 00:04:21 +03:00
}
2025-01-08 01:03:32 +03:00
func (c client) DeleteRecord() dns.Response {
new_response := dns.Response{}
return new_response
2025-01-08 00:04:21 +03:00
}
2025-01-08 01:03:32 +03:00
func (c client) UpdateRecord(rec dns.Record) dns.Response {
new_response := dns.Response{}
return new_response
2025-01-08 00:04:21 +03:00
}
func (c client) ReadRecords() (error, *[]dns.Record) {
2025-01-08 01:03:32 +03:00
var list_of_records []dns.Record
return nil, &list_of_records
2025-01-08 00:04:21 +03:00
}
2025-01-08 01:03:32 +03:00
func (conf Config) New() dns.Actions {
return client{
Lock: sync.Mutex{},
API_KEY: conf.API_KEY,
}
}