mock

package
v0.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

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) AddChain

func (m *Mock) AddChain(c *nftables.Chain) *nftables.Chain

AddChain not used

func (*Mock) AddRule

func (m *Mock) AddRule(r *nftables.Rule) *nftables.Rule

AddRule not use

func (*Mock) AddSet

func (m *Mock) AddSet(s *nftables.Set, se []nftables.SetElement) error

AddSet not used

func (*Mock) AddTable

func (m *Mock) AddTable(t *nftables.Table) *nftables.Table

AddTable not used

func (*Mock) CreateSet

func (m *Mock) CreateSet(attrs *nftableslib.SetAttributes, elements []nftables.SetElement) (*nftables.Set, error)

func (*Mock) DelChain

func (m *Mock) DelChain(c *nftables.Chain)

DelChain not used

func (*Mock) DelRule

func (m *Mock) DelRule(*nftables.Rule) error

DelRule not used

func (*Mock) DelSet

func (m *Mock) DelSet(set *nftables.Set)

func (*Mock) DelTable

func (m *Mock) DelTable(t *nftables.Table)

DelTable not used

func (*Mock) Flush

func (m *Mock) Flush() error

Flush returns

func (*Mock) FlushRuleset

func (m *Mock) FlushRuleset()

FlushRuleset not use

func (*Mock) GetRule

func (m *Mock) GetRule(*nftables.Table, *nftables.Chain) ([]*nftables.Rule, error)

GetRule not implemented yet

func (*Mock) GetSetByName

func (m *Mock) GetSetByName(t *nftables.Table, name string) (*nftables.Set, error)

func (*Mock) GetSetElements

func (m *Mock) GetSetElements(set *nftables.Set) ([]nftables.SetElement, error)

func (*Mock) GetSets

func (m *Mock) GetSets(t *nftables.Table) ([]*nftables.Set, error)

func (*Mock) InsertRule

func (m *Mock) InsertRule(r *nftables.Rule) *nftables.Rule

InsertRule not used

func (*Mock) ListChains

func (m *Mock) ListChains() ([]*nftables.Chain, error)

ListChains not implemented yet

func (*Mock) ListTables

func (m *Mock) ListTables() ([]*nftables.Table, error)

ListTables not implemented yet

func (*Mock) ReplaceRule

func (m *Mock) ReplaceRule(r *nftables.Rule) *nftables.Rule

ReplaceRule not used

func (*Mock) SetAddElements

func (m *Mock) SetAddElements(set *nftables.Set, elements []nftables.SetElement) error

func (*Mock) SetDelElements

func (m *Mock) SetDelElements(set *nftables.Set, elements []nftables.SetElement) error

func (*Mock) SetDeleteElements

func (m *Mock) SetDeleteElements(set *nftables.Set, elements []nftables.SetElement) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL