Documentation
¶
Overview ¶
Package pns implements a plugin that returns information held in the PulseChain Name Service.
Index ¶
- type PNS
- func (e PNS) HasRecords(domain string, name string) (bool, error)
- func (e PNS) IsAuthoritative(domain string) bool
- func (e PNS) Name() string
- func (e PNS) Query(domain string, name string, qtype uint16, do bool) ([]dns.RR, error)
- func (e PNS) Ready() bool
- func (e PNS) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error)
- type Result
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PNS ¶
type PNS struct { Next plugin.Handler Client *ethclient.Client Registry *pns.Registry PlsLinkNameServers []string IPFSGatewayAs []string IPFSGatewayAAAAs []string }
PNS is a plugin that returns information held in the PulseChain Name Service.
func (PNS) HasRecords ¶
HasRecords checks if there are any records for a specific domain and name. This is used for wildcard eligibility
func (PNS) IsAuthoritative ¶
IsAuthoritative checks if the PNS plugin is authoritative for a given domain
type Result ¶
type Result int
Result of a lookup
const ( // Success is a successful lookup. Success Result = iota // NameError indicates a nameerror NameError // Delegation indicates the lookup resulted in a delegation. Delegation // NoData indicates the lookup resulted in a NODATA. NoData // ServerFailure indicates a server failure during the lookup. ServerFailure )
type Server ¶
type Server interface { // Query returns records for a specific domain, name, and resource type Query(domain string, qname string, qtype uint16, do bool) ([]dns.RR, error) // HasRecords checks if there are any records for a specific domain and name // This is used to check for wildcard eligibility HasRecords(domain string, qname string) (bool, error) // IsAuthoritative returns true if this server is authoritative for the // supplied domain IsAuthoritative(qdomain string) bool }
Server is an interface defined by any plugin that wishes to serve authoritative records
Click to show internal directories.
Click to hide internal directories.