Help us shape the future of Go! Take the 2026 Go Developer Survey

dnatrules

package
v0.5.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateOpts

type CreateOpts struct {
	NatGatewayID        string `json:"nat_gateway_id" required:"true"`
	PortID              string `json:"port_id,omitempty"`
	PrivateIp           string `json:"private_ip,omitempty"`
	InternalServicePort *int   `json:"internal_service_port" required:"true"`
	FloatingIpID        string `json:"floating_ip_id" required:"true"`
	ExternalServicePort *int   `json:"external_service_port" required:"true"`
	Protocol            string `json:"protocol" required:"true"`
}

CreateOpts contains all the values needed to create a new dnat rule resource.

func (CreateOpts) ToDnatRuleCreateMap

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

ToDnatRuleCreateMap allows CreateOpts to satisfy the CreateOptsBuilder interface

type CreateOptsBuilder

type CreateOptsBuilder interface {
	ToDnatRuleCreateMap() (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(client *golangsdk.ServiceClient, opts CreateOptsBuilder) (r CreateResult)

Create is a method by which can create a new dnat rule

func (CreateResult) Extract

func (r CreateResult) Extract() (*DnatRule, error)

type DeleteResult

type DeleteResult struct {
	golangsdk.ErrResult
}

DeleteResult is a return struct of delete method

func Delete

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

Delete is a method by which can be able to delete a dnat rule

type DnatRule

type DnatRule struct {
	ID                  string `json:"id"`
	TenantID            string `json:"tenant_id"`
	NatGatewayID        string `json:"nat_gateway_id"`
	PortID              string `json:"port_id"`
	PrivateIp           string `json:"private_ip"`
	InternalServicePort int    `json:"internal_service_port"`
	FloatingIpID        string `json:"floating_ip_id"`
	FloatingIpAddress   string `json:"floating_ip_address"`
	ExternalServicePort int    `json:"external_service_port"`
	Protocol            string `json:"protocol"`
	Status              string `json:"status"`
	AdminStateUp        bool   `json:"admin_state_up"`
	CreatedAt           string `json:"created_at"`
}

DnatRule is a struct that represents a dnat rule

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 the specified dnat rule.

func (GetResult) Extract

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

Jump to

Keyboard shortcuts

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