Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RuleSet ¶
type RuleSet struct {
//Rules []iptables.Rule `yaml:"rules"`
Rules map[string]iptables.Rule `yaml:"rules"`
}
RulesFile keep track of listed rules the result looks like so: rules:
- iface: eth0 proto: tcp dport: 3000 saddr: 192.168.122.43 sport: 22
- iface: eth0 ...
func NewRuleSet ¶
func NewRuleSet() *RuleSet
func NewRuleSetFromFile ¶
NewRuleSet return the struct that contains informations about rules
type RuleSetDiff ¶ added in v0.9.1
func Diff ¶ added in v0.9.1
func Diff(oldRS, newRS *RuleSet) *RuleSetDiff
Diff method returns a *RuleSetDiff struct. It contains a list of Rule(s) to be added / remove in order to achieve the new RuleSet state.
Click to show internal directories.
Click to hide internal directories.