validator

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: Apache-2.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package validator provides comprehensive validation functionality for OPNsense configuration files. It validates system settings, network interfaces, DHCP server configuration, firewall rules, NAT rules, user and group settings, and sysctl tunables to ensure configuration integrity and prevent deployment of invalid configurations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ValidationError

type ValidationError struct {
	Field   string
	Message string
}

ValidationError represents a configuration validation error.

func ValidateOpnSenseDocument

func ValidateOpnSenseDocument(o *schema.OpnSenseDocument) []ValidationError

ValidateOpnSenseDocument validates an entire OPNsense configuration document and returns all detected validation errors. It checks system settings, network interfaces, DHCP server, firewall rules, NAT rules, users and groups, and sysctl tunables for correctness and consistency.

func ValidatePfSenseDocument added in v1.3.0

func ValidatePfSenseDocument(doc *pfsense.Document) []ValidationError

ValidatePfSenseDocument validates an entire pfSense configuration document and returns all detected validation errors. It checks system settings, network interfaces, DHCP server, firewall rules, NAT rules, and users and groups.

func (ValidationError) Error

func (e ValidationError) Error() string

Error returns a formatted string describing the validation error, including the field name and message.

Jump to

Keyboard shortcuts

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