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

bandwidths

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2021 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BatchPostURL

func BatchPostURL(c *golangsdk.ServiceClient) string

func DeleteURL

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

func InsertURL

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

func PostURL

func PostURL(c *golangsdk.ServiceClient) string

func RemoveURL

func RemoveURL(c *golangsdk.ServiceClient, ID string) string

func Update

func Update(c *golangsdk.ServiceClient, bandwidthID string, opts UpdateOpts) (interface{}, error)

func UpdateURL

func UpdateURL(c *golangsdk.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 {
	golangsdk.Result
}

func BatchCreate

func BatchCreate(client *golangsdk.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 CreateOptsBuilder interface {
	ToBandWidthCreateMap() (map[string]interface{}, error)
}

type CreateResult

type CreateResult struct {
	golangsdk.Result
}

func Create

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

func Insert

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

func (CreateResult) Extract

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

type DeleteResult

type DeleteResult struct {
	golangsdk.ErrResult
}

func Delete

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

func Remove

func Remove(client *golangsdk.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"`
	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 {
	golangsdk.Result
}

func (UpdateResult) Extract

func (r UpdateResult) Extract() (PostPaid, error)

func (UpdateResult) ExtractOrderID

func (r UpdateResult) ExtractOrderID() (PrePaid, error)

Jump to

Keyboard shortcuts

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