package contract import ( "git.kor-elf.net/kor-elf-shield/go-nftables-client/contract/batch" ) // BatchBuilder is an API for building a batch of commands. type BatchBuilder interface { // Command returns the command to run. Command() CommandRun // Clear clears all rules. // // This command is equivalent to: // nft flush ruleset Clear() error // Table returns an API for working with tables. Table() batch.Table // Chain returns an API for working with chains. Chain() batch.Chain // Rule returns an API for working with rules. Rule() batch.Rule // Build returns a batch of commands. Build() Batch // Close closes the batch. Close() error } type Batch interface { // Args returns the arguments of the batch. Args() []string // Check checks the validity of the batch. Check(command Command) error // Close closes the batch. Close() error // MoveFile moves the batch file to the specified path. MoveFile(path string) error }