Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListForServer ¶
func ListForServer(c *gophercloud.ServiceClient, serverID string) pagination.Pager
ListForServer returns all public IPs for the server with the given serverID.
Types ¶
type CreateResult ¶
type CreateResult struct {
PublicIPResult
}
CreateResult represents the result of a Create operation.
func Create ¶
func Create(c *gophercloud.ServiceClient, serverID string) CreateResult
Create adds a public IP to the server with the given serverID.
type DeleteResult ¶
type DeleteResult struct {
gophercloud.ErrResult
}
DeleteResult represents the result of a Delete operation.
func Delete ¶
func Delete(c *gophercloud.ServiceClient, id string) DeleteResult
Delete removes the public IP with the given id.
type GetResult ¶
type GetResult struct {
PublicIPResult
}
GetResult represents the result of a Get operation.
func Get ¶
func Get(c *gophercloud.ServiceClient, id string) GetResult
Get retrieves the public IP with the given id.
type PublicIP ¶
type PublicIP struct {
// The unique ID of the public IP.
ID string `mapstructure:"id"`
// The IPv4 address of the public IP.
PublicIPv4 string `mapstructure:"public_ip_v4"`
// The cloud server (node) of the public IP.
CloudServer struct {
// The cloud server ID.
ID string `mapstructure:"id"`
// The name of the server.
Name string `mapstructure:"name"`
// The cloud network for the cloud server.
CloudNetwork struct {
// The network ID.
ID string `mapstructure:"id"`
// The network name.
Name string `mapstructure:"name"`
// The network's private IPv4 address.
PrivateIPv4 string `mapstructure:"private_ip_v4"`
// The IP range for the network.
CIDR string `mapstructure:"cidr"`
// The datetime the network was created.
CreatedAt time.Time `mapstructure:"-"`
// The last datetime the network was updated.
UpdatedAt time.Time `mapstructure:"-"`
} `mapstructure:"cloud_network"`
// The datetime the server was created.
CreatedAt time.Time `mapstructure:"-"`
// The datetime the server was last updated.
UpdatedAt time.Time `mapstructure:"-"`
} `mapstructure:"cloud_server"`
// The status of the public IP.
Status string `mapstructure:"status"`
// The details of the status of the public IP.
StatusDetail string `mapstructure:"status_detail"`
// The time the public IP was created.
CreatedAt time.Time `mapstructure:"-"`
// The time the public IP was last updated.
UpdatedAt time.Time `mapstructure:"-"`
}
PublicIP represents a public IP address.
func ExtractPublicIPs ¶
func ExtractPublicIPs(page pagination.Page) ([]PublicIP, error)
ExtractPublicIPs extracts and returns a slice of PublicIPs. It is used while iterating over a publicips.List call.
type PublicIPPage ¶
type PublicIPPage struct {
pagination.SinglePageBase
}
PublicIPPage is the page returned by a pager when traversing over a collection of PublicIPs.
func (PublicIPPage) IsEmpty ¶
func (r PublicIPPage) IsEmpty() (bool, error)
IsEmpty returns true if a PublicIPPage contains no PublicIPs.
type PublicIPResult ¶
type PublicIPResult struct {
gophercloud.Result
}
PublicIPResult represents a result that can be extracted into a PublicIP.
func (PublicIPResult) Extract ¶
func (r PublicIPResult) Extract() (*PublicIP, error)
Extract is a function that extracts a PublicIP from a PublicIPResult.