Documentation ¶
Overview ¶
This file contains struct mappings to unmarshal three different PRONOM XML formats: the signature file format, the report format, and the container format
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByteSeq ¶
type ByteSeq struct { Reference string `xml:"Reference,attr"` SubSequences []SubSequence `xml:"SubSequence"` }
type ByteSequence ¶
type ByteSequence struct { Position string `xml:"PositionType"` Offset string MaxOffset string IndirectLoc string `xml:"IndirectOffsetLocation"` IndirectLen string `xml:"IndirectOffsetLength"` Endianness string Hex string `xml:"ByteSequenceValue"` }
func (ByteSequence) String ¶
func (bs ByteSequence) String() string
type Container ¶
type Container struct { XMLName xml.Name `xml:"ContainerSignatureMapping"` ContainerSignatures []ContainerSignature `xml:"ContainerSignatures>ContainerSignature"` FormatMappings []FormatMapping `xml:"FileFormatMappings>FileFormatMapping"` TriggerPuids []TriggerPuid `xml:"TriggerPuids>TriggerPuid"` }
type ContainerSignature ¶
type Droid ¶
type Droid struct { XMLName xml.Name `xml:"FFSignatureFile"` Version int `xml:",attr"` Signatures []InternalSignature `xml:"InternalSignatureCollection>InternalSignature"` FileFormats []FileFormat `xml:"FileFormatCollection>FileFormat"` }
type File ¶
type File struct { Path string Signature InternalSignature `xml:"BinarySignatures>InternalSignatureCollection>InternalSignature"` // see Droid mapping file }
type FileFormat ¶
type FileFormat struct { XMLName xml.Name `xml:"FileFormat"` Id int `xml:"ID,attr"` Puid string `xml:"PUID,attr"` Name string `xml:",attr"` Version string `xml:",attr"` MIMEType string `xml:",attr"` Extensions []string `xml:"Extension"` Signatures []int `xml:"InternalSignatureID"` Priorities []int `xml:"HasPriorityOverFileFormatID"` }
type FormatIdentifier ¶
type FormatMapping ¶
type InternalSignature ¶
type RelatedFormat ¶
type Report ¶
type Report struct { XMLName xml.Name `xml:"PRONOM-Report"` Id int `xml:"report_format_detail>FileFormat>FormatID"` Name string `xml:"report_format_detail>FileFormat>FormatName"` Version string `xml:"report_format_detail>FileFormat>FormatVersion"` Description string `xml:"report_format_detail>FileFormat>FormatDescription"` Identifiers []FormatIdentifier `xml:"report_format_detail>FileFormat>FileFormatIdentifier"` Signatures []Signature `xml:"report_format_detail>FileFormat>InternalSignature"` Extensions []string `xml:"report_format_detail>FileFormat>ExternalSignature>Signature"` Relations []RelatedFormat `xml:"report_format_detail>FileFormat>RelatedFormat"` }
func (*Report) Subordinates ¶
type Signature ¶
type Signature struct {
ByteSequences []ByteSequence `xml:"ByteSequence"`
}
type SubSequence ¶
type SubSequence struct { Position int `xml:",attr"` SubSeqMinOffset string `xml:",attr"` // and empty int values are unmarshalled to 0 SubSeqMaxOffset string `xml:",attr"` // uses string rather than int because value might be empty Sequence string LeftFragments []Fragment `xml:"LeftFragment"` RightFragments []Fragment `xml:"RightFragment"` }
type TriggerPuid ¶
Click to show internal directories.
Click to hide internal directories.