exec

package
v0.3.0-rc4 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateAnchorExpire

func CalculateAnchorExpire(timeoutStr string) (time.Time, error)

Add timeout to current time from server as Expire Date

func ValidateTimeout

func ValidateTimeout(timeoutStr string) error

Check for valid AuthPF Timeout string

Types

type Exec

type Exec struct {
	// contains filtered or unexported fields
}

func New

func New(logger zerolog.Logger, config *config.ConfigFile, db *authpf.AnchorsDB) (*Exec, error)

Create an Exec with ConfigFile

func (*Exec) AddIPToPfTable

func (e *Exec) AddIPToPfTable(r *authpf.AuthPFAnchor) *SystemCommandResult

Add user_ip to pf table

func (*Exec) CheckPfTableExists

func (e *Exec) CheckPfTableExists(tableName string) error

Validate pfTable

func (*Exec) FlushAllAnchors

func (e *Exec) FlushAllAnchors(username string) error

Flush all Anchors

func (*Exec) FlushAllPFTables

func (e *Exec) FlushAllPFTables() *SystemCommandResult

Clear all pf tables from all known user_ip's

func (*Exec) FlushAnchor

func (e *Exec) FlushAnchor(r *authpf.AuthPFAnchor) error

Flush Anchor

func (*Exec) FlushPFTable

func (e *Exec) FlushPFTable(r *authpf.AuthPFAnchor) error

func (*Exec) ImportAuthPF

func (e *Exec) ImportAuthPF() error

func (*Exec) LoadAuthPFAnchor

func (e *Exec) LoadAuthPFAnchor(r *authpf.AuthPFAnchor) *SystemCommandResult

Run Load AuthPF Anchor

type MultiCommandResult

type MultiCommandResult struct {
	Results []*SystemCommandResult
	Error   error
}

type SystemCommandResult

type SystemCommandResult struct {
	Command  string
	Args     []string
	Stdout   string
	Stderr   string
	ExitCode int
	Error    error
}

Jump to

Keyboard shortcuts

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