bandwidths

package
v1.0.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

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"`

	// Specifies whether the bandwidth is shared or exclusive. The
	// 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 BandWidthInsertOptsBuilder

type BandWidthInsertOptsBuilder interface {
	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 BandWidthRemoveOptsBuilder

type BandWidthRemoveOptsBuilder interface {
	ToBandWidthBatchRemoveMap() (map[string]interface{}, error)
}

type Bandwidth

type Bandwidth struct {
	Name string `json:"name,omitempty"`
	Size int    `json:"size,omitempty"`
}

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 BatchCreateOptsBuilder interface {
	ToBandWidthBatchCreateMap() (map[string]interface{}, error)
}

type BatchCreateResult

type BatchCreateResult struct {
	gophercloud.Result
}

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 CreateOptsBuilder interface {
	ToBandWidthCreateMap() (map[string]interface{}, error)
}

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"`
	ShareType           string         `json:"share_type"`
	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 PrePaid

type PrePaid struct {
	OrderID string `json:"order_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 PublicipInfo struct {
	PublicipID        string `json:"publicip_id"`
	PublicIPAddress   string `json:"publicip_address"`
	Publicipv6Address string `json:"publicipv_6_address"`
	IpVersion         int    `json:"ip_version"`
	PublicipType      string `json:"publicip_type"`
}

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)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL