ipset_cidr

package
v0.0.0-...-066dabf Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetRequest

type GetRequest struct {
	Client    *api.Client
	IPSetName string
}

func (GetRequest) Get

func (g GetRequest) Get() (GetResponseList, error)

func (GetRequest) GetAll

func (g GetRequest) GetAll() ([]byte, error)

func (GetRequest) ParseParams

func (g GetRequest) ParseParams(apiURL *url.URL) error

type GetResponse

type GetResponse struct {
	CIDR    string         `json:"cidr"`
	Digest  string         `json:"digest"`
	Comment *string        `json:"comment,omitempty"`
	NoMatch *types.PVEBool `json:"nomatch,omitempty"`
}

type GetResponseList

type GetResponseList []GetResponse

func (*GetResponseList) FindByCIDR

func (l *GetResponseList) FindByCIDR(cidr string) *GetResponse

type ItemDeleteRequest

type ItemDeleteRequest struct {
	Client    *api.Client
	IPSetName string
	CIDR      string
}

func (ItemDeleteRequest) Delete

func (g ItemDeleteRequest) Delete() error

type ItemGetRequest

type ItemGetRequest struct {
	Client    *api.Client
	IPSetName string
	CIDR      string
}

func (ItemGetRequest) Get

func (g ItemGetRequest) Get() (*ItemGetResponse, error)

func (ItemGetRequest) GetItem

func (g ItemGetRequest) GetItem() ([]byte, error)

GetItem satisfies the ItemGetter interface Not to be used directly. Use Get() instead.

type ItemGetResponse

type ItemGetResponse struct {
	CIDR    string         `json:"cidr"`
	Digest  string         `json:"digest"`
	Comment *string        `json:"comment,omitempty"`
	NoMatch *types.PVEBool `json:"nomatch,omitempty"`
}

type ItemPutRequest

type ItemPutRequest struct {
	Client    *api.Client
	IPSetName string
	CIDR      string

	// Optional arguments
	Comment *string
	Digest  *string
	NoMatch *types.PVEBool
}

func (ItemPutRequest) ParseParams

func (g ItemPutRequest) ParseParams(apiURL *url.URL) error

ParseParams satisfies the ItemPutter interface. Not to be used directly. Use Put() instead.

func (ItemPutRequest) Put

func (g ItemPutRequest) Put() error

func (ItemPutRequest) PutItem

func (g ItemPutRequest) PutItem() ([]byte, error)

PutItem satisfies the ItemPutter interface. Not to be used directly. Use Put() instead.

type PostRequest

type PostRequest struct {
	Client *api.Client

	// Required fields
	IPSetName string
	CIDR      string

	// Optional fields
	Comment *string
	NoMatch *types.PVEBool
}

func (PostRequest) ParseParams

func (p PostRequest) ParseParams(apiURL *url.URL) error

ParseParams satisfies the ItemPutter interface. Not to be used directly. Use Post() instead.

func (PostRequest) Post

func (p PostRequest) Post() error

func (PostRequest) PostItem

func (p PostRequest) PostItem() ([]byte, error)

PostItem satisfies the ItemPutter interface. Not to be used directly. Use Post() instead.

Jump to

Keyboard shortcuts

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