iptables

package
v1.0.0-alpha3 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeIPTables

type FakeIPTables struct {
	EnableRandomFully bool
	Data              map[string]map[string][]IptablesRule
}

func NewFakeIPTables

func NewFakeIPTables() *FakeIPTables

func (*FakeIPTables) Append

func (f *FakeIPTables) Append(table, chain string, rulespec ...string) error

func (*FakeIPTables) ClearChain

func (f *FakeIPTables) ClearChain(table, chain string) error

func (*FakeIPTables) Delete

func (f *FakeIPTables) Delete(table, chain string, rulespec ...string) error

func (*FakeIPTables) DeleteChain

func (f *FakeIPTables) DeleteChain(table, chain string) error

func (*FakeIPTables) Exists

func (f *FakeIPTables) Exists(table, chain string, rulespec ...string) (bool, error)

func (*FakeIPTables) HasRandomFully

func (f *FakeIPTables) HasRandomFully() bool

func (*FakeIPTables) Insert

func (f *FakeIPTables) Insert(table, chain string, pos int, rulespec ...string) error

func (*FakeIPTables) List

func (f *FakeIPTables) List(table, chain string) ([]string, error)

func (*FakeIPTables) ListChains

func (f *FakeIPTables) ListChains(table string) ([]string, error)

func (*FakeIPTables) NewChain

func (f *FakeIPTables) NewChain(table, chain string) error

type IptablesIface

type IptablesIface interface {
	Exists(table, chain string, rulespec ...string) (bool, error)
	Insert(table, chain string, pos int, rulespec ...string) error
	Append(table, chain string, rulespec ...string) error
	Delete(table, chain string, rulespec ...string) error
	List(table, chain string) ([]string, error)
	NewChain(table, chain string) error
	ClearChain(table, chain string) error
	DeleteChain(table, chain string) error
	ListChains(table string) ([]string, error)
	HasRandomFully() bool
}

IptablesIface wrapper package coreos/iptables

type IptablesRule

type IptablesRule struct {
	Name         string
	ShouldExist  bool
	Table, Chain string
	Rule         []string
}

func (IptablesRule) String

func (r IptablesRule) String() string

Jump to

Keyboard shortcuts

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