Documentation ¶
Overview ¶
Package onens implements a plugin that returns information held in the Ethereum Name Service.
Index ¶
- type ONENS
- func (e ONENS) ExternalLookup(ctx context.Context, state request.Request, target string, qtype uint16) ([]dns.RR, Result)
- func (e ONENS) HasRecords(domain string, name string) (bool, error)
- func (e ONENS) IsAuthoritative(domain string) bool
- func (e ONENS) Name() string
- func (e ONENS) Query(domain string, name string, qtype uint16, do bool) ([]dns.RR, error)
- func (e ONENS) Ready() bool
- func (e ONENS) 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 ONENS ¶
type ONENS struct { Next plugin.Handler Client *ethclient.Client Registry *onens.Registry EthLinkNameServers []string // Upstream for looking up external names during the resolution process. Upstream *upstream.Upstream }
ONENS is a plugin that returns information held in the Onw Name Service.
func (ONENS) ExternalLookup ¶ added in v0.1.3
func (ONENS) HasRecords ¶
HasRecords checks if there are any records for a specific domain and name. This is used for wildcard eligibility
func (ONENS) IsAuthoritative ¶
IsAuthoritative checks if the ONENS 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 // External lookup is used to retrieve ecternal records for CNAME and DNAME querie ExternalLookup(ctx context.Context, state request.Request, target string, qtype uint16) ([]dns.RR, Result) }
Server is an interface defined by any plugin that wishes to serve authoritative records
Click to show internal directories.
Click to hide internal directories.