client

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FireInfo

type FireInfo struct {
	Family   string `json:"family"`  // ipv4 ipv6
	Address  string `json:"address"` // Anywhere
	Port     string `json:"port"`
	Protocol string `json:"protocol"` // tcp udp tcp/udp
	Strategy string `json:"strategy"` // accept drop

	UsedStatus  string `json:"usedStatus"`
	Description string `json:"description"`
}

type Firewall

type Firewall struct{}

func NewFirewalld

func NewFirewalld() (*Firewall, error)

func (*Firewall) ListAddress

func (f *Firewall) ListAddress() ([]FireInfo, error)

func (*Firewall) ListPort

func (f *Firewall) ListPort() ([]FireInfo, error)

func (*Firewall) Name

func (f *Firewall) Name() string

func (*Firewall) Port

func (f *Firewall) Port(port FireInfo, operation string) error

func (*Firewall) PortForward

func (f *Firewall) PortForward(info Forward, operation string) error

func (*Firewall) Reload

func (f *Firewall) Reload() error

func (*Firewall) Restart added in v1.9.2

func (f *Firewall) Restart() error

func (*Firewall) RichRules

func (f *Firewall) RichRules(rule FireInfo, operation string) error

func (*Firewall) Start

func (f *Firewall) Start() error

func (*Firewall) Status

func (f *Firewall) Status() (string, error)

func (*Firewall) Stop

func (f *Firewall) Stop() error

func (*Firewall) Version

func (f *Firewall) Version() (string, error)

type Forward

type Forward struct {
	Protocol string `json:"protocol"`
	Address  string `json:"address"`
	Port     string `json:"port"`
	Target   string `json:"target"`
}

type Ufw

type Ufw struct {
	CmdStr string
}

func NewUfw

func NewUfw() (*Ufw, error)

func (*Ufw) ListAddress

func (f *Ufw) ListAddress() ([]FireInfo, error)

func (*Ufw) ListPort

func (f *Ufw) ListPort() ([]FireInfo, error)

func (*Ufw) Name

func (f *Ufw) Name() string

func (*Ufw) Port

func (f *Ufw) Port(port FireInfo, operation string) error

func (*Ufw) PortForward

func (f *Ufw) PortForward(info Forward, operation string) error

func (*Ufw) Reload

func (f *Ufw) Reload() error

func (*Ufw) Restart added in v1.9.2

func (f *Ufw) Restart() error

func (*Ufw) RichRules

func (f *Ufw) RichRules(rule FireInfo, operation string) error

func (*Ufw) Start

func (f *Ufw) Start() error

func (*Ufw) Status

func (f *Ufw) Status() (string, error)

func (*Ufw) Stop

func (f *Ufw) Stop() error

func (*Ufw) Version

func (f *Ufw) Version() (string, error)

Jump to

Keyboard shortcuts

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