46 lines
784 B
Go
46 lines
784 B
Go
package dnsexit_manager
|
|
|
|
import (
|
|
"sync"
|
|
|
|
dns "git.uoc.run.place/OxFF/dns-manager"
|
|
)
|
|
|
|
const API_BASE = "https://api.dnsexit.com/dns/"
|
|
|
|
type Config struct {
|
|
API_KEY string
|
|
}
|
|
|
|
type client struct {
|
|
Lock sync.Mutex
|
|
API_KEY string
|
|
}
|
|
|
|
func (c client) AddRecord() dns.Response {
|
|
new_response := dns.Response{}
|
|
return new_response
|
|
}
|
|
|
|
func (c client) DellRecord() dns.Response {
|
|
new_response := dns.Response{}
|
|
return new_response
|
|
}
|
|
|
|
func (c client) UpdateRecord() dns.Response {
|
|
new_response := dns.Response{}
|
|
return new_response
|
|
}
|
|
|
|
func (c client) ReadRecords() (error, *[]dns.Record) {
|
|
var list_of_records []dns.Record
|
|
return nil, &list_of_records
|
|
}
|
|
|
|
|
|
func (conf Config) New() *client {
|
|
return &client{
|
|
Lock: sync.Mutex{},
|
|
API_KEY: conf.API_KEY,
|
|
}
|
|
} |