Documentation
¶
Index ¶
Constants ¶
View Source
const ( FileNodeUUID = 0x01 DirectoryNodeUUID = 0x02 SymlinkNodeUUID = 0x03 // unused, but reserved for future use // DirectoryUUID is used to identify an (unnamed) directory // together with the hashes of its children. // (like the top-level directory in a tree artifact). DirectryUUID = 0xff )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Directory ¶
type Directory struct {
Files metadataSlice[FileNode]
Directories metadataSlice[DirectoryNode]
}
type DirectoryNode ¶
type DirectoryNode struct {
Name metadataString
Hash metadataBytes
}
func (DirectoryNode) Fingerprint ¶
func (n DirectoryNode) Fingerprint(h hash.Hash)
type FileNode ¶
type FileNode struct {
Name metadataString
Size metadataSize
ContentHash metadataBytes
Mtime metadataTime
Mode metadataMode
}
func DefaultFileNode ¶
DefaultFileNode creates a FileNode with normalized metadata. This is the default metadata used in tar files, unless otherwise specified.
func DetailedFileNode ¶
DetailedFileNode creates a FileNode with detailed metadata. The extra metadata can be used for special purposes, but doing so avoids deduplication of the file.
func (FileNode) Fingerprint ¶
type TreeHasher ¶
type TreeHasher struct{}
Click to show internal directories.
Click to hide internal directories.