Documentation
¶
Index ¶
- Constants
- func CreateOutDir(outDir string)
- func CreateUUID() string
- func FITSGet(fitsserver string, filepath string)
- func FITSPost(fitsserver string, pathfile string) []byte
- func GetSupportedHashes() []string
- func Hashit(inFile string, hashalg string) []byte
- func ProcessFITS(fitsConnect string, rootDir string, toDir string, g Graboid, hashDigest string)
- func ProcessSiegfried(rootDir string, toDir string, hashDigest string)
- func WriteConfig() error
- func WriteDC()
- func WritePremis()
- type Accession
- type Collection
- type Config
- type DublinCore
- type File
- type Folder
- type Graboid
- type MainInfo
- type QualifiedElement
- type SiegfriedOutput
Constants ¶
const Version = "0.1.0"
Version string
Variables ¶
This section is empty.
Functions ¶
func GetSupportedHashes ¶
func GetSupportedHashes() []string
GetSupportedHashes returns hash algos supported by graboid
func ProcessFITS ¶
ProcessFiles processes files that are in the passed rootDir. It uses the hashDigest to calculate hash sums. func ProcessFiles(fitsConnect string, rootDir string, hashDigest string) map[string][]byte {
func ProcessSiegfried ¶
ProcessSiegfried processes files using siegfried that are in the passed rootDir. It uses the hashDigest to calculate hash sums.
func WriteConfig ¶
func WriteConfig() error
WriteConfig creates an empty configuration file for graboid
Types ¶
type Accession ¶
type Accession struct {
Ingestnote string `xml:"https://codeberg.org/steffenfritz/graboid/schema/graboid-1-1 ingest_note,omitempty"`
Ingesttime time.Time `xml:"https://codeberg.org/steffenfritz/graboid/schema/graboid-1-1 ingest_time,omitempty"`
Sourcenote string `xml:"https://codeberg.org/steffenfritz/graboid/schema/graboid-1-1 source_note,omitempty"`
Additionalnotes string `xml:"https://codeberg.org/steffenfritz/graboid/schema/graboid-1-1 additional_notes,omitempty"`
Folder Folder `xml:"https://codeberg.org/steffenfritz/graboid/schema/graboid-1-1 folder"`
Number string `xml:"number,attr,omitempty"`
}
func (*Accession) MarshalXML ¶
func (*Accession) UnmarshalXML ¶
type Collection ¶
type Config ¶
type Config struct {
FITSServer string
FITSPort string
UUIDPrefix string
Logging bool
LogFile string
}
Config type defines the configuration struct for graboid
func ReadConfig ¶
ReadConfig reads a configuration file
type DublinCore ¶
type DublinCore struct {
Identifier string
Format string
Type string
Language string
Title string
Subject string
Coverage string
Description string
Creator string
Publisher string
Contributor string
Rights string
Source string
Relation string
Date string
}
DublinCore is a struct that holds the 15 core elements
type File ¶
type File struct {
Item string `xml:",any"`
MD5 string `xml:"MD5,attr,omitempty"`
SHA256 string `xml:"SHA256,attr,omitempty"`
CRC32 string `xml:"CRC32,attr,omitempty"`
Lastmodified time.Time `xml:"last_modified,attr"`
Name string `xml:"name,attr"`
Size int `xml:"size,attr"`
Hidden bool `xml:"hidden,attr,omitempty"`
}
func (*File) MarshalXML ¶
func (*File) UnmarshalXML ¶
type Folder ¶
type Folder struct {
Description QualifiedElement `xml:"https://codeberg.org/steffenfritz/graboid/schema/graboid-1-1 description"`
Title QualifiedElement `xml:"https://codeberg.org/steffenfritz/graboid/schema/graboid-1-1 title"`
File File `xml:"https://codeberg.org/steffenfritz/graboid/schema/graboid-1-1 file"`
Folder *Folder `xml:"https://codeberg.org/steffenfritz/graboid/schema/graboid-1-1 folder"`
Note string `xml:"https://codeberg.org/steffenfritz/graboid/schema/graboid-1-1 note"`
Lastmodified time.Time `xml:"last_modified,attr,omitempty"`
Name string `xml:"name,attr"`
Hidden bool `xml:"hidden,attr,omitempty"`
}
func (*Folder) MarshalXML ¶
func (*Folder) UnmarshalXML ¶
type Graboid ¶
type Graboid struct {
MainInfo MainInfo
DC DublinCore
}
Graboid is a struct that holds all types used within a session
type MainInfo ¶
type MainInfo struct {
Name string
AccessioNumber string
CollectionTitle string
AccessionFrom string
AccessionTo string
}
MainInfo is a struct that holds mail graboid session info
type QualifiedElement ¶
type SiegfriedOutput ¶
type SiegfriedOutput struct {
}
SiegfriedOutput is a struct that holds info about a single file