Documentation ¶
Index ¶
- func Delete(c *golangsdk.ServiceClient, gatewayId string) error
- type CreateOpts
- type Gateway
- func Create(c *golangsdk.ServiceClient, opts CreateOpts) (*Gateway, error)
- func Get(c *golangsdk.ServiceClient, gatewayId string) (*Gateway, error)
- func List(client *golangsdk.ServiceClient, opts ListOpts) ([]Gateway, error)
- func Update(c *golangsdk.ServiceClient, gatewayId string, opts UpdateOpts) (*Gateway, error)
- type ListOpts
- type UpdateOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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.
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.
Click to show internal directories.
Click to hide internal directories.