Files
logpile/internal/parser/interface.go
Michael Chus 21ea129933 misc: sds format support, convert limits, dell dedup, supermicro removal, bible updates
Parser / archive:
- Add .sds extension as tar-format alias (archive.go)
- Add tests for multipart upload size limits (multipart_limits_test.go)
- Remove supermicro crashdump parser (ADL-015)

Dell parser:
- Remove GPU duplicates from PCIeDevices (DCIM_VideoView vs DCIM_PCIDeviceView
  both list the same GPU; VideoView record is authoritative)

Server:
- Add LOGPILE_CONVERT_MAX_MB env var for independent convert batch size limit
- Improve "file too large" error message with current limit value

Web:
- Add CONVERT_MAX_FILES_PER_BATCH = 1000 cap
- Minor UI copy and CSS fixes

Bible:
- bible-local/06-parsers.md: add pci.ids enrichment rule (enrich model from
  pciids when name is empty but vendor_id+device_id are present)
- Sync bible submodule and local overview/architecture docs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 22:23:44 +03:00

35 lines
1003 B
Go

package parser
import (
"git.mchus.pro/mchus/logpile/internal/models"
)
// VendorParser interface for vendor-specific parsers
type VendorParser interface {
// Name returns human-readable parser name
Name() string
// Vendor returns vendor identifier (e.g., "inspur", "dell", "h3c_g6")
Vendor() string
// Version returns parser version string
// IMPORTANT: Increment version when modifying parser logic!
Version() string
// Detect checks if this parser can handle the given files
// Returns confidence score 0-100 (0 = cannot parse, 100 = definitely this format)
Detect(files []ExtractedFile) int
// Parse parses the extracted files and returns analysis result
Parse(files []ExtractedFile) (*models.AnalysisResult, error)
}
// FileParser interface for parsing specific file types within vendor module
type FileParser interface {
// CanParse checks if this parser can handle the file
CanParse(file ExtractedFile) bool
// Parse parses the file content
Parse(content []byte) error
}