Documentation
¶
Index ¶
- type Colocation
- type Repository
- func (r *Repository) AddIPAddress(coloName string, address net.IP, reverseDNS string) error
- func (r *Repository) GetAll() ([]Colocation, error)
- func (r *Repository) GetByName(coloName string) (Colocation, error)
- func (r *Repository) GetIPAddressByAddress(coloName string, address net.IP) (ipaddress.IPAddress, error)
- func (r *Repository) GetIPAddresses(coloName string) ([]ipaddress.IPAddress, error)
- func (r *Repository) RemoveIPAddress(coloName string, address net.IP) error
- func (r *Repository) UpdateReverseDNS(coloName string, ip ipaddress.IPAddress) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Colocation ¶
type Colocation struct {
// List of IP ranges
IPRanges []ipaddress.IPRange `json:"ipRanges"`
// Colocation name
Name string `json:"name"`
}
Colocation struct for a Colocation
type Repository ¶
type Repository repository.RestRepository
Repository can be used to get a list of your colocations and edit/show/update colocation IP address data
func (*Repository) AddIPAddress ¶
AddIPAddress allows you to add an IP address to your Colocation by specifying the Colocation name and the IP to add. Optionally, you can also set the reverse dns by setting the reverseDNS argument
Note: the IP address you want to add should be in a range you own.
func (*Repository) GetAll ¶
func (r *Repository) GetAll() ([]Colocation, error)
GetAll returns a list of your colocations
func (*Repository) GetByName ¶
func (r *Repository) GetByName(coloName string) (Colocation, error)
GetByName returns a specific colocation by name
func (*Repository) GetIPAddressByAddress ¶
func (r *Repository) GetIPAddressByAddress(coloName string, address net.IP) (ipaddress.IPAddress, error)
GetIPAddressByAddress returns network information for the specified IP address of the specified Colocation
func (*Repository) GetIPAddresses ¶
func (r *Repository) GetIPAddresses(coloName string) ([]ipaddress.IPAddress, error)
GetIPAddresses returns all IP addresses attached to your Colocation
func (*Repository) RemoveIPAddress ¶
func (r *Repository) RemoveIPAddress(coloName string, address net.IP) error
RemoveIPAddress allows you to remove an IP address from the registered list of IP address within your Colocation's range.
func (*Repository) UpdateReverseDNS ¶
func (r *Repository) UpdateReverseDNS(coloName string, ip ipaddress.IPAddress) error
UpdateReverseDNS allows you to update the reverse dns for IPv4 addresses as wal as IP addresses