eips

package
v0.5.10 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2022 License: Apache-2.0 Imports: 4 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplyOpts

type ApplyOpts struct {
	IP        PublicIpOpts  `json:"publicip" required:"true"`
	Bandwidth BandwidthOpts `json:"bandwidth" required:"true"`
}

ApplyOpts is a struct which is used to create public ip

func (ApplyOpts) ToPublicIpApplyMap

func (opts ApplyOpts) ToPublicIpApplyMap() (map[string]interface{}, error)

type ApplyOptsBuilder

type ApplyOptsBuilder interface {
	ToPublicIpApplyMap() (map[string]interface{}, error)
}

ApplyOptsBuilder is an interface by which can build the request body of public ip application

type ApplyResult

type ApplyResult struct {
	golangsdk.Result
}

ApplyResult is a struct which represents the result of apply public ip

func Apply

func Apply(client *golangsdk.ServiceClient, opts ApplyOptsBuilder) (r ApplyResult)

Apply is a method by which can access to apply the public ip

func (ApplyResult) Extract

func (r ApplyResult) Extract() (*PublicIp, error)

type BandwidthOpts

type BandwidthOpts struct {
	Name       string `json:"name,omitempty"`
	Size       int    `json:"size,omitempty"`
	Id         string `json:"id,omitempty"`
	ShareType  string `json:"share_type" required:"true"`
	ChargeMode string `json:"charge_mode,omitempty"`
}

type DeleteResult

type DeleteResult struct {
	golangsdk.ErrResult
}

DeleteResult is a struct of delete result

func Delete

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

Delete is a method by which can be able to delete a private ip

type EipPage added in v0.2.5

type EipPage struct {
	pagination.MarkerPageBase
}

EipPage is a single page of Flavor results.

func (EipPage) IsEmpty added in v0.2.5

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

IsEmpty returns true if a page contains no results.

func (EipPage) LastMarker added in v0.2.5

func (r EipPage) LastMarker() (string, error)

LastMarker returns the last Eip ID in a ListResult.

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 public ip

func (GetResult) Extract

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

type ListOpts added in v0.2.5

type ListOpts struct {
	// ID is the unique identifier for the ElasticIP.
	ID string `json:",omitempty"`

	// Status indicates whether or not a ElasticIP is currently operational.
	Status string `json:",omitempty"`

	// PrivateAddress of the resource with assigned ElasticIP.
	PrivateAddress string `json:",omitempty"`

	// PublicAddress of the ElasticIP.
	PublicAddress string `json:",omitempty"`

	// PortID of the resource with assigned ElasticIP.
	PortID string `json:",omitempty"`

	// BandwidthID of the ElasticIP.
	BandwidthID string `json:",omitempty"`
}

ListOpts filters the results returned by the List() function.

func (ListOpts) ToEipListQuery added in v0.2.5

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

ToEipListQuery formats a ListOpts into a query string.

type ListOptsBuilder added in v0.2.5

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

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

type PublicIp

type PublicIp struct {
	ID                 string `json:"id"`
	Status             string `json:"status"`
	Type               string `json:"type"`
	PublicAddress      string `json:"public_ip_address"`
	PrivateAddress     string `json:"private_ip_address"`
	PortID             string `json:"port_id"`
	TenantID           string `json:"tenant_id"`
	CreateTime         string `json:"create_time"`
	BandwidthID        string `json:"bandwidth_id"`
	BandwidthSize      int    `json:"bandwidth_size"`
	BandwidthShareType string `json:"bandwidth_share_type"`
	IpVersion          int    `json:"ip_version"`
}

PublicIp is a struct that represents a public ip

func ExtractEips added in v0.2.5

func ExtractEips(r pagination.Page) ([]PublicIp, error)

ExtractEips extracts and returns Public IPs. It is used while iterating over a public ips.

func FilterPublicIPs added in v0.4.0

func FilterPublicIPs(publicIPs []PublicIp, opts ListOpts) ([]PublicIp, error)

func List added in v0.2.5

func List(client *golangsdk.ServiceClient, opts ListOpts) ([]PublicIp, error)

List instructs OpenStack to provide a list of flavors.

type PublicIpOpts

type PublicIpOpts struct {
	Type    string `json:"type" required:"true"`
	Address string `json:"ip_address,omitempty"`
}

type UpdateOpts

type UpdateOpts struct {
	PortID string `json:"port_id,omitempty"`
}

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

func (UpdateOpts) ToPublicIpUpdateMap

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

type UpdateOptsBuilder

type UpdateOptsBuilder interface {
	ToPublicIpUpdateMap() (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() (*PublicIp, error)

Jump to

Keyboard shortcuts

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