Documentation ¶
Overview ¶
Package mappings contains struct mappings to unmarshal three different PRONOM XML formats: the DROID signature file format, the report format, and the container format.
Index ¶
- type ByteSeq
- type ByteSequence
- type Container
- type ContainerSignature
- type Droid
- type File
- type FileFormat
- type FormatIdentifier
- type FormatMapping
- type Fragment
- type InternalSignature
- type KeyVal
- type OrderedMap
- type Outline
- type Puid
- type RelatedFormat
- type Release
- type Releases
- type Report
- type Signature
- type SubSequence
- type TriggerPuid
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 OrderedMap ¶
type OrderedMap []KeyVal
OrderedMap define an ordered map
func (OrderedMap) MarshalJSON ¶
func (omap OrderedMap) MarshalJSON() ([]byte, error)
Implement the json.Marshaler interface
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"` Families string `xml:"report_format_detail>FileFormat>FormatFamilies"` Types string `xml:"report_format_detail>FileFormat>FormatTypes"` 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.