Documentation ¶
Index ¶
- func BatchPostURL(c *gophercloud.ServiceClient) string
- func DeleteURL(c *gophercloud.ServiceClient, ID string) string
- func InsertURL(c *gophercloud.ServiceClient, ID string) string
- func PostURL(c *gophercloud.ServiceClient) string
- func RemoveURL(c *gophercloud.ServiceClient, ID string) string
- func Update(c *gophercloud.ServiceClient, bandwidthID string, opts UpdateOpts) (interface{}, error)
- func UpdateURL(c *gophercloud.ServiceClient, ID string) string
- type BandWidth
- type BandWidthInsertOpts
- type BandWidthInsertOptsBuilder
- type BandWidthRemoveOpts
- type BandWidthRemoveOptsBuilder
- type Bandwidth
- type BatchCreateOpts
- type BatchCreateOptsBuilder
- type BatchCreateResult
- type CreateOpts
- type CreateOptsBuilder
- type CreateResult
- type DeleteResult
- type ExtendParam
- type PostPaid
- type PrePaid
- type PublicIpInfoID
- type PublicIpinfo
- type PublicipInfo
- type UpdateOpts
- type UpdateResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BatchPostURL ¶
func BatchPostURL(c *gophercloud.ServiceClient) string
func DeleteURL ¶
func DeleteURL(c *gophercloud.ServiceClient, ID string) string
func InsertURL ¶
func InsertURL(c *gophercloud.ServiceClient, ID string) string
func PostURL ¶
func PostURL(c *gophercloud.ServiceClient) string
func RemoveURL ¶
func RemoveURL(c *gophercloud.ServiceClient, ID string) string
func Update ¶
func Update(c *gophercloud.ServiceClient, bandwidthID string, opts UpdateOpts) (interface{}, error)
func UpdateURL ¶
func UpdateURL(c *gophercloud.ServiceClient, ID string) string
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 (-). Name string `json:"name"` // Specifies the bandwidth size. The value ranges from 1 Mbit/s to // 300 Mbit/s. Size int `json:"size"` // Specifies the bandwidth ID, which uniquely identifies the // bandwidth. ID string `json:"id"` // value can be PER or WHOLE. ShareType string `json:"share_type"` // Specifies the elastic IP address of the bandwidth. The // bandwidth, whose type is set to WHOLE, supports up to 20 elastic IP addresses. The // bandwidth, whose type is set to PER, supports only one elastic IP address. PublicipInfo []PublicIpinfo `json:"publicip_info"` // Specifies the tenant ID of the user. TenantId string `json:"tenant_id"` // Specifies the bandwidth type. BandwidthType string `json:"bandwidth_type"` // Specifies the charging mode (by traffic or by bandwidth). ChargeMode string `json:"charge_mode"` // Specifies the billing information. BillingInfo string `json:"billing_info"` // Enterprise project id EnterpriseProjectID string `json:"enterprise_project_id"` // Status Status string `json:"status"` }
type BandWidthInsertOpts ¶
type BandWidthInsertOpts struct {
PublicipInfo []PublicIpInfoID `json:"publicip_info" required:"true"`
}
func (BandWidthInsertOpts) ToBandWidthInsertMap ¶
func (opts BandWidthInsertOpts) ToBandWidthInsertMap() (map[string]interface{}, error)
type BandWidthRemoveOpts ¶
type BandWidthRemoveOpts struct { ChargeMode string `json:"charge_mode" required:"true"` Size *int `json:"size" required:"true"` PublicipInfo []PublicIpInfoID `json:"publicip_info" required:"true"` }
func (BandWidthRemoveOpts) ToBandWidthBatchRemoveMap ¶
func (opts BandWidthRemoveOpts) ToBandWidthBatchRemoveMap() (map[string]interface{}, error)
type BatchCreateOpts ¶
type BatchCreateOpts struct { Name string `json:"name" required:"true"` Size *int `json:"size" required:"true"` Count *int `json:"count" required:"true"` }
func (BatchCreateOpts) ToBandWidthBatchCreateMap ¶
func (opts BatchCreateOpts) ToBandWidthBatchCreateMap() (map[string]interface{}, error)
type BatchCreateOptsBuilder ¶
type BatchCreateResult ¶
type BatchCreateResult struct {
gophercloud.Result
}
func BatchCreate ¶
func BatchCreate(client *gophercloud.ServiceClient, opts BatchCreateOptsBuilder) (r BatchCreateResult)
func (BatchCreateResult) Extract ¶
func (r BatchCreateResult) Extract() (*[]BandWidth, error)
type CreateOpts ¶
type CreateOpts struct { Name string `json:"name" required:"true"` Size *int `json:"size" required:"true"` EnterpriseProjectId string `json:"enterprise_project_id,omitempty"` }
func (CreateOpts) ToBandWidthCreateMap ¶
func (opts CreateOpts) ToBandWidthCreateMap() (map[string]interface{}, error)
type CreateOptsBuilder ¶
type CreateResult ¶
type CreateResult struct {
gophercloud.Result
}
func Create ¶
func Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
func Insert ¶
func Insert(client *gophercloud.ServiceClient, bandwidthID string, opts BandWidthInsertOptsBuilder) (r CreateResult)
func (CreateResult) Extract ¶
func (r CreateResult) Extract() (*BandWidth, error)
type DeleteResult ¶
type DeleteResult struct {
gophercloud.ErrResult
}
func Delete ¶
func Delete(client *gophercloud.ServiceClient, bandwidthID string) (r DeleteResult)
func Remove ¶
func Remove(client *gophercloud.ServiceClient, bandwidthID string, opts BandWidthRemoveOptsBuilder) (r DeleteResult)
type ExtendParam ¶
type ExtendParam struct {
IsAutoPay string `json:"is_auto_pay,omitempty"`
}
type PostPaid ¶
type PostPaid struct { Name string `json:"name"` Size int `json:"size"` ID string `json:"id"` Status string `json:"status"` ChargeMode string `json:"charge_mode"` BandwidthType string `json:"bandwidth_type"` TenantID string `json:"tenant_id"` PublicipInfo []PublicipInfo `json:"publicip_info"` EnterpriseProjectID string `json:"enterprise_project_id"` }
type PublicIpInfoID ¶
type PublicIpInfoID struct {
PublicIPID string `json:"publicip_id" required:"true"`
}
type PublicIpinfo ¶
type PublicIpinfo struct { // Specifies the tenant ID of the user. PublicipId string `json:"publicip_id"` // Specifies the elastic IP address. PublicipAddress string `json:"publicip_address"` // Specifies the elastic IP v6 address. Publicipv6Address string `json:"publicipv6_address"` // Specifies the elastic IP version. IPVersion int `json:"ip_version"` // Specifies the elastic IP address type. The value can be // 5_telcom, 5_union, or 5_bgp. PublicipType string `json:"publicip_type"` }
type PublicipInfo ¶
type UpdateOpts ¶
type UpdateOpts struct { Bandwidth Bandwidth `json:"bandwidth" required:"true"` ExtendParam *ExtendParam `json:"extendParam,omitempty"` }
func (UpdateOpts) ToBandWidthUpdateMap ¶
func (opts UpdateOpts) ToBandWidthUpdateMap() (map[string]interface{}, error)
type UpdateResult ¶
type UpdateResult struct {
gophercloud.Result
}
func (UpdateResult) Extract ¶
func (r UpdateResult) Extract() (PostPaid, error)
func (UpdateResult) ExtractOrderID ¶
func (r UpdateResult) ExtractOrderID() (PrePaid, error)
Click to show internal directories.
Click to hide internal directories.