bandwidths

package
v0.0.0-...-63319d1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MPL-2.0, Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetURL

func GetURL(c *golangsdk.ServiceClient, bandwidthID string) string

func UpdateURL

func UpdateURL(c *golangsdk.ServiceClient, bandwidthID string) string

Types

type BandWidthObject

type BandWidthObject struct {
	BandWidth common.Bandwidth `json:"bandwidth"`
}

BandWidthObject 带宽的结构体,用于创建和更新请求

type BandWidths

type BandWidths struct {
	BandWidth []common.Bandwidth `json:"bandwidths"`
	Count     int                `json:"count"`
}

BandWidths 共享带宽列表对象

type GetResult

type GetResult struct {
	// contains filtered or unexported fields
}

func Get

func Get(client *golangsdk.ServiceClient, bandwidthId string) (r GetResult)

func (GetResult) Extract

func (r GetResult) Extract() (*BandWidthObject, error)

type ListBandwidthsOptsBuilder

type ListBandwidthsOptsBuilder interface {
	ToListBandwidthsQuery() (string, error)
}

type ListOpts

type ListOpts struct {
	Limit  int    `q:"limit"`
	Offset int    `q:"offset"`
	SiteID string `q:"site_id"`
}

func (ListOpts) ToListBandwidthsQuery

func (opts ListOpts) ToListBandwidthsQuery() (string, error)

type ListResult

type ListResult struct {
	// contains filtered or unexported fields
}

func List

func List(client *golangsdk.ServiceClient, opts ListBandwidthsOptsBuilder) (r ListResult)

func (ListResult) Extract

func (r ListResult) Extract() (*BandWidths, error)

type UpdateOpts

type UpdateOpts 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,omitempty"`

	// Specifies the bandwidth size. The value ranges from 1 Mbit/s to
	// 300 Mbit/s.
	Size int `json:"size,omitempty"`
}

func (UpdateOpts) ToBandwidthsUpdateMap

func (opts UpdateOpts) ToBandwidthsUpdateMap() (map[string]interface{}, error)

type UpdateOptsBuilder

type UpdateOptsBuilder interface {
	ToBandwidthsUpdateMap() (map[string]interface{}, error)
}

type UpdateResult

type UpdateResult struct {
	// contains filtered or unexported fields
}

func Update

func Update(client *golangsdk.ServiceClient, bandwidthId string, opts UpdateOptsBuilder) (r UpdateResult)

func (UpdateResult) Extract

func (r UpdateResult) Extract() (*BandWidthObject, error)

Jump to

Keyboard shortcuts

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