Documentation ¶
Index ¶
- func DeleteURL(c *golangsdk.ServiceClient, publicipId string) string
- func ExtractPublicIPs(r pagination.Page) ([]common.PublicIP, error)
- func GetURL(c *golangsdk.ServiceClient, publicipId string) string
- func UpdateURL(c *golangsdk.ServiceClient, publicipId string) string
- type BandWidth
- type CommonPublicIP
- type CreateOpts
- type CreateOptsBuilder
- type CreateResult
- type DeleteResult
- type GetResult
- type ListOpts
- type ListPublicIPsOptsBuilder
- type ListResult
- type PublicIPCreateResp
- type PublicIPPage
- type PublicIPRequest
- type PublicIPUpdateResp
- type PublicIPs
- type UpdateOpts
- type UpdateOptsBuilder
- type UpdateResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractPublicIPs ¶
func ExtractPublicIPs(r pagination.Page) ([]common.PublicIP, error)
Types ¶
type BandWidth ¶
type BandWidth struct { // Specifies the bandwidth name. The value is a string of 1 to 64 // characters that can contain letters, digits, underscores (_), and hyphens (-). This // parameter is mandatory when share_type is set to PER and is optional when share_type // is set to WHOLE with an ID specified. Name string `json:"name,omitempty"` // Specifies the bandwidth size. The value ranges from 1 Mbit/s to // 300 Mbit/s. This parameter is mandatory when share_type is set to PER and is optional // when share_type is set to WHOLE with an ID specified. Size int `json:"size,omitempty"` // Specifies the ID of the bandwidth. You can specify an earlier // shared bandwidth when applying for an elastic IP address for the bandwidth whose type // is set to WHOLE. The bandwidth whose type is set to WHOLE exclusively uses its own // ID. The value can be the ID of the bandwidth whose type is set to WHOLE. ID string `json:"id,omitempty"` // value can be PER or WHOLE. ShareType string `json:"share_type"` // Specifies the charging mode (by traffic or by bandwidth). The // value can be bandwidth or traffic. If the value is an empty character string or no // value is specified, default value bandwidth is used. ChargeMode string `json:"charge_mode,omitempty"` }
type CommonPublicIP ¶
type CommonPublicIP struct { // Specifies the ID of the elastic IP address, which uniquely // identifies the elastic IP address. ID string `json:"id"` // Specifies the status of the elastic IP address. Status string `json:"status"` // Specifies the obtained elastic IP address. PublicIpAddress string `json:"public_ip_address"` // Value range: 4, 6, respectively, to create ipv4 and ipv6, when not created ipv4 by default IPVersion int `json:"ip_version"` // Specifies the time for applying for the elastic IP address. CreateTime string `json:"create_time"` // Specifies the Siteid. SiteID string `json:"site_id"` // SiteInfo SiteInfo string `json:"site_info"` //Operator information Operator common.Operator `json:"operator"` }
type CreateOpts ¶
type CreateOpts struct { // Specifies the elastic IP address objects. Publicip PublicIPRequest `json:"publicip" required:"true"` // Specifies the bandwidth objects. Bandwidth BandWidth `json:"bandwidth"` }
func (CreateOpts) ToCreatePublicIPMap ¶
func (opts CreateOpts) ToCreatePublicIPMap() (map[string]interface{}, error)
type CreateOptsBuilder ¶
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
func (CreateResult) Extract ¶
func (r CreateResult) Extract() (*PublicIPCreateResp, error)
type DeleteResult ¶
func Delete ¶
func Delete(client *golangsdk.ServiceClient, publicipId string) (r DeleteResult)
type ListOpts ¶
type ListOpts struct { Limit int `q:"limit"` Offset int `q:"offset"` PortID string `q:"port_id"` SiteID string `q:"site_id"` }
func (ListOpts) ToListPublicIPsQuery ¶
type ListResult ¶
type ListResult struct {
// contains filtered or unexported fields
}
func List ¶
func List(client *golangsdk.ServiceClient, opts ListPublicIPsOptsBuilder) (r ListResult)
func (ListResult) Extract ¶
func (r ListResult) Extract() (*PublicIPs, error)
type PublicIPCreateResp ¶
type PublicIPCreateResp struct { CommonPublicIP // Specifies the bandwidth size. BandwidthSize int `json:"bandwidth_size"` Region string `json:"region,omitempty"` }
type PublicIPPage ¶
type PublicIPPage struct {
pagination.LinkedPageBase
}
func (PublicIPPage) IsEmpty ¶
func (r PublicIPPage) IsEmpty() (bool, error)
IsEmpty checks whether a NetworkPage struct is empty.
type PublicIPRequest ¶
type PublicIPRequest struct { // Specifies the type of the elastic IP address. The value can the // 5_telcom, 5_union, 5_bgp, or 5_sbgp. China Northeast: 5_telcom and 5_union China // South: 5_sbgp China East: 5_sbgp China North: 5_bgp and 5_sbgp The value must be a // type supported by the system. The value can be 5_telcom, 5_union, or 5_bgp. Type string `json:"type"` // Specifies the elastic IP address to be obtained. The value must // be a valid IP address in the available IP address segment. IpAddress string `json:"ip_address,omitempty"` //Value range: 4, 6, respectively, to create ipv4 and ipv6, when not created ipv4 by default IPVersion string `json:"ip_version,omitempty"` SiteID string `json:"site_id,omitempty"` }
type PublicIPUpdateResp ¶
type PublicIPUpdateResp struct { CommonPublicIP // Specifies the private IP address bound to the elastic IP address. PrivateIpAddress string `json:"private_ip_address"` // Specifies the port ID. PortID string `json:"port_id"` // Specifies the bandwidth size. BandwidthSize int `json:"bandwidth_size"` // Specifies the bandwidth ID of the elastic IP address. BandwidthID string `json:"bandwidth_id"` BandwidthShareType string `json:"bandwidth_share_type"` // Specifies the bandwidth name. BandwidthName string `json:"bandwidth_name"` }
type UpdateOpts ¶
type UpdateOpts struct { // Specifies the port ID. PortId string `json:"port_id,omitempty"` //Value range: 4, 6, respectively, to create ipv4 and ipv6, when not created ipv4 by default IPVersion int `json:"ip_version,omitempty"` }
func (UpdateOpts) ToUpdatePublicIPMap ¶
func (opts UpdateOpts) ToUpdatePublicIPMap() (map[string]interface{}, error)
type UpdateOptsBuilder ¶
type UpdateResult ¶
type UpdateResult struct {
// contains filtered or unexported fields
}
func Update ¶
func Update(client *golangsdk.ServiceClient, publicipId string, opts UpdateOptsBuilder) (r UpdateResult)
func (UpdateResult) Extract ¶
func (r UpdateResult) Extract() (*PublicIPUpdateResp, error)
Click to show internal directories.
Click to hide internal directories.