ptr

package
v0.0.0-...-324f9bf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 28, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProviderName = "ptr"

	ResultTTL         = 30 * time.Minute
	DefaultNameserver = "1.1.1.1:53"
)

Variables

This section is empty.

Functions

func NewProviderClient

func NewProviderClient(c session.Session) (providers.ProviderClient, error)

Types

type Client

type Client struct {
	session.Session
}

func (*Client) CreateTable

func (c *Client) CreateTable(data []byte) (*table.Writer, error)

func (*Client) Enabled

func (c *Client) Enabled() bool

func (*Client) FindHost

func (c *Client) FindHost() ([]byte, error)

func (*Client) GetConfig

func (c *Client) GetConfig() *session.Session

func (*Client) Initialise

func (c *Client) Initialise() error

func (*Client) Priority

func (c *Client) Priority() int

type Config

type Config struct {
	session.Session
	Host   netip.Addr
	APIKey string
	// contains filtered or unexported fields
}
type Header struct {
	Name     string `dns:"cdomain-name"`
	Rrtype   uint16 `json:"rrtype,omitempty"`
	Class    uint16 `json:"class,omitempty"`
	Ttl      uint32 `json:"ttl,omitempty"` //nolint:stylecheck
	Rdlength uint16 `json:"rdlength,omitempty"`
}

type HostSearchResult

type HostSearchResult struct {
	Raw json.RawMessage `json:"raw,omitempty"`
	RR  []*Ptr          `json:"rr,omitempty"`
	Msg dns.Msg         `json:"msg,omitempty"`
}

type Provider

type Provider interface {
	LoadData() ([]byte, error)
	CreateTable([]byte) (*table.Writer, error)
}

type Ptr

type Ptr struct {
	Header Header `json:"header,omitempty"`
	Ptr    string `json:"ptr,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL