firewall

package
v0.0.0-...-a71aea8 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsPort

func ContainsPort(ports []PortWhitelist, target PortWhitelist) bool

func LegacySystemPortKey

func LegacySystemPortKey(port SystemPort) string

func NormalizeSystemPorts

func NormalizeSystemPorts(ports []SystemPort) (map[string]SystemPort, error)

func PortWhitelistKey

func PortWhitelistKey(item PortWhitelist) string

func PortWhitelistMap

func PortWhitelistMap(items []PortWhitelist) map[string]struct{}

func RuleForSystemPort

func RuleForSystemPort(provider filter.Provider, port SystemPort) filter.FirewallRule

func SortedSystemPortKeys

func SortedSystemPortKeys(ports map[string]SystemPort) []string

func SystemPortKey

func SystemPortKey(port SystemPort) string

func WrapBatchCommandError

func WrapBatchCommandError(command, input string, err error) error

WrapBatchCommandError keeps successful task logs compact while making failed generated firewall batches directly diagnosable from the task log.

Types

type BaseOperation

type BaseOperation string
const (
	BaseOperationInit            BaseOperation = "init-base"
	BaseOperationBind            BaseOperation = "bind-base"
	BaseOperationBindWithoutInit BaseOperation = "bind-base-without-init"
	BaseOperationUnbind          BaseOperation = "unbind-base"
)

type PortWhitelist

type PortWhitelist = filter.PortWhitelist

func ExcludePorts

func ExcludePorts(ports, excluded []PortWhitelist) []PortWhitelist

func NormalizePortWhitelist

func NormalizePortWhitelist(items []PortWhitelist) []PortWhitelist

func ParsePortWhitelist

func ParsePortWhitelist(value string) ([]PortWhitelist, error)

type SystemPort

type SystemPort struct {
	Family   string
	Port     string
	Protocol string
}

Jump to

Keyboard shortcuts

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