Documentation
¶
Overview ¶
Package model re-exports types from internal/schema for backward compatibility.
Package model defines the data structures for OPNsense configurations.
This package re-exports types from internal/schema for backward compatibility. New code should import internal/schema directly.
Package model re-exports types from internal/schema for backward compatibility.
Package model re-exports types from internal/enrichment for backward compatibility.
Package model re-exports types from internal/schema for backward compatibility.
Package model re-exports types from internal/schema for backward compatibility.
Package model re-exports types from internal/schema for backward compatibility.
Package model re-exports types from internal/schema for backward compatibility.
Package model re-exports types from internal/schema for backward compatibility.
Package model re-exports types from internal/schema for backward compatibility.
Package model re-exports types from internal/schema for backward compatibility.
Package model re-exports types from internal/schema for backward compatibility.
Package model re-exports types from internal/schema for backward compatibility.
Package model re-exports types from internal/schema for backward compatibility.
Index ¶
- Constants
- type APIKey
- type Analysis
- type BoolFlag
- type Bridge
- type Bridges
- type BridgesConfig
- type Cert
- type CertificateAuthority
- type ChangeMeta
- type ClientExport
- type ComplianceChecks
- type ConsistencyFinding
- type Created
- type DHCPNumberOption
- type DHCPScopeStatistics
- type DHCPStaticLease
- type DHCPv6Server
- type DNSMasq
- type DNSMasqHost
- type DeadRuleFinding
- type Destination
- type DhcpOption
- type DhcpRange
- type Dhcpd
- type DhcpdInterface
- type DomainOverride
- type EnrichedOpnSenseDocument
- type Filter
- type Firewall
- type Firmware
- type ForwarderGroup
- type GIFInterfaces
- type GREInterfaces
- type Gateway
- type GatewayGroup
- type Gateways
- type Group
- type HighAvailabilitySync
- type IDS
- type IPsec
- type InboundRule
- type Interface
- type InterfaceGroups
- type InterfaceList
- type InterfaceStatistics
- type Interfaces
- type LAGGInterfaces
- type LoadBalancer
- type Monit
- type MonitService
- type MonitTest
- type MonitorType
- type NATRule
- type NATSummary
- type Nat
- type NetworkConfig
- type Ntpd
- type OPNsense
- type OpenVPN
- type OpenVPNCSC
- type OpenVPNClient
- type OpenVPNExport
- type OpenVPNServer
- type OpenVPNSystem
- type OpnSenseDocument
- type Options
- type Outbound
- type PPPInterfaces
- type Package
- type PerformanceFinding
- type PerformanceMetrics
- type Range
- type Revision
- type Rrd
- type Rule
- type RuleLocation
- type SSHConfig
- type SecurityAssessment
- type SecurityConfig
- type SecurityFinding
- type Service
- type ServiceConfig
- type ServiceStatistics
- type Snmpd
- type Source
- type StaticRoute
- type StaticRoutes
- type Statistics
- type StatisticsSummary
- type Swanctl
- type SysctlItem
- type Syslog
- type System
- type SystemConfig
- type Unbound
- type UnusedInterfaceFinding
- type Updated
- type User
- type VLAN
- type VLANConfig
- type VLANs
- type VirtualIP
- type WebGUIConfig
- type Widgets
- type WireGuard
- type WireGuardClientItem
- type WireGuardServerItem
- type Wireless
Constants ¶
const ( // ProtocolHTTPS represents the HTTPS protocol identifier. ProtocolHTTPS = enrichment.ProtocolHTTPS // ProtocolHTTP represents the HTTP protocol identifier. ProtocolHTTP = enrichment.ProtocolHTTP // RuleTypePass represents a firewall pass rule. RuleTypePass = enrichment.RuleTypePass // RuleTypeBlock represents a firewall block rule. RuleTypeBlock = enrichment.RuleTypeBlock // NetworkAny represents the "any" network in firewall rules. NetworkAny = enrichment.NetworkAny // MaxComplexityScore is the maximum achievable complexity score. MaxComplexityScore = enrichment.MaxComplexityScore // MaxSecurityScore is the maximum achievable security score. MaxSecurityScore = enrichment.MaxSecurityScore // MaxComplianceScore is the maximum achievable compliance score. MaxComplianceScore = enrichment.MaxComplianceScore // RuleComplexityWeight is the complexity scoring weight per firewall rule. RuleComplexityWeight = enrichment.RuleComplexityWeight // ServiceComplexityWeight is the complexity scoring weight per enabled service. ServiceComplexityWeight = enrichment.ServiceComplexityWeight // MaxRulesThreshold is the rule count threshold for complexity calculations. MaxRulesThreshold = enrichment.MaxRulesThreshold // BaseSecurityScore is the starting security score before deductions. BaseSecurityScore = enrichment.BaseSecurityScore // BaseResourceUsage is the base resource usage estimate. BaseResourceUsage = enrichment.BaseResourceUsage )
Enrichment constants re-exported from enrichment package.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Analysis ¶
type Analysis = enrichment.Analysis
Analysis contains analysis findings and insights.
type BoolFlag ¶
BoolFlag provides custom XML marshaling for OPNsense boolean values. Type alias to schema.BoolFlag - all methods are inherited.
type BridgesConfig ¶
type BridgesConfig = schema.BridgesConfig
BridgesConfig represents the root-level bridges configuration.
type CertificateAuthority ¶
type CertificateAuthority = schema.CertificateAuthority
CertificateAuthority represents certificate authority configuration.
type ChangeMeta ¶
type ChangeMeta = schema.ChangeMeta
ChangeMeta tracks creation and modification metadata for configuration items. Type alias to schema.ChangeMeta.
type ClientExport ¶
type ClientExport = schema.ClientExport
ClientExport represents client export options for OpenVPN.
func NewClientExport ¶
func NewClientExport() *ClientExport
NewClientExport returns a new ClientExport instance.
type ComplianceChecks ¶
type ComplianceChecks = enrichment.ComplianceChecks
ComplianceChecks contains compliance check results.
type ConsistencyFinding ¶
type ConsistencyFinding = enrichment.ConsistencyFinding
ConsistencyFinding represents a consistency finding.
type DHCPNumberOption ¶
type DHCPNumberOption = schema.DHCPNumberOption
DHCPNumberOption represents a DHCP number option.
type DHCPScopeStatistics ¶
type DHCPScopeStatistics = enrichment.DHCPScopeStatistics
DHCPScopeStatistics contains statistics for a DHCP scope.
type DHCPStaticLease ¶
type DHCPStaticLease = schema.DHCPStaticLease
DHCPStaticLease represents a DHCP static lease assignment.
type DHCPv6Server ¶
type DHCPv6Server = schema.DHCPv6Server
DHCPv6Server represents DHCPv6 server configuration.
type DNSMasqHost ¶
type DNSMasqHost = schema.DNSMasqHost
DNSMasqHost represents a DNSMasq host entry.
func NewDNSMasqHost ¶
func NewDNSMasqHost() DNSMasqHost
NewDNSMasqHost returns a DNSMasqHost instance.
type DeadRuleFinding ¶
type DeadRuleFinding = enrichment.DeadRuleFinding
DeadRuleFinding represents a dead rule finding.
type Destination ¶
type Destination = schema.Destination
Destination represents a firewall rule destination.
type DhcpOption ¶
type DhcpOption = schema.DhcpOption
DhcpOption represents a DHCP option configuration.
type Dhcpd ¶
Dhcpd represents DHCP server configuration with interface-keyed entries. Type alias to schema.Dhcpd - all methods are inherited.
type DhcpdInterface ¶
type DhcpdInterface = schema.DhcpdInterface
DhcpdInterface represents per-interface DHCP configuration.
type DomainOverride ¶
type DomainOverride = schema.DomainOverride
DomainOverride represents a domain override entry.
type EnrichedOpnSenseDocument ¶
type EnrichedOpnSenseDocument = enrichment.EnrichedOpnSenseDocument
EnrichedOpnSenseDocument extends OpnSenseDocument with calculated fields and analysis data.
func EnrichDocument ¶
func EnrichDocument(cfg *OpnSenseDocument) *EnrichedOpnSenseDocument
EnrichDocument returns an EnrichedOpnSenseDocument containing computed statistics, analysis findings, security assessment, performance metrics, and compliance checks. Returns nil if the input configuration is nil.
type Firewall ¶
Firewall represents firewall configuration.
func NewFirewall ¶
func NewFirewall() *Firewall
NewFirewall returns a pointer to a new, empty Firewall configuration.
type ForwarderGroup ¶
type ForwarderGroup = schema.ForwarderGroup
ForwarderGroup represents a DNS forwarder group configuration.
type GIFInterfaces ¶
type GIFInterfaces = schema.GIFInterfaces
GIFInterfaces represents GIF interface configuration.
type GREInterfaces ¶
type GREInterfaces = schema.GREInterfaces
GREInterfaces represents GRE interface configuration.
type GatewayGroup ¶
type GatewayGroup = schema.GatewayGroup
GatewayGroup represents a gateway group configuration.
type HighAvailabilitySync ¶
type HighAvailabilitySync = schema.HighAvailabilitySync
HighAvailabilitySync represents high availability sync configuration.
type InboundRule ¶ added in v1.1.0
type InboundRule = schema.InboundRule
InboundRule represents an inbound NAT rule (port forwarding).
type InterfaceGroups ¶
type InterfaceGroups = schema.InterfaceGroups
InterfaceGroups represents interface groups configuration.
type InterfaceList ¶ added in v1.1.0
type InterfaceList = schema.InterfaceList
InterfaceList represents a comma-separated list of interfaces. Type alias to schema.InterfaceList - all methods are inherited.
type InterfaceStatistics ¶
type InterfaceStatistics = enrichment.InterfaceStatistics
InterfaceStatistics contains detailed statistics for a single interface.
type Interfaces ¶
type Interfaces = schema.Interfaces
Interfaces contains the network interface configurations. Type alias to schema.Interfaces - all methods are inherited.
type LAGGInterfaces ¶
type LAGGInterfaces = schema.LAGGInterfaces
LAGGInterfaces represents LAGG interface configuration.
type LoadBalancer ¶
type LoadBalancer = schema.LoadBalancer
LoadBalancer contains the load balancer configuration.
type MonitService ¶
type MonitService = schema.MonitService
MonitService represents a monitored service.
type MonitorType ¶
type MonitorType = schema.MonitorType
MonitorType represents a load balancer monitor type.
type NATSummary ¶ added in v1.1.0
type NATSummary = schema.NATSummary
NATSummary provides comprehensive NAT configuration for security analysis.
type NetworkConfig ¶
type NetworkConfig = schema.NetworkConfig
NetworkConfig groups network-related configuration.
type OpenVPNCSC ¶
type OpenVPNCSC = schema.OpenVPNCSC
OpenVPNCSC represents client-specific configurations for OpenVPN.
type OpenVPNClient ¶
type OpenVPNClient = schema.OpenVPNClient
OpenVPNClient represents an OpenVPN client configuration.
type OpenVPNExport ¶
type OpenVPNExport = schema.OpenVPNExport
OpenVPNExport represents OpenVPN export configuration.
func NewOpenVPNExport ¶
func NewOpenVPNExport() *OpenVPNExport
NewOpenVPNExport initializes and returns an empty OpenVPNExport configuration.
type OpenVPNServer ¶
type OpenVPNServer = schema.OpenVPNServer
OpenVPNServer represents an OpenVPN server configuration.
type OpenVPNSystem ¶
type OpenVPNSystem = schema.OpenVPNSystem
OpenVPNSystem represents OpenVPN system configuration.
func NewOpenVPNSystem ¶
func NewOpenVPNSystem() *OpenVPNSystem
NewOpenVPNSystem returns a new, empty OpenVPNSystem configuration instance.
type OpnSenseDocument ¶
type OpnSenseDocument = schema.OpnSenseDocument
OpnSenseDocument is the root of the OPNsense configuration. Type alias to schema.OpnSenseDocument - all methods are inherited.
func NewOpnSenseDocument ¶
func NewOpnSenseDocument() *OpnSenseDocument
NewOpnSenseDocument returns a new OpnSenseDocument with all slice and map fields initialized.
type PPPInterfaces ¶
type PPPInterfaces = schema.PPPInterfaces
PPPInterfaces represents PPP interface configuration.
type Package ¶ added in v1.1.0
Package represents a software package.
func NewPackage ¶ added in v1.1.0
func NewPackage() Package
NewPackage returns a new Package instance.
type PerformanceFinding ¶
type PerformanceFinding = enrichment.PerformanceFinding
PerformanceFinding represents a performance finding.
type PerformanceMetrics ¶
type PerformanceMetrics = enrichment.PerformanceMetrics
PerformanceMetrics contains performance metrics.
type RuleLocation ¶
type RuleLocation = schema.RuleLocation
RuleLocation provides granular source/destination address and port specification. Type alias to schema.RuleLocation - all methods are inherited.
type SecurityAssessment ¶
type SecurityAssessment = enrichment.SecurityAssessment
SecurityAssessment contains security assessment data.
type SecurityConfig ¶
type SecurityConfig = schema.SecurityConfig
SecurityConfig groups security-related configuration.
func NewSecurityConfig ¶
func NewSecurityConfig() SecurityConfig
NewSecurityConfig returns a new SecurityConfig instance.
type SecurityFinding ¶
type SecurityFinding = enrichment.SecurityFinding
SecurityFinding represents a security finding.
type Service ¶ added in v1.1.0
Service represents a system service.
func NewService ¶ added in v1.1.0
func NewService() Service
NewService returns a new Service instance.
type ServiceConfig ¶
type ServiceConfig = schema.ServiceConfig
ServiceConfig groups service-related configuration.
type ServiceStatistics ¶
type ServiceStatistics = enrichment.ServiceStatistics
ServiceStatistics contains statistics for a service.
type StaticRoute ¶
type StaticRoute = schema.StaticRoute
StaticRoute represents a single static route configuration.
type StaticRoutes ¶
type StaticRoutes = schema.StaticRoutes
StaticRoutes represents static route configurations.
type Statistics ¶
type Statistics = enrichment.Statistics
Statistics contains calculated statistics about the configuration.
type StatisticsSummary ¶
type StatisticsSummary = enrichment.StatisticsSummary
StatisticsSummary contains summary statistics.
type Swanctl ¶
Swanctl represents StrongSwan configuration.
func NewSwanctl ¶
func NewSwanctl() *Swanctl
NewSwanctl returns a new instance of the Swanctl configuration struct.
type SysctlItem ¶
type SysctlItem = schema.SysctlItem
SysctlItem represents a sysctl configuration item.
type SystemConfig ¶
type SystemConfig = schema.SystemConfig
SystemConfig groups system-related configuration.
type UnusedInterfaceFinding ¶
type UnusedInterfaceFinding = enrichment.UnusedInterfaceFinding
UnusedInterfaceFinding represents an unused interface finding.
type VLANConfig ¶
type VLANConfig = schema.VLANConfig
VLANConfig represents a Virtual Local Area Network configuration.
type WebGUIConfig ¶
type WebGUIConfig = schema.WebGUIConfig
WebGUIConfig represents web GUI configuration.
type WireGuard ¶
WireGuard represents WireGuard VPN configuration.
func NewWireGuard ¶
func NewWireGuard() *WireGuard
NewWireGuard returns a new WireGuard configuration instance.
type WireGuardClientItem ¶
type WireGuardClientItem = schema.WireGuardClientItem
WireGuardClientItem represents a WireGuard client configuration.
type WireGuardServerItem ¶
type WireGuardServerItem = schema.WireGuardServerItem
WireGuardServerItem represents a WireGuard server configuration.