ipgroups

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(c *golangsdk.ServiceClient, id string) (err error)

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

func Update

func Update(c *golangsdk.ServiceClient, id string, opts UpdateOpts) (err error)

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

Types

type BatchDeleteOpts

type BatchDeleteOpts struct {
	// Specifies IP addresses that will be deleted from an IP address group in batches.
	IpList []IpList `json:"ip_list,omitempty"`
}

BatchDeleteOpts contains all the values needed to perform BatchDelete on the IP address group.

type CreateOpts

type CreateOpts struct {
	// Specifies the IP address group name.
	Name string `json:"name,omitempty"`

	// Provides supplementary information about the IP address group.
	Description string `json:"description,omitempty"`

	// Specifies the project ID of the IP address group.
	ProjectId string `json:"project_id,omitempty"`

	// Specifies the IP addresses or CIDR blocks in the IP address group. [] indicates any IP address.
	IpList *[]IpGroupOption `json:"ip_list,omitempty"`
}

CreateOpts is the common options' struct used in this package's Create operation.

type DataStore

type DataStore struct {
	// Specifies the DB engine. Its value can be any of the following and is case-insensitive:
	// MySQL
	// PostgreSQL
	// SQLServer
	Type string `json:"type" required:"true"`
	// Specifies the database version.
	// Example values:
	// MySQL: 8.0
	// PostgreSQL: 13
	// SQLServer: 2017_SE
	Version string `json:"version" required:"true"`
}

type IpGroup

type IpGroup struct {
	// The unique ID for the IpGroup.
	ID string `json:"id"`
	// Specifies the IP address group name.
	Name string `json:"name"`
	// Provides remarks about the IP address group.
	Description string `json:"description"`
	// Specifies the project ID of the IP address group.
	ProjectId string `json:"project_id"`
	// Specifies the IP addresses or CIDR blocks in the IP address group. [] indicates any IP address.
	IpList []IpInfo `json:"ip_list"`
	// Lists the IDs of listeners with which the IP address group is associated.
	Listeners []structs.ResourceRef `json:"listeners"`
	// Specifies the time when the IP address group was created.
	CreatedAt string `json:"created_at"`
	// Specifies the time when the IP address group was updated.
	UpdatedAt string `json:"updated_at"`
}

IpGroup The IP address can contain IP addresses or CIDR blocks. 0.0.0.0 will be considered the same as 0.0.0.0/32. If you enter both 0.0.0.0 and 0.0.0.0/32, only one will be kept. 0:0:0:0:0:0:0:1 will be considered the same as ::1 and ::1/128. If you enter 0:0:0:0:0:0:0:1, ::1 and ::1/128, only one will be kept.

func Create

func Create(c *golangsdk.ServiceClient, opts CreateOpts) (*IpGroup, error)

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

func DeleteIpFromList

func DeleteIpFromList(c *golangsdk.ServiceClient, id string, opts BatchDeleteOpts) (*IpGroup, error)

DeleteIpFromList is used to create or update the ip list of specific ip group.

func Get

func Get(client *golangsdk.ServiceClient, id string) (*IpGroup, error)

Get retrieves a particular Configuration based on its unique ID.

func List

func List(client *golangsdk.ServiceClient, opts ListOpts) ([]IpGroup, error)

List is used to obtain the parameter ipGroup list

func UpdateIpList

func UpdateIpList(c *golangsdk.ServiceClient, id string, opts UpdateOpts) (*IpGroup, error)

UpdateIpList is used to create or update the ip list of specific ip group.

type IpGroupOption

type IpGroupOption struct {
	// Specifies the IP addresses in the IP address group.
	Ip string `json:"ip" required:"true"`

	// Provides remarks about the IP address group.
	Description string `json:"description"`
}

type IpInfo

type IpInfo struct {
	// Specifies the IP addresses in the IP address group.
	Ip string `json:"ip"`
	// Provides remarks about the IP address group.
	Description string `json:"description"`
}

type IpList

type IpList struct {
	// Specifies the IP addresses in the IP address group.
	Ip string `json:"ip" required:"true"`
}

type ListOpts

type ListOpts struct {
	Limit       int    `q:"limit"`
	Marker      string `q:"marker"`
	PageReverse bool   `q:"page_reverse"`

	ID          []string `q:"id"`
	Name        []string `q:"name"`
	Description []string `q:"description"`
	IpList      []string `q:"ip_list"`
}

type UpdateOpts

type UpdateOpts struct {
	// Specifies the IP address group name.
	Name string `json:"name,omitempty"`
	// Provides supplementary information about the IP address group.
	Description string `json:"description,omitempty"`
	// Lists the IP addresses in the IP address group.
	IpList *[]IpGroupOption `json:"ip_list,omitempty"`
}

UpdateOpts represents options for updating a IpGroup.

Jump to

Keyboard shortcuts

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