Documentation ¶
Index ¶
- Variables
- type Adapter
- func (a *Adapter) CreateChainIfNotExists(table, chain string) error
- func (a *Adapter) InsertUnique(table, chain string, position int, ruleSpec []string) error
- func (a *Adapter) PrependUnique(table, chain string, ruleSpec []string) error
- func (a *Adapter) UpdateChainRules(table, chain string, rules [][]string) error
- type Basic
- type Interface
Constants ¶
This section is empty.
Variables ¶
View Source
var NewFunc func() (Interface, error)
Functions ¶
This section is empty.
Types ¶
type Adapter ¶ added in v0.14.0
type Adapter struct {
Basic
}
func (*Adapter) CreateChainIfNotExists ¶ added in v0.14.0
func (*Adapter) InsertUnique ¶ added in v0.14.0
func (*Adapter) PrependUnique ¶ added in v0.14.0
type Basic ¶ added in v0.14.0
type Basic interface { Append(table, chain string, rulespec ...string) error AppendUnique(table, chain string, rulespec ...string) error Delete(table, chain string, rulespec ...string) error Insert(table, chain string, pos int, rulespec ...string) error List(table, chain string) ([]string, error) ListChains(table string) ([]string, error) NewChain(table, chain string) error ChainExists(table, chain string) (bool, error) ClearChain(table, chain string) error DeleteChain(table, chain string) error }
type Interface ¶
type Interface interface { Basic CreateChainIfNotExists(table, chain string) error InsertUnique(table, chain string, position int, ruleSpec []string) error PrependUnique(table, chain string, ruleSpec []string) error // UpdateChainRules ensures that the rules in the list are the ones in rules, without any preference for the order, // any stale rules will be removed from the chain, and any missing rules will be added. UpdateChainRules(table, chain string, rules [][]string) error }
Click to show internal directories.
Click to hide internal directories.