Versions in this module Expand all Collapse all v1 v1.2.2 Feb 12, 2026 v1.2.0 Feb 11, 2026 v1.1.0 Feb 3, 2026 v1.0.0 Aug 4, 2025 Changes in this version + const DefaultMaxInputSize + var ErrMissingOpnSenseDocumentRoot = errors.New("invalid XML: missing opnsense root element") + func BuildElementPath(elements []string) string + func IsParseError(err error) bool + func IsValidationError(err error) bool + func WrapXMLSyntaxError(err error, elementPath string) error + func WrapXMLSyntaxErrorWithOffset(err error, elementPath string, dec *xml.Decoder) error + type AggregatedValidationError struct + Errors []ValidationError + func NewAggregatedValidationError(validationErrors []ValidationError) *AggregatedValidationError + func (r *AggregatedValidationError) Error() string + func (r *AggregatedValidationError) HasErrors() bool + func (r *AggregatedValidationError) Is(target error) bool + type ParseError struct + Column int + Line int + Message string + func GetParseError(err error) *ParseError + func NewParseError(line, column int, message string) *ParseError + func (e *ParseError) Error() string + func (e *ParseError) Is(target error) bool + type Parser interface + Parse func(ctx context.Context, r io.Reader) (*model.OpnSenseDocument, error) + Validate func(cfg *model.OpnSenseDocument) error + type ValidationError struct + Message string + Path string + func GetValidationError(err error) *ValidationError + func NewValidationError(path, message string) *ValidationError + func (e *ValidationError) Error() string + func (e *ValidationError) Is(target error) bool + type XMLParser struct + MaxInputSize int64 + func NewXMLParser() *XMLParser + func (p *XMLParser) Parse(_ context.Context, r io.Reader) (*model.OpnSenseDocument, error) + func (p *XMLParser) ParseAndValidate(ctx context.Context, r io.Reader) (*model.OpnSenseDocument, error) + func (p *XMLParser) Validate(cfg *model.OpnSenseDocument) error