builder

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IptablesBuilderImpl

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

IptablesBuilderImpl is an implementation for IptablesBuilder interface

func NewIptablesBuilder

func NewIptablesBuilder() *IptablesBuilderImpl

NewIptablesBuilders creates a new IptablesBuilder

func (*IptablesBuilderImpl) AppendRuleV4

func (rb *IptablesBuilderImpl) AppendRuleV4(chain string, table string, params ...string) IptablesProducer

func (*IptablesBuilderImpl) AppendRuleV6

func (rb *IptablesBuilderImpl) AppendRuleV6(chain string, table string, params ...string) IptablesProducer

func (*IptablesBuilderImpl) BuildV4

func (rb *IptablesBuilderImpl) BuildV4() [][]string

func (*IptablesBuilderImpl) BuildV4Restore

func (rb *IptablesBuilderImpl) BuildV4Restore() string

func (*IptablesBuilderImpl) BuildV6

func (rb *IptablesBuilderImpl) BuildV6() [][]string

func (*IptablesBuilderImpl) BuildV6Restore

func (rb *IptablesBuilderImpl) BuildV6Restore() string

func (*IptablesBuilderImpl) InsertRuleV4

func (rb *IptablesBuilderImpl) InsertRuleV4(chain string, table string, position int, params ...string) IptablesProducer

func (*IptablesBuilderImpl) InsertRuleV6

func (rb *IptablesBuilderImpl) InsertRuleV6(chain string, table string, position int, params ...string) IptablesProducer

type IptablesProducer

type IptablesProducer interface {
	// AppendRuleV4 appends an IPv4 rule into the given iptables chain
	AppendRuleV4(chain string, table string, params ...string) IptablesProducer
	// AppendRuleV6 appends an IPv6 rule into the given iptables chain
	AppendRuleV6(chain string, table string, params ...string) IptablesProducer
	// InsertRuleV4 inserts IPv4 rule at a particular position in the chain
	InsertRuleV4(chain string, table string, position int, params ...string) IptablesProducer
	// InsertRuleV6 inserts IPv6 rule at a particular position in the chain
	InsertRuleV6(chain string, table string, position int, params ...string) IptablesProducer
}

IptablesProducer is an interface for adding iptables rules

type Rule

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

Rule represents iptables rule - chain, table and options

type Rules

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

Rules represents iptables for V4 and V6

Jump to

Keyboard shortcuts

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