Documentation ¶
Index ¶
- type IptablesBuilderImpl
- func (rb *IptablesBuilderImpl) AppendRuleV4(chain string, table string, params ...string) IptablesProducer
- func (rb *IptablesBuilderImpl) AppendRuleV6(chain string, table string, params ...string) IptablesProducer
- func (rb *IptablesBuilderImpl) BuildV4() [][]string
- func (rb *IptablesBuilderImpl) BuildV4Restore() string
- func (rb *IptablesBuilderImpl) BuildV6() [][]string
- func (rb *IptablesBuilderImpl) BuildV6Restore() string
- func (rb *IptablesBuilderImpl) InsertRuleV4(chain string, table string, position int, params ...string) IptablesProducer
- func (rb *IptablesBuilderImpl) InsertRuleV6(chain string, table string, position int, params ...string) IptablesProducer
- type IptablesProducer
- type Rule
- type Rules
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
Click to show internal directories.
Click to hide internal directories.