eips

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: Apache-2.0 Imports: 1 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 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 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"`
}

PublicIp is a struct that represents a public ip

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