ipset

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChildCreateRequest

type ChildCreateRequest struct {
	Cidr string `url:"cidr" json:"cidr"` // Network/IP specification in CIDR format.
	Name string `url:"name" json:"name"` // IP set name.
	Node string `url:"node" json:"node"` // The cluster node name.
	Vmid int    `url:"vmid" json:"vmid"` // The (unique) ID of the VM.

	// The following parameters are optional
	Comment *string           `url:"comment,omitempty" json:"comment,omitempty"`
	Nomatch *util.SpecialBool `url:"nomatch,omitempty" json:"nomatch,omitempty"`
}

type ChildCreateResponse

type ChildCreateResponse map[string]interface{}

type Client

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

func New

func New(c HTTPClient) *Client

func (*Client) ChildCreate

func (c *Client) ChildCreate(ctx context.Context, req *ChildCreateRequest) (*ChildCreateResponse, error)

ChildCreate Add IP or Network to IPSet.

func (*Client) Create

func (c *Client) Create(ctx context.Context, req *CreateRequest) (*CreateResponse, error)

Create Create new IPSet

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, req *DeleteRequest) (*DeleteResponse, error)

Delete Delete IPSet

func (*Client) Find

func (c *Client) Find(ctx context.Context, req *FindRequest) (*FindResponse, error)

Find List IPSet content

func (*Client) Index

func (c *Client) Index(ctx context.Context, req *IndexRequest) (*IndexResponse, error)

Index List IPSets

func (*Client) ReadIpCidr

func (c *Client) ReadIpCidr(ctx context.Context, req *ReadIpCidrRequest) (*ReadIpCidrResponse, error)

ReadIpCidr Read IP or Network settings from IPSet.

func (*Client) RemoveIpCidr

func (c *Client) RemoveIpCidr(ctx context.Context, req *RemoveIpCidrRequest) (*RemoveIpCidrResponse, error)

RemoveIpCidr Remove IP or Network from IPSet.

func (*Client) UpdateIpCidr

func (c *Client) UpdateIpCidr(ctx context.Context, req *UpdateIpCidrRequest) (*UpdateIpCidrResponse, error)

UpdateIpCidr Update IP or Network settings

type CreateRequest

type CreateRequest struct {
	Name string `url:"name" json:"name"` // IP set name.
	Node string `url:"node" json:"node"` // The cluster node name.
	Vmid int    `url:"vmid" json:"vmid"` // The (unique) ID of the VM.

	// The following parameters are optional
	Comment *string `url:"comment,omitempty" json:"comment,omitempty"`
	Digest  *string `url:"digest,omitempty" json:"digest,omitempty"` // Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
	Rename  *string `url:"rename,omitempty" json:"rename,omitempty"` // Rename an existing IPSet. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing IPSet.
}

type CreateResponse

type CreateResponse map[string]interface{}

type DeleteRequest

type DeleteRequest struct {
	Name string `url:"name" json:"name"` // IP set name.
	Node string `url:"node" json:"node"` // The cluster node name.
	Vmid int    `url:"vmid" json:"vmid"` // The (unique) ID of the VM.

	// The following parameters are optional
	Force *util.SpecialBool `url:"force,omitempty" json:"force,omitempty"` // Delete all members of the IPSet, if there are any.
}

type DeleteResponse

type DeleteResponse map[string]interface{}

type FindRequest

type FindRequest struct {
	Name string `url:"name" json:"name"` // IP set name.
	Node string `url:"node" json:"node"` // The cluster node name.
	Vmid int    `url:"vmid" json:"vmid"` // The (unique) ID of the VM.

}

type FindResponse

type FindResponse []*struct {
	Cidr   string `url:"cidr" json:"cidr"`
	Digest string `url:"digest" json:"digest"` // Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.

	// The following parameters are optional
	Comment *string           `url:"comment,omitempty" json:"comment,omitempty"`
	Nomatch *util.SpecialBool `url:"nomatch,omitempty" json:"nomatch,omitempty"`
}

type HTTPClient

type HTTPClient interface {
	Do(context.Context, string, string, interface{}, interface{}) error
}

type IndexRequest

type IndexRequest struct {
	Node string `url:"node" json:"node"` // The cluster node name.
	Vmid int    `url:"vmid" json:"vmid"` // The (unique) ID of the VM.

}

type IndexResponse

type IndexResponse []*struct {
	Digest string `url:"digest" json:"digest"` // Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
	Name   string `url:"name" json:"name"`     // IP set name.

	// The following parameters are optional
	Comment *string `url:"comment,omitempty" json:"comment,omitempty"`
}

type ReadIpCidrRequest

type ReadIpCidrRequest struct {
	Cidr string `url:"cidr" json:"cidr"` // Network/IP specification in CIDR format.
	Name string `url:"name" json:"name"` // IP set name.
	Node string `url:"node" json:"node"` // The cluster node name.
	Vmid int    `url:"vmid" json:"vmid"` // The (unique) ID of the VM.

}

type ReadIpCidrResponse

type ReadIpCidrResponse map[string]interface{}

type RemoveIpCidrRequest

type RemoveIpCidrRequest struct {
	Cidr string `url:"cidr" json:"cidr"` // Network/IP specification in CIDR format.
	Name string `url:"name" json:"name"` // IP set name.
	Node string `url:"node" json:"node"` // The cluster node name.
	Vmid int    `url:"vmid" json:"vmid"` // The (unique) ID of the VM.

	// The following parameters are optional
	Digest *string `url:"digest,omitempty" json:"digest,omitempty"` // Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
}

type RemoveIpCidrResponse

type RemoveIpCidrResponse map[string]interface{}

type UpdateIpCidrRequest

type UpdateIpCidrRequest struct {
	Cidr string `url:"cidr" json:"cidr"` // Network/IP specification in CIDR format.
	Name string `url:"name" json:"name"` // IP set name.
	Node string `url:"node" json:"node"` // The cluster node name.
	Vmid int    `url:"vmid" json:"vmid"` // The (unique) ID of the VM.

	// The following parameters are optional
	Comment *string           `url:"comment,omitempty" json:"comment,omitempty"`
	Digest  *string           `url:"digest,omitempty" json:"digest,omitempty"` // Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
	Nomatch *util.SpecialBool `url:"nomatch,omitempty" json:"nomatch,omitempty"`
}

type UpdateIpCidrResponse

type UpdateIpCidrResponse map[string]interface{}

Jump to

Keyboard shortcuts

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