natgateways

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2021 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

func List(c *golangsdk.ServiceClient, opts ListOptsBuilder) pagination.Pager

Types

type CreateOpts

type CreateOpts struct {
	Name              string `json:"name" required:"true"`
	Description       string `json:"description,omitempty"`
	Spec              string `json:"spec" required:"true"`
	RouterID          string `json:"router_id" required:"true"`
	InternalNetworkID string `json:"internal_network_id" required:"true"`
	TenantID          string `json:"tenant_id,omitempty"`
}

CreateOpts contains all the values needed to create a new nat gateway resource.

func (CreateOpts) ToNatGatewayCreateMap

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

ToNatGatewayCreateMap allows CreateOpts to satisfy the CreateOptsBuilder interface

type CreateOptsBuilder

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

CreateOptsBuilder is an interface must satisfy to be used as Create options.

type CreateResult

type CreateResult struct {
	golangsdk.Result
}

CreateResult is a return struct of create method

func Create

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

Create is a method by which can create a new nat gateway

func (CreateResult) Extract

func (r CreateResult) Extract() (NatGateway, error)

type DeleteResult

type DeleteResult struct {
	golangsdk.ErrResult
}

DeleteResult is a return struct of delete method

func Delete

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

Delete is a method by which can be able to delete a nat gateway

type GetResult

type GetResult struct {
	golangsdk.Result
}

GetResult is a return struct of get method

func Get

func Get(c *golangsdk.ServiceClient, id string) (r GetResult)

Get is a method by which can get the detailed information of the specified nat gateway.

func (GetResult) Extract

func (r GetResult) Extract() (NatGateway, error)

type ListOpts

type ListOpts struct {
	Limit             int    `q:"limit"`
	ID                string `q:"id"`
	Name              string `q:"name"`
	TenantId          string `q:"tenant_id"`
	Description       string `q:"description"`
	Spec              string `q:"spec"`
	RouterID          string `q:"router_id"`
	InternalNetworkID string `q:"internal_network_id"`
	Status            string `q:"status"`
	AdminStateUp      *bool  `q:"admin_state_up"`
	CreatedAt         string `q:"created_at"`
}

func (ListOpts) ToNatGatewayListQuery

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

type ListOptsBuilder

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

type NatGateway

type NatGateway struct {
	ID                string `json:"id"`
	Name              string `json:"name"`
	Description       string `json:"description"`
	RouterID          string `json:"router_id"`
	InternalNetworkID string `json:"internal_network_id"`
	TenantID          string `json:"tenant_id"`
	Spec              string `json:"spec"`
	Status            string `json:"status"`
	AdminStateUp      bool   `json:"admin_state_up"`
}

NatGateway is a struct that represents a nat gateway

func ExtractNatGateways

func ExtractNatGateways(r pagination.Page) ([]NatGateway, error)

type NatGatewayPage

type NatGatewayPage struct {
	pagination.LinkedPageBase
}

func (NatGatewayPage) IsEmpty

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

func (NatGatewayPage) NextPageURL

func (r NatGatewayPage) NextPageURL() (string, error)

type UpdateOpts

type UpdateOpts struct {
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
	Spec        string `json:"spec,omitempty"`
}

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

func (UpdateOpts) ToNatGatewayUpdateMap

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

type UpdateOptsBuilder

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

UpdateOptsBuilder is the interface type must satisfy to be used as Update options.

type UpdateResult

type UpdateResult struct {
	golangsdk.Result
}

UpdateResult is a return struct of update method

func Update

func Update(c *golangsdk.ServiceClient, id string, opts UpdateOptsBuilder) (r UpdateResult)

Update allows nat gateway resources to be updated.

func (UpdateResult) Extract

func (r UpdateResult) Extract() (NatGateway, error)

Jump to

Keyboard shortcuts

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