bandwidths

package
v0.5.15 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2022 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List added in v0.5.6

func List(client *golangsdk.ServiceClient) pagination.Pager

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"`

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

	// CreatedAt is the date when the Bandwidth was created.
	CreatedAt string `json:"created_at"`

	// UpdatedAt is the date when the last change was made to the Bandwidth.
	UpdatedAt string `json:"updated_at"`
}

func ExtractBandwidths added in v0.5.6

func ExtractBandwidths(r pagination.Page) ([]Bandwidth, error)

type BandwidthPage added in v0.5.6

type BandwidthPage struct {
	pagination.SinglePageBase
}

func (BandwidthPage) IsEmpty added in v0.5.6

func (r BandwidthPage) IsEmpty() (bool, error)

type CreateOpts

type CreateOpts struct {
	Name string `json:"name" required:"true"`
	Size int    `json:"size" required:"true"`
}

func (CreateOpts) ToBandwidthCreateMap added in v0.5.6

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

type CreateOptsBuilder

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

type CreateResult

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

func Create

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

func Insert

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

func Update

func Update(client *golangsdk.ServiceClient, bandwidthID string, opts UpdateOptsBuilder) (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 RemoveOptsBuilder) (r DeleteResult)

type GetResult added in v0.5.6

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

func Get added in v0.5.6

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

func (GetResult) Extract added in v0.5.6

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

type InsertOpts added in v0.5.6

type InsertOpts struct {
	PublicIpInfo []PublicIpInfoInsertOpts `json:"publicip_info" required:"true"`
}

func (InsertOpts) ToBandwidthInsertMap added in v0.5.6

func (opts InsertOpts) ToBandwidthInsertMap() (map[string]interface{}, error)

type InsertOptsBuilder added in v0.5.6

type InsertOptsBuilder interface {
	ToBandwidthInsertMap() (map[string]interface{}, error)
}

type PublicIpInfo added in v0.5.6

type PublicIpInfo struct {
	// Specifies the tenant ID of the user.
	ID string `json:"publicip_id"`

	// Specifies the elastic IP address.
	Address string `json:"publicip_address"`

	// Specifies the elastic IP v6 address.
	AddressV6 string `json:"publicipv6_address"`

	// Specifies the elastic IP version.
	IPVersion int `json:"ip_version"`

	// Specifies the elastic IP address type.
	Type string `json:"publicip_type"`
}

type PublicIpInfoID

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

type PublicIpInfoInsertOpts added in v0.5.6

type PublicIpInfoInsertOpts struct {
	PublicIpID   string `json:"publicip_id" required:"true"`
	PublicIpType string `json:"publicip_type,omitempty"`
}

type RemoveOpts added in v0.5.6

type RemoveOpts struct {
	ChargeMode   string           `json:"charge_mode" required:"true"`
	Size         int              `json:"size" required:"true"`
	PublicIpInfo []PublicIpInfoID `json:"publicip_info" required:"true"`
}

func (RemoveOpts) ToBandwidthRemoveMap added in v0.5.6

func (opts RemoveOpts) ToBandwidthRemoveMap() (map[string]interface{}, error)

type RemoveOptsBuilder added in v0.5.6

type RemoveOptsBuilder interface {
	ToBandwidthRemoveMap() (map[string]interface{}, error)
}

type UpdateOpts

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

func (UpdateOpts) ToBandwidthUpdateMap added in v0.5.6

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

type UpdateOptsBuilder added in v0.5.6

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

type UpdateResult

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

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