Documentation ¶
Index ¶
Constants ¶
View Source
const ( STORAGE_TYPE_S3 = uint32(1) STORAGE_TYPE_GLACIER = uint32(2) )
View Source
const ( READ_IS_COMPRESSED = true DO_NOT_READ_IS_COMPRESSED = false )
View Source
const ( BLOB_TYPE_TREE = iota BLOB_TYPE_COMMIT = iota BLOB_TYPE_X_ATTR_SET = iota )
Variables ¶
View Source
var (
LOCATION_REGEXP = regexp.MustCompile("^file://(?P<computer>[^/]+)(?P<path>.*)$")
)
Functions ¶
Types ¶
type BlobKey ¶
type BlobKey struct { Header *Header SHA1 *[20]byte // only present for Tree v14 or later or Commit v4 or later // applies for both trees and commits IsEncryptionKeyStretched *Boolean // only present for Commit v8 or later // only for a Tree BlobKey, not for ParentCommit BlobKey IsCompressed *Boolean // only for tree v17 or later StorageType uint32 ArchiveId *String ArchiveSize uint64 ArchiveUploadedDate *Date }
func ReadBlobKey ¶
type Commit ¶
type Commit struct { Header *Header Author *String Comment *String ParentCommits []*BlobKey TreeBlobKey *BlobKey Location *String // These fields aren't part of the file, but are derived fields of Location Computer string Path string // only present for Commit v7 or older, never used MergeCommonAncestorSHA1 *String // only present for Commit v4 to v7 IsMergeCommonAncestorEncryptionKeyStretched *Boolean CreationDate *Date CommitFailedFiles []*CommitFailedFile // only present for Commit v8 or later HasMissingNodes *Boolean // only present for Commit v9 or later IsComplete *Boolean // a copy of the XML file as described in s3_data_format.txt ConfigPlistXML *Data }
type CommitFailedFile ¶
Only present for Commit v3 or later
func ReadCommitFailedFile ¶
func ReadCommitFailedFile(p *bytes.Buffer) (commitFailedFile *CommitFailedFile, err error)
func (CommitFailedFile) String ¶
func (cff CommitFailedFile) String() string
type Header ¶
func ReadHeader ¶
CommitV000 TreeV000 XAttrSetV000
type Node ¶
type Node struct { Name *String TreeVersion int IsTree *Boolean TreeContainsMissingItems *Boolean DataAreCompressed *Boolean XattrsAreCompressed *Boolean AclIsCompressed *Boolean DataBlobKeys []*BlobKey UncompressedDataSize uint64 ThumbnailBlobKey *BlobKey PreviewBlobKey *BlobKey XattrsBlobKey *BlobKey XattrsSize uint64 AclBlobKey *BlobKey Uid int32 Gid int32 Mode os.FileMode MtimeSec int64 MtimeNsec int64 Flags int64 FinderFlags int32 ExtendedFinderFlags int32 FinderFileType *String FinderFileCreator *String FileExtensionHidden *Boolean StDev int32 StIno int32 StNlink uint32 StRdev int32 CtimeSec int64 CtimeNsec int64 CreateTimeSec int64 CreateTimeNsec int64 StBlocks int64 StBlksize uint32 }
func (*Node) PrintOutput ¶
func (n *Node) PrintOutput()
type Tree ¶
type Tree struct { Header *Header // Only present for Tree v12 or later XattrsAreCompressed *Boolean // Only present for Tree v12 or later AclIsCompressed *Boolean XattrsBlobKey *BlobKey XattrsSize uint64 AclBlobKey *BlobKey Uid int32 Gid int32 Mode os.FileMode MtimeSec int64 MtimeNsec int64 Flags int64 FinderFlags int32 ExtendedFinderFlags int32 StDev int32 StIno int32 StNlink uint32 StRdev int32 CtimeSec int64 CtimeNsec int64 StBlocks int64 StBlksize uint32 // Only present for Tree v11 to v16 AggregateSizeOnDisk uint64 // Only present for Tree v15 or later CreateTimeSec int64 // Only present for Tree v15 or later CreateTimeNsec int64 // Only present for Tree v18 or later MissingNodes []*Node Nodes []*Node }
func (*Tree) PrintOutput ¶
Click to show internal directories.
Click to hide internal directories.