Documentation
¶
Index ¶
- func List(client *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
- type CreateOpts
- type CreateOptsBuilder
- type CreateResult
- type CreateStaticNatResponse
- type DeleteResult
- type GetResult
- type ListOpts
- type ListOptsBuilder
- type SNATs
- type StaticNAT
- type StaticNatPage
- type UpdateResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(client *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
List returns a Pager which allows you to iterate over a collection of Static NAT resources. It accepts a ListOpts struct, which allows you to filter and sort the returned collection for greater efficiency.
Types ¶
type CreateOpts ¶
type CreateOpts struct { PrivateIpAddr string `json:"vmguestip"` // Private IP address (allocated to the server(VM)) SubnetID string `json:"vmnetworkid"` // ID of the Tier the VM belongs to PublicIpID string `json:"entpublicipid"` // Public IP ID to set up Static NAT }
CreateOpts contains all the values needed to create a new Static NAT resource. All attributes are required.
func (CreateOpts) ToStaticNatCreateMap ¶
func (opts CreateOpts) ToStaticNatCreateMap() (map[string]interface{}, error)
ToStaticNatCreateMap allows CreateOpts to satisfy the CreateOptsBuilder interface
type CreateOptsBuilder ¶
CreateOptsBuilder allows extensions to add additional parameters to the Create request.
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
CreateResult represents the result of a create operation. Call its Extract method to interpret it as a PortForwarding.
func Create ¶
func Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
Create accepts a CreateOpts struct and uses the values provided to create a new Static NAT for an existing floating IP.
func (CreateResult) ExtractInfo ¶
func (r CreateResult) ExtractInfo() (*CreateStaticNatResponse, error)
func (CreateResult) ExtractInto ¶
func (r CreateResult) ExtractInto(v interface{}) error
type CreateStaticNatResponse ¶
type DeleteResult ¶
type DeleteResult struct {
gophercloud.ErrResult
}
DeleteResult represents the result of a delete operation. Call its ExtractErr method to determine if the request succeeded or failed.
func Delete ¶
func Delete(client *gophercloud.ServiceClient, pfId string) (r DeleteResult)
Delete will permanently delete a particular Static NAT for a given floating ID.
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
GetResult represents the result of a get operation. Call its Extract method to interpret it as a PortForwarding.
func (GetResult) ExtractInfo ¶
func (r GetResult) ExtractInfo() (*CreateStaticNatResponse, error)
func (GetResult) ExtractInto ¶
func (r GetResult) ExtractInto(v interface{}) error
type ListOpts ¶
type ListOpts struct { }
ListOpts allows the filtering and sorting of paginated collections through the API. Filtering is achieved by passing in struct field values that map to the Static NAT attributes you want to see returned.
func (ListOpts) ToStaticNatListQuery ¶
ToStaticNatListQuery formats a ListOpts into a query string.
type ListOptsBuilder ¶
type StaticNAT ¶
type StaticNAT struct { PrivateIpAddr string `json:"vmguestip"` // Private IP address (allocated to the server(VM)) PublicIpAddr string `json:"ipaddress"` // Public IP to set up Static NAT VPCID string `json:"vpcid"` PublicIpID string `json:"ipaddressid"` // Public IP ID to set up Static NAT Name string `json:"name"` SubnetID string `json:"networkid"` // Tier ID ID string `json:"id"` }
func ExtractStaticNats ¶
func ExtractStaticNats(r pagination.Page) ([]StaticNAT, error)
ExtractPortForwardings accepts a Page struct, specifically a PortForwardingPage struct, and extracts the elements into a slice of PortForwarding structs. In other words, a generic collection is mapped into a relevant slice.
type StaticNatPage ¶
type StaticNatPage struct {
pagination.LinkedPageBase
}
PortForwardingPage is the page returned by a pager when traversing over a collection of port forwardings.
func (StaticNatPage) IsEmpty ¶
func (r StaticNatPage) IsEmpty() (bool, error)
IsEmpty checks whether a PortForwardingPage struct is empty.
func (StaticNatPage) NextPageURL ¶
func (r StaticNatPage) NextPageURL() (string, error)
NextPageURL is invoked when a paginated collection of port forwardings has reached the end of a page and the pager seeks to traverse over a new one. In order to do this, it needs to construct the next page's URL.
type UpdateResult ¶
type UpdateResult struct {
// contains filtered or unexported fields
}
UpdateResult represents the result of an update operation. Call its Extract method to interpret it as a PortForwarding.
func (UpdateResult) ExtractInfo ¶
func (r UpdateResult) ExtractInfo() (*CreateStaticNatResponse, error)
func (UpdateResult) ExtractInto ¶
func (r UpdateResult) ExtractInto(v interface{}) error