Lots of stuff

This commit is contained in:
Simon Martens
2025-06-24 18:20:06 +02:00
parent 3127446dab
commit 9563145aeb
29 changed files with 1694 additions and 1386 deletions

32
xmlparsing/models.go Normal file
View File

@@ -0,0 +1,32 @@
package xmlparsing
import "fmt"
type IXMLItem interface {
fmt.Stringer
// INFO:
// - Keys should be unique
// - Keys[0] has the special meaning of the primary key (for FTS etc.)
Keys() []any
Type() string
}
type ILibrary interface {
Parse(meta ParseMeta) error
}
type ResolvingMap[T IXMLItem] map[string][]Resolved[T]
type ReferenceResolver[T IXMLItem] interface {
References() ResolvingMap[T]
}
type Resolved[T IXMLItem] struct {
Item *T
Reference string
Category string
Cert bool
Conjecture bool
Comment string
MetaData map[string]string
}