Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplyOpts ¶
type ApplyOpts struct { IP PublicIpOpts `json:"publicip" required:"true"` Bandwidth BandwidthOpts `json:"bandwidth" required:"true"` }
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 ¶
type ApplyResult struct {
golangsdk.Result
}
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 DeleteResult ¶
type DeleteResult struct {
golangsdk.ErrResult
}
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 ¶
type GetResult struct {
golangsdk.Result
}
GetResult is a return struct of get method
type PublicIp ¶
type PublicIp struct { ID string `json:"id"` Status string `json:"status"` Type string `json:"type"` PublicAddress string `json:"public_ip_address"` PrivateAddress string `json:"private_ip_address"` PortID string `json:"port_id"` TenantID string `json:"tenant_id"` CreateTime string `json:"create_time"` BandwidthID string `json:"bandwidth_id"` BandwidthSize int `json:"bandwidth_size"` }
PublicIp is a struct that represents a public ip
type PublicIpOpts ¶
type UpdateOpts ¶
type UpdateOpts struct {
PortID string `json:"port_id,omitempty"`
}
UpdateOpts is a struct which represents the request body of update method
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 ¶
type UpdateResult struct {
golangsdk.Result
}
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)