spec

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Responses

type Responses struct {
	Rules []*Rule `yaml:"rules"`
}

func FromFile

func FromFile(path string) *Responses

func FromYAML

func FromYAML(y string) *Responses

func New

func New() *Responses

func Parse

func Parse(val string) Responses

func (*Responses) Add

func (r *Responses) Add(query *dns.Msg, response *dns.Msg)

func (Responses) Count

func (r Responses) Count() int

func (Responses) Find

func (r Responses) Find(query *dns.Msg) *dns.Msg

func (Responses) FindDomains

func (r Responses) FindDomains(domain string) []*Rule

func (Responses) YAML

func (r Responses) YAML() string

type Rule

type Rule struct {
	Name    string              `yaml:"name"`
	Records map[string][]string `yaml:"records"`
}

Jump to

Keyboard shortcuts

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