doh

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Answer

type Answer struct {
	Name string `json:"name,omitempty"`
	Type uint16 `json:"type,omitempty"`
	Ttl  uint32 `json:"TTL,omitempty"`
	Data string `json:"data,omitempty"`
}

func (Answer) ToRecord

func (a Answer) ToRecord() dto.Record

type DOHClient

type DOHClient struct {
	// contains filtered or unexported fields
}

DOHClient Dns Pver Http clien, resolve request by requesting it to an http server

func NewDOHClient

func NewDOHClient(endpoint string) *DOHClient

NewDOHClient instantiate a new DOHClient

func (*DOHClient) ResolveV4

func (c *DOHClient) ResolveV4(name string) (dto.Record, error)

ResolveV4 implements client.Client

func (*DOHClient) ResolveV6

func (c *DOHClient) ResolveV6(name string) (dto.Record, error)

ResolveV6 implements client.Client

type Message

type Message struct {
	Status   int        `json:"status,omitempty"`
	TC       bool       `json:"TC,omitempty"`
	RD       bool       `json:"RD,omitempty"`
	RA       bool       `json:"RA,omitempty"`
	AD       bool       `json:"AD,omitempty"`
	CD       bool       `json:"CD,omitempty"`
	Question []Question `json:"Question,omitempty"`
	Answer   []Answer   `json:"Answer,omitempty"`
}

type Question

type Question struct {
	Name string `json:"name,omitempty"`
	Type int    `json:"type,omitempty"`
}

Jump to

Keyboard shortcuts

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