src

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateDNSRecord

func GenerateDNSRecord(ip string, ttl int, hostname string) string

Generate a DNS record ready to be paste on a Bind compatible zone

func GenerateIPFromHostname

func GenerateIPFromHostname(net iplib.Net6, hostname string) net.IP

Generate an IP address based on the hostname. The algorithm first tries with the complete hostname, if it does not work, it tries by removing vowels and iterate by removing character by character.

func GenerateRandomIP

func GenerateRandomIP(net iplib.Net6) net.IP

Generate a random IP address based on the given IP subnet.

func GenerateReverseDNSRecord

func GenerateReverseDNSRecord(ip string, ttl int, hostname string) string

Generate a ARPA record ready to be paste on a Bind compatible zone

func Net6wildcard

func Net6wildcard(n iplib.Net6) net.IPMask

Function stollen from c-robinson/iplib, method non-exposed by the lib ¯\_(ツ)_/¯

func RandomNumber

func RandomNumber(min int, max int) int

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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