utils

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TTL = 3600
)

Variables

View Source
var (
	ErrInvalidIP     = errors.New("invalid ip")
	ErrEmptyDNSList  = errors.New("dns list is empty")
	ErrEmptyIP       = errors.New("ip is empty")
	ErrCacheNotFound = errors.New("cache is not found")
)

Functions

func CreateA

func CreateA(name string, ips []string) (result []dns.RR)

func CreateAAAA

func CreateAAAA(name string, ips []string) (result []dns.RR)

func DecodeIPs added in v1.3.0

func DecodeIPs(data string) (ip4, ip6 []string)

func EncodeIPs added in v1.3.0

func EncodeIPs(ip4, ip6 []string) string

func ValidateDNS

func ValidateDNS(ip string) (string, error)

func ValidateDNSs

func ValidateDNSs(list []string) (result []string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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