Versions in this module Expand all Collapse all v1 v1.4.0 Apr 3, 2026 v1.3.0 Mar 23, 2026 Changes in this version + const DefaultMaxInputSize + func CharsetReader(charset string, input io.Reader) (io.Reader, error) + func NewSecureXMLDecoder(r io.Reader, maxSize int64) *xml.Decoder + func Register(deviceType string, fn ConstructorFunc) + type ConstructorFunc = func(XMLDecoder) DeviceParser + type DeviceParser interface + Parse func(ctx context.Context, r io.Reader) (*common.CommonDevice, []common.ConversionWarning, error) + ParseAndValidate func(ctx context.Context, r io.Reader) (*common.CommonDevice, []common.ConversionWarning, error) + type DeviceParserRegistry struct + func DefaultRegistry() *DeviceParserRegistry + func NewDeviceParserRegistry() *DeviceParserRegistry + func (r *DeviceParserRegistry) Get(deviceType string) (ConstructorFunc, bool) + func (r *DeviceParserRegistry) List() []string + func (r *DeviceParserRegistry) Register(deviceType string, fn ConstructorFunc) + func (r *DeviceParserRegistry) SupportedDevices() string + type Factory struct + func NewFactory(decoder XMLDecoder) *Factory + func NewFactoryWithRegistry(decoder XMLDecoder, reg *DeviceParserRegistry) *Factory + func (f *Factory) CreateDevice(ctx context.Context, r io.Reader, deviceTypeOverride common.DeviceType, ...) (*common.CommonDevice, []common.ConversionWarning, error) + type XMLDecoder interface + Parse func(ctx context.Context, r io.Reader) (*schema.OpnSenseDocument, error) + ParseAndValidate func(ctx context.Context, r io.Reader) (*schema.OpnSenseDocument, error)