bandwidths

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2023 License: Apache-2.0 Imports: 1 Imported by: 3

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"`
	// PublicIPInfo  string `json:"publicip_info"`
	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 added in v0.2.0

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

ListOpts allows extensions to add additional parameters to the API.

func (ListOpts) ToBandwidthListQuery added in v0.2.0

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

ToBWListQuery formats a ListOpts into a query string.

type ListOptsBuilder added in v0.2.0

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

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

type ListResult added in v0.2.0

type ListResult struct {
	golangsdk.Result
}

ListResult is a struct which contains the result of list method

func List added in v0.2.0

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 added in v0.2.0

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

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 UpdateOpts

type UpdateOpts struct {
	Size int    `json:"size,omitempty"`
	Name string `json:"name,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