Documentation
¶
Index ¶
- func List(client *golangsdk.ServiceClient, opts ListOptsBuilder) pagination.Pager
- type ApplyOpts
- type ApplyOptsBuilder
- type ApplyResult
- type BandwidthOpts
- type ChangeResult
- type ChangeToPeriodOpts
- type DeleteResult
- type GetResult
- type ListOpts
- type ListOptsBuilder
- type Profile
- type PublicIPPage
- type PublicIp
- type PublicIpOpts
- type UpdateOpts
- type UpdateOptsBuilder
- type UpdateResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(client *golangsdk.ServiceClient, opts ListOptsBuilder) pagination.Pager
Types ¶
type ApplyOpts ¶
type ApplyOpts struct {
IP PublicIpOpts `json:"publicip" required:"true"`
Bandwidth BandwidthOpts `json:"bandwidth" required:"true"`
EnterpriseProjectID string `json:"enterprise_project_id,omitempty"`
//ExtendParam is only valid by v2.0 client
ExtendParam *structs.ChargeInfo `json:"extendParam,omitempty"`
}
ApplyOpts is a struct which is used to create public ip
func (ApplyOpts) ToPublicIpApplyMap ¶
type ApplyOptsBuilder ¶
ApplyOptsBuilder is an interface by which can build the request body of public ip application
type ApplyResult ¶
ApplyResult is a struct which represents the result of apply public ip
func Apply ¶
func Apply(client *golangsdk.ServiceClient, opts ApplyOptsBuilder) (r ApplyResult)
Apply is a method by which can access to apply the public ip
func (ApplyResult) Extract ¶
func (r ApplyResult) Extract() (PublicIp, error)
type BandwidthOpts ¶
type ChangeResult ¶
func ChangeToPeriod ¶
func ChangeToPeriod(c *golangsdk.ServiceClient, opts ChangeToPeriodOpts) (r ChangeResult)
ChangeToPeriod is is used to change the EIP to prePaid billing mode
func (ChangeResult) Extract ¶
func (r ChangeResult) Extract() (string, error)
type ChangeToPeriodOpts ¶
type ChangeToPeriodOpts struct {
PublicIPIDs []string `json:"publicip_ids" required:"true"`
ExtendParam structs.ChargeInfo `json:"extendParam" required:"true"`
}
type DeleteResult ¶
DeleteResult is a struct of delete result
func Delete ¶
func Delete(client *golangsdk.ServiceClient, id string) (r DeleteResult)
Delete is a method by which can be able to delete a private ip
type GetResult ¶
GetResult is a return struct of get method
type ListOpts ¶
type ListOpts struct {
// Specifies the resource ID of pagination query. If the parameter
// is left blank, only resources on the first page are queried.
Marker string `q:"marker"`
// Specifies the number of records returned on each page. The
// value ranges from 0 to intmax.
Limit int `q:"limit"`
// Value range: 4, 6, respectively, to create ipv4 and ipv6, when not created ipv4 by default
IPVersion int `q:"ip_version"`
// Associated port id
PortId []string `q:"port_id"`
// Public IP address
PublicIp []string `q:"public_ip_address"`
// private IP address
PrivateIp []string `q:"private_ip_address"`
// ID
Id []string `q:"id"`
// enterprise_project_id
// You can use this field to filter the elastic public IP under an enterprise project.
EnterpriseProjectId string `q:"enterprise_project_id"`
}
func (ListOpts) ToListPublicIPQuery ¶
type ListOptsBuilder ¶
type PublicIPPage ¶
type PublicIPPage struct {
pagination.LinkedPageBase
}
func (PublicIPPage) IsEmpty ¶
func (r PublicIPPage) IsEmpty() (bool, error)
IsEmpty checks whether a NetworkPage struct is empty.
func (PublicIPPage) NextPageURL ¶
func (r PublicIPPage) NextPageURL() (string, error)
type PublicIp ¶
type PublicIp struct {
ID string `json:"id"`
Status string `json:"status"`
Type string `json:"type"`
PublicAddress string `json:"public_ip_address"`
PublicIpv6Address string `json:"public_ipv6_address"`
PrivateAddress string `json:"private_ip_address"`
PortID string `json:"port_id"`
TenantID string `json:"tenant_id"`
OrderID string `json:"order_id"`
CreateTime string `json:"create_time"`
BandwidthID string `json:"bandwidth_id"`
BandwidthName string `json:"bandwidth_name"`
BandwidthSize int `json:"bandwidth_size"`
EnterpriseProjectID string `json:"enterprise_project_id"`
IpVersion int `json:"ip_version"`
Alias string `json:"alias"`
Profile Profile `json:"profile"`
Tags []string `json:"tags"`
}
PublicIp is a struct that represents a public ip
func ExtractPublicIPs ¶
func ExtractPublicIPs(r pagination.Page) ([]PublicIp, error)
type PublicIpOpts ¶
type UpdateOpts ¶
type UpdateOpts struct {
PortID string `json:"port_id,omitempty"`
Alias *string `json:"alias,omitempty"`
IPVersion int `json:"ip_version,omitempty"`
}
UpdateOpts is a struct which represents the request body of update method NOTE: ip_version and port_id can not be updated at the same time
func (UpdateOpts) ToPublicIpUpdateMap ¶
func (opts UpdateOpts) ToPublicIpUpdateMap() (map[string]interface{}, error)
type UpdateOptsBuilder ¶
UpdateOptsBuilder is an interface by which can be able to build the request body
type UpdateResult ¶
UpdateResult is a struct which contains the result of update method
func Update ¶
func Update(client *golangsdk.ServiceClient, id string, opts UpdateOptsBuilder) (r UpdateResult)
Update is a method which can be able to update the port of public ip
func (UpdateResult) Extract ¶
func (r UpdateResult) Extract() (PublicIp, error)