Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DNSService ¶
type DNSService struct {
// contains filtered or unexported fields
}
func (*DNSService) Listen ¶
func (s *DNSService) Listen()
func (*DNSService) Query ¶
func (s *DNSService) Query(p Packet)
type RestServer ¶
type RestServer interface { Create() http.HandlerFunc Read() http.HandlerFunc Update() http.HandlerFunc Delete() http.HandlerFunc }
RestServer will do CRUD on DNS records
type RestService ¶
type RestService struct {
Dn *DNSService
}
RestService is an implementation of RestServer interface.
func (*RestService) Create ¶
func (s *RestService) Create(w http.ResponseWriter, r *http.Request)
Create is HTTP handler of POST request. Use for adding new record to DNS server.
func (*RestService) Delete ¶
func (s *RestService) Delete(w http.ResponseWriter, r *http.Request)
Delete is HTTP handler of DELETE request. Use for removing records on DNS server.
func (*RestService) Read ¶
func (s *RestService) Read(w http.ResponseWriter, r *http.Request)
Read is HTTP handler of GET request. Use for reading existed records on DNS server.
func (*RestService) Update ¶
func (s *RestService) Update(w http.ResponseWriter, r *http.Request)
Update is HTTP handler of PUT request. Use for updating existed records on DNS server.
Click to show internal directories.
Click to hide internal directories.