utils

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TTL = 3600
)

Variables

View Source
var (
	ErrInvalidIP = errors.New("invalid ip")
)

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 DomainLevel added in v1.4.2

func DomainLevel(s string, level int) string

func EncodeIPs added in v1.3.0

func EncodeIPs(ip4, ip6 []string) string

func Interval added in v1.4.0

func Interval(ctx context.Context, interval time.Duration, call func(context.Context))

func ReadClose added in v1.4.1

func ReadClose(r io.ReadCloser) ([]byte, error)

func Retry added in v1.4.1

func Retry(count int, ttl time.Duration, call func() error)

func StringError added in v1.4.0

func StringError(err error) string

func Tag added in v1.4.0

func Tag(s string) string

func ValidateDNS

func ValidateDNS(ip string) (string, error)

func ValidateDNSs

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

func ValidateDomain added in v1.4.0

func ValidateDomain(domain string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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