ipsetcmd

package
v0.0.34 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSetsStartingWith

func GetSetsStartingWith(name string) (map[string]*IPSet, error)

Helpers.

Types

type CreateOptions

type CreateOptions struct {
	Timeout         string
	MaxElem         string
	Family          string
	Type            string
	DisableTimeouts bool
}

type IPSet

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

func NewIPSet

func NewIPSet(setName string) (*IPSet, error)

func (*IPSet) Add

func (i *IPSet) Add(entry string) error

func (*IPSet) Create

func (i *IPSet) Create(opts CreateOptions) error

Wraps all the ipset commands.

func (*IPSet) DeleteEntry

func (i *IPSet) DeleteEntry(entry string) error

func (*IPSet) Destroy

func (i *IPSet) Destroy() error

func (*IPSet) Exists

func (i *IPSet) Exists() bool

func (*IPSet) Flush

func (i *IPSet) Flush() error

func (*IPSet) Len

func (i *IPSet) Len() int

func (*IPSet) List

func (i *IPSet) List() ([]string, error)

func (*IPSet) Name

func (i *IPSet) Name() string

func (*IPSet) Rename

func (i *IPSet) Rename(toSetName string) error

func (*IPSet) Restore

func (i *IPSet) Restore(filename string) error

func (*IPSet) Save

func (i *IPSet) Save() ([]string, error)

func (*IPSet) Swap

func (i *IPSet) Swap(toSetName string) error

func (*IPSet) Test

func (i *IPSet) Test(entry string) error

Jump to

Keyboard shortcuts

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