Версия 0.1.0 #1
11
nft.go
11
nft.go
@@ -17,6 +17,12 @@ type NFT interface {
|
|||||||
// This command is equivalent to:
|
// This command is equivalent to:
|
||||||
// nft add table (ip|ip6|inet|arp|bridge) {name}
|
// nft add table (ip|ip6|inet|arp|bridge) {name}
|
||||||
AddTable(family FamilyType, name string) error
|
AddTable(family FamilyType, name string) error
|
||||||
|
|
||||||
|
// DeleteTable deletes a table.
|
||||||
|
//
|
||||||
|
// This command is equivalent to:
|
||||||
|
// nft delete table (ip|ip6|inet|arp|bridge) {name}
|
||||||
|
DeleteTable(family FamilyType, name string) error
|
||||||
}
|
}
|
||||||
|
|
||||||
type nft struct {
|
type nft struct {
|
||||||
@@ -57,3 +63,8 @@ func (n *nft) AddTable(family FamilyType, name string) error {
|
|||||||
args := []string{"add", "table", family.String(), name}
|
args := []string{"add", "table", family.String(), name}
|
||||||
return executeCommand(n.path, args...)
|
return executeCommand(n.path, args...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (n *nft) DeleteTable(family FamilyType, name string) error {
|
||||||
|
args := []string{"delete", "table", family.String(), name}
|
||||||
|
return executeCommand(n.path, args...)
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user