hw_snatrules

package
v0.0.0-...-e794f14 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: Apache-2.0 Imports: 1 Imported by: 1

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"`
	FloatingIPID string `json:"floating_ip_id" required:"true"`
	Description  string `json:"description,omitempty"`
	NetworkID    string `json:"network_id,omitempty"`
	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 {
	// contains filtered or unexported fields
}

CreateResult is a return struct of create method

func Create

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, natGatewayID string) (r DeleteResult)

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

type GetResult

type GetResult struct {
	// contains filtered or unexported fields
}

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"`
	Description       string `json:"description"`
	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

type UpdateOpts

type UpdateOpts struct {
	NatGatewayID      string  `json:"nat_gateway_id" required:"true"`
	FloatingIPAddress string  `json:"public_ip_address,omitempty"`
	Description       *string `json:"description,omitempty"`
}

UpdateOpts contains all the values needed to update a snat rule resource.

func (UpdateOpts) ToSnatRuleUpdateMap

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

ToSnatRuleUpdateMap allows UpdateOpts to satisfy the UpdateOptsBuilder interface

type UpdateOptsBuilder

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

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

type UpdateResult

type UpdateResult struct {
	// contains filtered or unexported fields
}

UpdateResult is a return struct of update method

func Update

Update is a method by which can update a snat rule

func (UpdateResult) Extract

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

Jump to

Keyboard shortcuts

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