Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Exporter ¶
type Nameserver ¶
type Nameserver struct {
ID int `json:"-"`
State string `json:"-"`
IP string `json:"ip"`
Name *string `json:"name"`
Country *string `json:"country_id"`
City *string `json:"city"`
Version *string `json:"version"`
Error *string `json:"error"`
DNSSEC *bool `json:"dnssec"`
Reliability float64 `json:"reliability"`
CheckedAt *time.Time `json:"checked_at"`
CreatedAt time.Time `json:"created_at"`
}
Nameserver describes a database record.
func (*Nameserver) GetString ¶
func (ns *Nameserver) GetString(attr string) string
GetString returns a string representation of the attribute given.
func (*Nameserver) IsValid ¶
func (ns *Nameserver) IsValid() bool
IsValid tells you whether this Nameserver is valid (i.e. not "new" or "failed").
type Writer ¶
type Writer struct {
Channel chan *Nameserver
// contains filtered or unexported fields
}
A Writer waites for new Nameserver instances to process and write away.
func NewWriter ¶
NewWriter starts a new Writer life cycle. It returns a channel to which you send Nameserver instances. These are then transformed into different files (namely `${pathname}/${basename}.{txt,csv,json}`), so you need to pass in a path- and base name. When you're done, just close the done-channel and the internal caches are flushed and the files are closed.
Click to show internal directories.
Click to hide internal directories.