Documentation ¶
Index ¶
Constants ¶
View Source
const MaxPacketSize = 512
View Source
const MaxTxtRecordSize = 255
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Domain ¶
type Domain struct { ID int `json:"id"` Name string `json:"domain"` Mname string `json:"mname"` Rname string `json:"rname"` Serial string `json:"serial"` Refresh int `json:"refresh"` Retry int `json:"retry"` Expire int `json:"expire"` TTL int `json:"ttl"` }
Domain 包含了域名、SOA、DNSSEC信息
type NexnsPlugin ¶
type NexnsPlugin struct { Next plugin.Handler ControllerURL string ClientId string ClientSecret string Database Trie }
func (*NexnsPlugin) Init ¶
func (p *NexnsPlugin) Init() error
func (*NexnsPlugin) Name ¶
func (p *NexnsPlugin) Name() string
func (*NexnsPlugin) RequestWithCredentials ¶
func (p *NexnsPlugin) RequestWithCredentials(url string) (*http.Response, error)
type RRSet ¶
type RRSet struct { ID int `json:"id"` Name string `json:"name"` Type string `json:"type"` Records []Record `json:"records"` }
RRSet 包含了DNS资源记录集的信息
type Trie ¶
type Trie struct {
// contains filtered or unexported fields
}
Trie represents the Trie data structure
func BuildTrie ¶
func BuildTrie(data []DomainData) *Trie
BuildTrie builds a Trie from a list of DomainData
func (*Trie) Insert ¶
func (t *Trie) Insert(domainData *DomainData)
Insert inserts a domain into the Trie
func (*Trie) Search ¶
func (t *Trie) Search(domain string) *DomainData
Search searches for a domain in the Trie and returns the corresponding DomainData 从根开始,最长匹配
type TrieNode ¶
type TrieNode struct {
// contains filtered or unexported fields
}
TrieNode represents a node in the Trie
type WSNotification ¶
Click to show internal directories.
Click to hide internal directories.