35 lines
792 B
Go
35 lines
792 B
Go
package contract
|
|
|
|
import "git.kor-elf.net/kor-elf-shield/go-nftables-client/contract/nft"
|
|
|
|
// NFT A client for working with nftables
|
|
type NFT interface {
|
|
// Command returns the command used to execute nft.
|
|
// You can execute your raw request.
|
|
Command() Command
|
|
|
|
// ExecuteBatch executes a batch of commands.
|
|
ExecuteBatch(batch Batch) error
|
|
|
|
// Clear clears all rules.
|
|
//
|
|
// This command is equivalent to:
|
|
// nft flush ruleset
|
|
Clear() error
|
|
|
|
// Version returns the version of nftables.
|
|
//
|
|
// This command is equivalent to:
|
|
// nft -V
|
|
Version() (nft.Version, error)
|
|
|
|
// Table returns an API for working with tables.
|
|
Table() nft.Table
|
|
|
|
// Chain returns an API for working with chains.
|
|
Chain() nft.Chain
|
|
|
|
// Rule returns an API for working with rules.
|
|
Rule() nft.Rule
|
|
}
|