ipgroups

package
v0.0.0-...-d823fe1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2021 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 {
	// Human-readable name for the IpGroup. Does not have to be unique.
	Name string `json:"name,omitempty"`

	// Human-readable description for the IpGroup.
	Description *string `json:"description,omitempty"`

	// A list of IP addresses.
	IpList *[]IpListOpt `json:"ip_list" required:"true"`

	// Specifies the enterprise project id.
	EnterpriseProjectID string `json:"enterprise_project_id,omitempty"`
}

CreateOpts represents options for creating a ipgroup.

func (CreateOpts) ToIpGroupCreateMap

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

ToIpGroupCreateMap builds a request body from CreateOpts.

type CreateOptsBuilder

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

CreateOptsBuilder allows extensions to add additional parameters to the Create request.

type CreateResult

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

CreateResult represents the result of a create operation. Call its Extract method to interpret it as a IpGroup.

func Create

Create is an operation which provisions a new IpGroups based on the configuration defined in the CreateOpts struct. Once the request is validated and progress has started on the provisioning process, a CreateResult will be returned.

Users with an admin role can create IpGroups on behalf of other tenants by specifying a TenantID attribute different than their own.

func (CreateResult) Extract

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

Extract is a function that accepts a result and extracts a ipgroup.

type DeleteResult

type DeleteResult struct {
	golangsdk.ErrResult
}

DeleteResult represents the result of a delete operation. Call its ExtractErr method to determine if the request succeeded or failed.

func Delete

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

Delete will permanently delete a particular Ipgroups based on its unique ID.

type GetResult

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

GetResult represents the result of a get operation. Call its Extract method to interpret it as a IpGroup.

func Get

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

Get retrieves a particular Ipgroups based on its unique ID.

func (GetResult) Extract

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

Extract is a function that accepts a result and extracts a ipgroup.

type IpGroup

type IpGroup struct {
	// The unique ID for the IpGroup.
	ID string `json:"id"`

	// Human-readable name for the IpGroup.
	Name string `json:"name"`

	// Human-readable description for the IpGroup.
	Description string `json:"description"`

	// whether to use HTTP2.
	Http2Enable bool `json:"http2_enable"`

	// A list of listener IDs.
	Listeners []ListenerID `json:"listeners"`

	// A list of IP addresses.
	IpList []IpListOpt `json:"ip_list"`
}

type IpListOpt

type IpListOpt struct {
	Ip          string `json:"ip" required:"true"`
	Description string `json:"description,omitempty"`
}

type ListenerID

type ListenerID struct {
	ID string `json:"id"`
}

type UpdateOpts

type UpdateOpts struct {
	// Human-readable name for the IpGroup. Does not have to be unique.
	Name string `json:"name,omitempty"`

	// Human-readable description for the IpGroup.
	Description *string `json:"description,omitempty"`

	// A list of IP addresses.
	IpList *[]IpListOpt `json:"ip_list,omitempty"`
}

UpdateOpts represents options for updating a IpGroup.

func (UpdateOpts) ToIpGroupUpdateMap

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

ToIpGroupUpdateMap builds a request body from UpdateOpts.

type UpdateOptsBuilder

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

UpdateOptsBuilder allows extensions to add additional parameters to the Update request.

type UpdateResult

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

UpdateResult represents the result of an update operation. Call its Extract method to interpret it as a IpGroup.

func Update

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

Update is an operation which modifies the attributes of the specified IpGroup.

func (UpdateResult) Extract

func (r UpdateResult) Extract() (*IpGroup, error)

Extract is a function that accepts a result and extracts a ipgroup.

Jump to

Keyboard shortcuts

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