gateways

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

func Delete

func Delete(c *golangsdk.ServiceClient, gatewayId string) error

Delete is a method to remove the specified gateway using its ID.

Types

type CreateOpts

type CreateOpts struct {
	// The gateway name.
	Name string `json:"name" required:"true"`
	// The ID of the VPC to which the gateway belongs.
	VpcId string `json:"router_id" required:"true"`
	// The network ID that VPC have.
	InternalNetworkId string `json:"internal_network_id" required:"true"`
	// The gateway specification.
	Spec string `json:"spec" required:"true"`
	// The gateway description.
	Description string `json:"description,omitempty"`
	// The enterprise project ID to which the gateway belongs.
	EnterpriseProjectId string `json:"enterprise_project_id,omitempty"`
}

CreateOpts is the structure used to create a new gateway for NAT service.

type Gateway

type Gateway struct {
	// The gateway ID.
	ID string `json:"id"`
	// The project ID to which the gateway belongs.
	TenantId string `json:"tenant_id"`
	// The gateway name.
	Name string `json:"name"`
	// The gateway description.
	Description string `json:"description"`
	// The gateway specification.
	Spec string `json:"spec"`
	// The gateway status.
	// The valid values are as follows:
	// + ACTIVE
	// + PENDING_CREATE
	// + PENDING_UPDATE
	// + PENDING_DELETE
	// + INACTIVE
	Status string `json:"status"`
	// The frozen status.
	AdminStateUp bool `json:"admin_state_up"`
	// The creation time.
	CreatedAt string `json:"created_at"`
	// The ID of the VPC to which the gateway belongs.
	RouterId string `json:"router_id"`
	// The network ID that VPC have.
	InternalNetworkId string `json:"internal_network_id"`
	// The enterprise project ID to which the gateway belongs.
	EnterpriseProjectId string `json:"enterprise_project_id"`
}

Gateway is the structure that represents the detail of the NAT gateway.

func Create

func Create(c *golangsdk.ServiceClient, opts CreateOpts) (*Gateway, error)

Create is a method used to create a gateway using given parameters.

func Get

func Get(c *golangsdk.ServiceClient, gatewayId string) (*Gateway, error)

Get is a method used to obtain the gateway detail by its ID.

func List

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

List is a method to query all gateways using given parameters.

func Update

func Update(c *golangsdk.ServiceClient, gatewayId string, opts UpdateOpts) (*Gateway, error)

Update is a method used to modify an existing gateway using given parameters.

type ListOpts

type ListOpts struct {
	// The project ID.
	TenantId string `q:"tenant_id"`
	// The gateway ID.
	ID string `q:"id"`
	// The enterprise project ID to which the gateway belongs.
	EnterpriseProjectId string `q:"enterprise_project_id"`
	// The gateway description.
	Description string `q:"description"`
	// The creation time.
	CreatedAt string `q:"created_at"`
	// The gateway name.
	Name string `q:"name"`
	// The status of the gateway name.
	Status string `q:"status"`
	// The gateway specification.
	Spec string `q:"spec"`
	// The frozen status.
	AdminStateUp string `q:"admin_state_up"`
	// The network ID that VPC have.
	InternalNetworkId string `q:"internal_network_id"`
	// The ID of the VPC to which the gateway belongs.
	VpcId string `q:"router_id"`
	// The ID of the VPC to which the gateway belongs.
	Limit int `q:"limit"`
}

ListOpts allows to filter list data using given parameters.

type UpdateOpts

type UpdateOpts struct {
	// The gateway name.
	Name string `json:"name,omitempty"`
	// The gateway description.
	Description *string `json:"description,omitempty"`
	// The gateway specification.
	Spec string `json:"spec,omitempty"`
}

UpdateOpts is the structure used to modify an existing gateway.

Jump to

Keyboard shortcuts

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