rind: github.com/owlwalks/rind Index | Files | Directories

package rind

import "github.com/owlwalks/rind"


Package Files

addrbag.go dns.go dnsmessage.go rest.go store.go

type DNSServer Uses

type DNSServer interface {

DNSServer will do Listen, Query and Send.

type DNSService Uses

type DNSService struct {
    // contains filtered or unexported fields

DNSService is an implementation of DNSServer interface.

func New Uses

func New(rwDirPath string, forwarders []net.UDPAddr) DNSService

New setups a DNSService, rwDirPath is read-writable directory path for storing dns records.

func Start Uses

func Start(rwDirPath string, forwarders []net.UDPAddr) *DNSService

Start conveniently init every parts of DNS service.

func (*DNSService) Listen Uses

func (s *DNSService) Listen()

Listen starts a DNS server on port 53

func (*DNSService) Query Uses

func (s *DNSService) Query(p Packet)

Query lookup answers for DNS message.

type Packet Uses

type Packet struct {
    // contains filtered or unexported fields

Packet carries DNS packet payload and sender address.

type RestServer Uses

type RestServer interface {
    Create() http.HandlerFunc
    Read() http.HandlerFunc
    Update() http.HandlerFunc
    Delete() http.HandlerFunc

RestServer will do CRUD on DNS records

type RestService Uses

type RestService struct {
    Dn *DNSService

RestService is an implementation of RestServer interface.

func (*RestService) Create Uses

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 Uses

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 Uses

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 Uses

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.



Package rind imports 15 packages (graph) and is imported by 1 packages. Updated 2018-12-15. Refresh now. Tools for package owners.