ipset

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package ipset contains the functions to interact with ipset.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPSHandler

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

IPSHandler is a handler exposing functions to use the ipset utility.

func NewIPSHandler

func NewIPSHandler() IPSHandler

NewIPSHandler create a new IPSHandler.

func (*IPSHandler) AddEntry

func (h *IPSHandler) AddEntry(ip string, set *ipset.IPSet) error

AddEntry adds a new entry to the named set.

func (*IPSHandler) CreateSet

func (h *IPSHandler) CreateSet(name, comment string) (*ipset.IPSet, error)

CreateSet creates a new set.

func (*IPSHandler) DestroySet

func (h *IPSHandler) DestroySet(name string) error

DestroySet deletes a named set.

func (*IPSHandler) FlushSet

func (h *IPSHandler) FlushSet(name string) error

FlushSet deletes all entries from a named set.

func (*IPSHandler) ListEntries

func (h *IPSHandler) ListEntries(set string) ([]string, error)

ListEntries lists all the entries from a named set.

func (*IPSHandler) ListSets

func (h *IPSHandler) ListSets() ([]string, error)

ListSets list all set names.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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