builder

package
v0.0.0-...-5e5ceee Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: Apache-2.0 Imports: 6 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IptablesRuleBuilder

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

IptablesRuleBuilder is an implementation for IptablesRuleBuilder interface

func NewIptablesRuleBuilder

func NewIptablesRuleBuilder(cfg *config.Config) *IptablesRuleBuilder

NewIptablesBuilders creates a new IptablesRuleBuilder

func (*IptablesRuleBuilder) AppendRule

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

func (*IptablesRuleBuilder) AppendRuleV4

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

func (*IptablesRuleBuilder) AppendRuleV6

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

func (*IptablesRuleBuilder) AppendVersionedRule

func (rb *IptablesRuleBuilder) 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 (*IptablesRuleBuilder) BuildV4

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

func (*IptablesRuleBuilder) BuildV4Restore

func (rb *IptablesRuleBuilder) BuildV4Restore() string

func (*IptablesRuleBuilder) BuildV6

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

func (*IptablesRuleBuilder) BuildV6Restore

func (rb *IptablesRuleBuilder) BuildV6Restore() string

func (*IptablesRuleBuilder) InsertRule

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

func (*IptablesRuleBuilder) InsertRuleV4

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

func (*IptablesRuleBuilder) InsertRuleV6

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

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