hw_snatrules

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

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"`
	NetworkID    string `json:"network_id,omitempty"`
	FloatingIPID string `json:"floating_ip_id" required:"true"`
	Cidr         string `json:"cidr,omitempty"`
	SourceType   int    `json:"source_type,omitempty"`
}

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

func (CreateOpts) ToSnatRuleCreateMap

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

ToSnatRuleCreateMap allows CreateOpts to satisfy the CreateOptsBuilder interface

type CreateOptsBuilder

type CreateOptsBuilder interface {
	ToSnatRuleCreateMap() (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 snat rule

func (CreateResult) Extract

func (r CreateResult) Extract() (SnatRule, 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 snat rule

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 snat rule.

func (GetResult) Extract

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

type SnatRule

type SnatRule struct {
	ID                string `json:"id"`
	NatGatewayID      string `json:"nat_gateway_id"`
	NetworkID         string `json:"network_id"`
	TenantID          string `json:"tenant_id"`
	FloatingIPID      string `json:"floating_ip_id"`
	FloatingIPAddress string `json:"floating_ip_address"`
	Status            string `json:"status"`
	AdminStateUp      bool   `json:"admin_state_up"`
	Cidr              string `json:"cidr"`
	SourceType        int    `json:"source_type"`
}

SnatRule is a struct that represents a snat rule

Jump to

Keyboard shortcuts

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