Documentation
¶
Index ¶
- func GetMaxCustomChainName(originName string) string
- func NewAction() generictables.ActionFactory
- func NewMatch() generictables.MatchCriteria
- func WithIPFamily(family int) option
- func WithLockSecondsTimeout(timeout int) option
- type AcceptAction
- type DropAction
- type GotoAction
- type JumpToChainAction
- type LogAction
- type RejectAction
- type Renderer
- type RestoreBuilder
- type ReturnAction
- type Table
- type Unlocker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMaxCustomChainName ¶
func NewAction ¶
func NewAction() generictables.ActionFactory
func NewMatch ¶
func NewMatch() generictables.MatchCriteria
func WithIPFamily ¶
func WithIPFamily(family int) option
func WithLockSecondsTimeout ¶
func WithLockSecondsTimeout(timeout int) option
Types ¶
type AcceptAction ¶
type AcceptAction struct{}
func (AcceptAction) String ¶
func (a AcceptAction) String() string
func (AcceptAction) ToParameter ¶
func (a AcceptAction) ToParameter() string
type DropAction ¶
type DropAction struct{}
func (DropAction) String ¶
func (a DropAction) String() string
func (DropAction) ToParameter ¶
func (a DropAction) ToParameter() string
type GotoAction ¶
type GotoAction struct {
// contains filtered or unexported fields
}
func (GotoAction) String ¶
func (a GotoAction) String() string
func (GotoAction) ToParameter ¶
func (a GotoAction) ToParameter() string
type JumpToChainAction ¶
type JumpToChainAction struct {
// contains filtered or unexported fields
}
func (JumpToChainAction) String ¶
func (a JumpToChainAction) String() string
func (JumpToChainAction) ToParameter ¶
func (a JumpToChainAction) ToParameter() string
type LogAction ¶
type LogAction struct {
// contains filtered or unexported fields
}
func (LogAction) ToParameter ¶
type RejectAction ¶
type RejectAction struct {
// contains filtered or unexported fields
}
func (RejectAction) String ¶
func (a RejectAction) String() string
func (RejectAction) ToParameter ¶
func (a RejectAction) ToParameter() string
type Renderer ¶
type Renderer interface { RenderAppend(rule *generictables.Rule, chainName string, hash string) string RenderInsert(rule *generictables.Rule, chainName string, hash string) string RenderInsertAtIndex(rule *generictables.Rule, chainName string, index int, hash string) string RenderReplace(rule *generictables.Rule, chainName string, index int, hash string) string RenderDelete(renderedRule string) string RenderDeleteAtIndex(chainName string, index int) string RuleHashes(c *generictables.Chain) []string }
func NewRenderer ¶
type RestoreBuilder ¶
type RestoreBuilder struct {
// contains filtered or unexported fields
}
RestoreBuilder build iptables data example:
*filter :TEST_CHAIN - [0:0] -A TEST_CHAIN -m comment --comment "test chain" -A TEST_CHAIN -j ACCEPT COMMIT
func (*RestoreBuilder) EndTransaction ¶
func (b *RestoreBuilder) EndTransaction()
func (*RestoreBuilder) IsEmpty ¶
func (b *RestoreBuilder) IsEmpty() bool
func (*RestoreBuilder) Reset ¶
func (b *RestoreBuilder) Reset()
func (*RestoreBuilder) StartTransaction ¶
func (b *RestoreBuilder) StartTransaction(tableName string)
func (*RestoreBuilder) WriteChain ¶
func (b *RestoreBuilder) WriteChain(chainName string)
func (*RestoreBuilder) WriteRule ¶
func (b *RestoreBuilder) WriteRule(rule string)
type ReturnAction ¶
type ReturnAction struct{}
func (ReturnAction) String ¶
func (a ReturnAction) String() string
func (ReturnAction) ToParameter ¶
func (a ReturnAction) ToParameter() string
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
func (*Table) SetDefaultRuleOfDefaultChain ¶
func (t *Table) SetDefaultRuleOfDefaultChain(chainName string, rule generictables.Rule)
func (*Table) UpdateChain ¶
func (t *Table) UpdateChain(chain *generictables.Chain)
func (*Table) UpdateChains ¶
func (t *Table) UpdateChains(chains []*generictables.Chain)
UpdateChains update rules of our chain
Click to show internal directories.
Click to hide internal directories.