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: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BandWidth

type BandWidth struct {
	ID            string `json:"id"`
	Name          string `json:"name"`
	Size          int    `json:"size"`
	ShareType     string `json:"share_type"`
	TenantID      string `json:"tenant_id"`
	BandwidthType string `json:"bandwidth_type"`
	ChargeMode    string `json:"charge_mode"`

	PublicipInfo []PublicIpinfo `json:"publicip_info"`

	// Specifies the billing information.
	BillingInfo string `json:"billing_info"`

	// Enterprise project id
	EnterpriseProjectID string `json:"enterprise_project_id"`

	// Status
	Status string `json:"status"`
}

BandWidth is a struct that represents a bandwidth

type GetResult

type GetResult struct {
	golangsdk.Result
}

GetResult is a return struct of get method

func Get

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

Get is a method by which can get the detailed information of a bandwidth

func (GetResult) Extract

func (r GetResult) Extract() (BandWidth, error)

type ListOpts

type ListOpts struct {
	EnterpriseProjectID string `q:"enterprise_project_id"`
}

ListOpts allows extensions to add additional parameters to the API.

func (ListOpts) ToBWListQuery

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

ToBWListQuery formats a ListOpts into a query string.

type ListOptsBuilder

type ListOptsBuilder interface {
	ToBWListQuery() (string, error)
}

ListOptsBuilder allows extensions to add additional parameters to the List request.

type ListResult

type ListResult struct {
	golangsdk.Result
}

ListResult is a struct which contains the result of list method

func List

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

List is a method by which can get the detailed information of all bandwidths

func (ListResult) Extract

func (r ListResult) Extract() ([]BandWidth, error)

type PublicIpinfo

type PublicIpinfo struct {
	// Specifies the ID of EIP or IPv6 port that use the bandwidth
	PublicipId string `json:"publicip_id"`

	// Specifies the elastic IP address.
	PublicipAddress string `json:"publicip_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 UpdateOpts

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

UpdateOpts is a struct which represents the request body of update method

func (UpdateOpts) ToBWUpdateMap

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

type UpdateOptsBuilder

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

UpdateOptsBuilder is an interface by which can be able to build the request body

type UpdateResult

type UpdateResult struct {
	golangsdk.Result
}

UpdateResult is a struct which contains the result of update method

func Update

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

Update is a method which can be able to update the port of public ip

func (UpdateResult) Extract

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

Jump to

Keyboard shortcuts

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