builder

package
v0.0.0-...-29a0f12 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: MIT, Apache-2.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 IptablesBuilder

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

IptablesBuilder is an implementation for IptablesBuilder interface

func NewIptablesBuilder

func NewIptablesBuilder(cfg *config.Config) *IptablesBuilder

NewIptablesBuilders creates a new IptablesBuilder

func (*IptablesBuilder) AppendRule

func (rb *IptablesBuilder) AppendRule(command log.Command, chain string, table string, params ...string) *IptablesBuilder

func (*IptablesBuilder) AppendRuleV4

func (rb *IptablesBuilder) AppendRuleV4(command log.Command, chain string, table string, params ...string) *IptablesBuilder

func (*IptablesBuilder) AppendRuleV6

func (rb *IptablesBuilder) AppendRuleV6(command log.Command, chain string, table string, params ...string) *IptablesBuilder

func (*IptablesBuilder) AppendVersionedRule

func (rb *IptablesBuilder) AppendVersionedRule(ipv4 string, ipv6 string, command log.Command, chain string, table string, params ...string)

AppendVersionedRule is a wrapper around AppendRule that substitutes an ipv4/ipv6 specific value in place in the params. This allows appending a dual-stack rule that has an IP value in it.

func (*IptablesBuilder) BuildV4

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

func (*IptablesBuilder) BuildV4Restore

func (rb *IptablesBuilder) BuildV4Restore() string

func (*IptablesBuilder) BuildV6

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

func (*IptablesBuilder) BuildV6Restore

func (rb *IptablesBuilder) BuildV6Restore() string

func (*IptablesBuilder) InsertRule

func (rb *IptablesBuilder) InsertRule(command log.Command, chain string, table string, position int, params ...string) *IptablesBuilder

func (*IptablesBuilder) InsertRuleV4

func (rb *IptablesBuilder) InsertRuleV4(command log.Command, chain string, table string, position int, params ...string) *IptablesBuilder

func (*IptablesBuilder) InsertRuleV6

func (rb *IptablesBuilder) InsertRuleV6(command log.Command, chain string, table string, position int, params ...string) *IptablesBuilder

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