transform

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PtrNameMagic

func PtrNameMagic(name, domain string) (string, error)

func ReverseDomainName

func ReverseDomainName(cidr string) (string, error)

func TransformIP

func TransformIP(address net.IP, transforms []IpConversion) (net.IP, error)

TransformIP transforms a single ip address. If the transform results in multiple new targets, an error will be returned.

func TransformIPToList

func TransformIPToList(address net.IP, transforms []IpConversion) ([]net.IP, error)

TransformIPToList manipulates an net.IP based on a list of IpConversions. It can potentially expand one ip address into multiple addresses.

func UintToIP

func UintToIP(u uint32) net.IP

Types

type IpConversion

type IpConversion struct {
	Low, High net.IP
	NewBases  []net.IP
	NewIPs    []net.IP
}

func DecodeTransformTable

func DecodeTransformTable(transforms string) ([]IpConversion, error)

DecodeTransformTable turns a string-encoded table into a list of conversions.

Jump to

Keyboard shortcuts

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