Documentation ¶
Index ¶
- type Mock
- func (m *Mock) AddChain(c *nftables.Chain) *nftables.Chain
- func (m *Mock) AddRule(r *nftables.Rule) *nftables.Rule
- func (m *Mock) AddSet(s *nftables.Set, se []nftables.SetElement) error
- func (m *Mock) AddTable(t *nftables.Table) *nftables.Table
- func (m *Mock) CreateSet(attrs *nftableslib.SetAttributes, elements []nftables.SetElement) (*nftables.Set, error)
- func (m *Mock) DelChain(c *nftables.Chain)
- func (m *Mock) DelRule(*nftables.Rule) error
- func (m *Mock) DelSet(set *nftables.Set)
- func (m *Mock) DelTable(t *nftables.Table)
- func (m *Mock) Flush() error
- func (m *Mock) FlushRuleset()
- func (m *Mock) GetRule(*nftables.Table, *nftables.Chain) ([]*nftables.Rule, error)
- func (m *Mock) GetSetByName(t *nftables.Table, name string) (*nftables.Set, error)
- func (m *Mock) GetSetElements(set *nftables.Set) ([]nftables.SetElement, error)
- func (m *Mock) GetSets(t *nftables.Table) ([]*nftables.Set, error)
- func (m *Mock) InsertRule(r *nftables.Rule) *nftables.Rule
- func (m *Mock) ListChains() ([]*nftables.Chain, error)
- func (m *Mock) ListTables() ([]*nftables.Table, error)
- func (m *Mock) ReplaceRule(r *nftables.Rule) *nftables.Rule
- func (m *Mock) SetAddElements(set *nftables.Set, elements []nftables.SetElement) error
- func (m *Mock) SetDelElements(set *nftables.Set, elements []nftables.SetElement) error
- func (m *Mock) SetDeleteElements(set *nftables.Set, elements []nftables.SetElement) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mock ¶
type Mock struct {
// contains filtered or unexported fields
}
Mock defines type and methods to simulate operations with tables
func InitMockConn ¶
func InitMockConn() *Mock
InitMockConn initializes mock connection of the nftables family
func (*Mock) CreateSet ¶
func (m *Mock) CreateSet(attrs *nftableslib.SetAttributes, elements []nftables.SetElement) (*nftables.Set, error)
func (*Mock) GetSetByName ¶
func (*Mock) GetSetElements ¶
func (*Mock) InsertRule ¶
InsertRule not used
func (*Mock) ListChains ¶
ListChains not implemented yet
func (*Mock) ListTables ¶
ListTables not implemented yet
func (*Mock) ReplaceRule ¶
ReplaceRule not used
func (*Mock) SetAddElements ¶
func (*Mock) SetDelElements ¶
func (*Mock) SetDeleteElements ¶
Click to show internal directories.
Click to hide internal directories.