handlers

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: May 9, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEOF = errors.New("EOF")
View Source
var ErrMoveOn = errors.New("move on")
View Source
var ErrNotAllowed = errors.New("not alowed")
View Source
var ErrUnexpectedEOF = errors.New("unexpected EOF, value required")

Functions

func DefaultIp

func DefaultIp(reqType uint16) net.IP

func IPsToRR

func IPsToRR(question dns.Question, ips ...net.IP) (result []dns.RR)

func PartToIP

func PartToIP(part string) net.IP

Types

type BaseHandler

type BaseHandler struct {
	Limiters limiter.Limiters
}

func (*BaseHandler) SetDefaultLimiters

func (h *BaseHandler) SetDefaultLimiters(modifiers ...limiter.Limiter)

type Handler

type Handler interface {
	Name() string
	Init(p Parser) error
	SetDefaultLimiters(modifiers ...limiter.Limiter)
	Handle(question dns.Question) (rrs []dns.RR, moveOn bool, err error)
}

type Parser

type Parser interface {
	RestHandlers() ([]Handler, error)
	NextHandler() (Handler, error)
	NextValue() (string, error)
	RestValues() ([]string, error)
	NextRaw() (string, error)
	FQDN() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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