Documentation
¶
Index ¶
Constants ¶
const DefaultHashAlgorithm = "md5"
DefaultHashAlgorithm is the default hash algorithm used for file hashing.
Variables ¶
var IgnoredFiles = []string{
".DS_Store",
"Thumbs.db",
"desktop.ini",
"Icon\r",
".Spotlight-V100",
".Trashes",
"ehthumbs.db",
"Desktop.ini",
}
IgnoredFiles is the list of OS-generated junk files to ignore.
var MakeNormalization = map[string]string{}
MakeNormalization maps raw camera make strings to normalized values.
var ModelNormalization = map[string]string{}
ModelNormalization maps raw camera model strings to normalized values.
var SidecarExtensions = []string{".xmp", ".yaml", ".json"}
SidecarExtensions is the list of recognized sidecar file extensions.
Functions ¶
func IsIgnoredFile ¶
IsIgnoredFile returns true if the given filename is a known OS-generated junk file.
func IsSidecarExtension ¶
IsSidecarExtension returns true if the given extension is a recognized sidecar extension. The check is case-insensitive.
func NormalizeMake ¶
NormalizeMake returns the normalized camera make, or the original value if not in the map.
func NormalizeModel ¶
NormalizeModel returns the normalized camera model, or the original value if not in the map.
Types ¶
type Hasher ¶
type Hasher struct {
// contains filtered or unexported fields
}
Hasher wraps a hash algorithm with convenience methods.
func NewHasher ¶
NewHasher creates a new Hasher for the given algorithm. Supported algorithms: "md5", "sha256".
type MediaType ¶
type MediaType string
MediaType represents the type of media file.
func MediaTypeFromMIME ¶
MediaTypeFromMIME classifies a MIME type string into a MediaType.