search.go raw

   1  package dns
   2  
   3  import "encoding/json"
   4  
   5  type ZoneSearchResult struct {
   6  	Next         string         `json:"next"`
   7  	Limit        int            `json:"limit"`
   8  	TotalResults int            `json:"total_results"`
   9  	Results      []*ZoneSummary `json:"results"`
  10  }
  11  
  12  type ZoneSummary struct {
  13  	FQDN   string `json:"fqdn"`
  14  	Handle string `json:"handle"`
  15  }
  16  
  17  // New correct types
  18  type RecordSearchResult struct {
  19  	Next         string          `json:"next"`
  20  	Limit        int             `json:"limit"`
  21  	TotalResults int             `json:"total_results"`
  22  	Results      []*RecordSearch `json:"results"`
  23  }
  24  
  25  type RecordSearch struct {
  26  	Domain     string          `json:"domain"`
  27  	Type       string          `json:"type"`
  28  	TTL        int             `json:"ttl"`
  29  	ZoneFQDN   string          `json:"zone_fqdn"`
  30  	ZoneHandle string          `json:"zone_handle"`
  31  	Answers    []*SearchAnswer `json:"answers"`
  32  }
  33  
  34  type SearchAnswer struct {
  35  	// Answer json.RawMessage `json:"answer"`
  36  	Raw   json.RawMessage `json:"answer"`
  37  	Rdata []string        `json:"-"`
  38  }
  39