Help us shape the future of Go! Take the 2026 Go Developer Survey

bandwidths

package
v1.0.21 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BatchPostURL added in v1.0.21

func BatchPostURL(c *gophercloud.ServiceClient) string

func DeleteURL added in v1.0.21

func DeleteURL(c *gophercloud.ServiceClient, ID string) string

func InsertURL added in v1.0.21

func InsertURL(c *gophercloud.ServiceClient, ID string) string

func PostURL added in v1.0.21

func PostURL(c *gophercloud.ServiceClient) string

func RemoveURL added in v1.0.21

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 added in v1.0.21

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 added in v1.0.21

type BandWidthInsertOpts struct {
	PublicipInfo []PublicIpInfoID `json:"publicip_info" required:"true"`
}

func (BandWidthInsertOpts) ToBandWidthInsertMap added in v1.0.21

func (opts BandWidthInsertOpts) ToBandWidthInsertMap() (map[string]interface{}, error)

type BandWidthInsertOptsBuilder added in v1.0.21

type BandWidthInsertOptsBuilder interface {
	ToBandWidthInsertMap() (map[string]interface{}, error)
}

type BandWidthRemoveOpts added in v1.0.21

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 added in v1.0.21

func (opts BandWidthRemoveOpts) ToBandWidthBatchRemoveMap() (map[string]interface{}, error)

type BandWidthRemoveOptsBuilder added in v1.0.21

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 added in v1.0.21

type BatchCreateOpts struct {
	Name  string `json:"name" required:"true"`
	Size  *int   `json:"size" required:"true"`
	Count *int   `json:"count" required:"true"`
}

func (BatchCreateOpts) ToBandWidthBatchCreateMap added in v1.0.21

func (opts BatchCreateOpts) ToBandWidthBatchCreateMap() (map[string]interface{}, error)

type BatchCreateOptsBuilder added in v1.0.21

type BatchCreateOptsBuilder interface {
	ToBandWidthBatchCreateMap() (map[string]interface{}, error)
}

type BatchCreateResult added in v1.0.21

type BatchCreateResult struct {
	gophercloud.Result
}

func BatchCreate added in v1.0.21

func (BatchCreateResult) Extract added in v1.0.21

func (r BatchCreateResult) Extract() (*[]BandWidth, error)

type CreateOpts added in v1.0.21

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 added in v1.0.21

func (opts CreateOpts) ToBandWidthCreateMap() (map[string]interface{}, error)

type CreateOptsBuilder added in v1.0.21

type CreateOptsBuilder interface {
	ToBandWidthCreateMap() (map[string]interface{}, error)
}

type CreateResult added in v1.0.21

type CreateResult struct {
	gophercloud.Result
}

func Create added in v1.0.21

func Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder) (r CreateResult)

func Insert added in v1.0.21

func Insert(client *gophercloud.ServiceClient, bandwidthID string, opts BandWidthInsertOptsBuilder) (r CreateResult)

func (CreateResult) Extract added in v1.0.21

func (r CreateResult) Extract() (*BandWidth, error)

type DeleteResult added in v1.0.21

type DeleteResult struct {
	gophercloud.ErrResult
}

func Delete added in v1.0.21

func Delete(client *gophercloud.ServiceClient, bandwidthID string) (r DeleteResult)

func Remove added in v1.0.21

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 added in v1.0.21

type PublicIpInfoID struct {
	PublicIPID string `json:"publicip_id" required:"true"`
}

type PublicIpinfo added in v1.0.21

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