Версия 0.1.0 #1
@@ -6,7 +6,10 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type NFT interface {
|
type NFT interface {
|
||||||
|
// Run nft command.
|
||||||
Run(arg ...string) error
|
Run(arg ...string) error
|
||||||
|
|
||||||
|
// RunWithOutput Run nft command with output.
|
||||||
RunWithOutput(arg ...string) (string, error)
|
RunWithOutput(arg ...string) (string, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
8
nft.go
8
nft.go
@@ -12,6 +12,10 @@ import (
|
|||||||
|
|
||||||
// NFT A client for working with nftables
|
// NFT A client for working with nftables
|
||||||
type NFT interface {
|
type NFT interface {
|
||||||
|
// Command returns the command used to execute nft.
|
||||||
|
// You can execute your raw request.
|
||||||
|
Command() command.NFT
|
||||||
|
|
||||||
// Clear clears all rules.
|
// Clear clears all rules.
|
||||||
//
|
//
|
||||||
// This command is equivalent to:
|
// This command is equivalent to:
|
||||||
@@ -111,3 +115,7 @@ func (n *nft) Table() table.API {
|
|||||||
func (n *nft) Chain() chain.API {
|
func (n *nft) Chain() chain.API {
|
||||||
return n.chain
|
return n.chain
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (n *nft) Command() command.NFT {
|
||||||
|
return n.command
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user