transform

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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