Documentation ¶
Overview ¶
Package pst This file is part of go-pst (https://github.com/mooijtech/go-pst) Copyright (C) 2021 Marten Mooij (https://www.mooijtech.com/)
Package pst This file is part of go-pst (https://github.com/mooijtech/go-pst) Copyright (C) 2021 Marten Mooij (https://www.mooijtech.com/)
Package pst This file is part of go-pst (https://github.com/mooijtech/go-pst) Copyright (C) 2021 Marten Mooij (https://www.mooijtech.com/)
Package pst This file is part of go-pst (https://github.com/mooijtech/go-pst) Copyright (C) 2021 Marten Mooij (https://www.mooijtech.com/)
Package pst This file is part of go-pst (https://github.com/mooijtech/go-pst) Copyright (C) 2021 Marten Mooij (https://www.mooijtech.com/)
Package pst This file is part of go-pst (https://github.com/mooijtech/go-pst) Copyright (C) 2021 Marten Mooij (https://www.mooijtech.com/)
Package pst This file is part of go-pst (https://github.com/mooijtech/go-pst) Copyright (C) 2021 Marten Mooij (https://www.mooijtech.com/)
Package pst This file is part of go-pst (https://github.com/mooijtech/go-pst) Copyright (C) 2021 Marten Mooij (https://www.mooijtech.com/)
Package pst This file is part of go-pst (https://github.com/mooijtech/go-pst) Copyright (C) 2021 Marten Mooij (https://www.mooijtech.com/)
Package pst This file is part of go-pst (https://github.com/mooijtech/go-pst) Copyright (C) 2021 Marten Mooij (https://www.mooijtech.com/)
Package pst This file is part of go-pst (https://github.com/mooijtech/go-pst) Copyright (C) 2021 Marten Mooij (https://www.mooijtech.com/)
Package pst This file is part of go-pst (https://github.com/mooijtech/go-pst) Copyright (C) 2021 Marten Mooij (https://www.mooijtech.com/)
Package pst This file is part of go-pst (https://github.com/mooijtech/go-pst) Copyright (C) 2021 Marten Mooij (https://www.mooijtech.com/)
Package pst This file is part of go-pst (https://github.com/mooijtech/go-pst) Copyright (C) 2021 Marten Mooij (https://www.mooijtech.com/)
Index ¶
- Constants
- Variables
- func DecodeBytesToUTF16String(input []byte) (string, error)
- func DecodeCompressibleEncryption(data []byte) []byte
- type Attachment
- type BTreeNodeEntry
- func (btreeNodeEntry *BTreeNodeEntry) GetDataIdentifier(formatType string) (int, error)
- func (btreeNodeEntry *BTreeNodeEntry) GetFileOffset(isBranchNode bool, formatType string) (int, error)
- func (btreeNodeEntry *BTreeNodeEntry) GetIdentifier(formatType string) (int, error)
- func (btreeNodeEntry *BTreeNodeEntry) GetIdentifierType(formatType string) (int, error)
- func (btreeNodeEntry *BTreeNodeEntry) GetLocalDescriptorsIdentifier(formatType string) (int, error)
- func (btreeNodeEntry *BTreeNodeEntry) GetSize(formatType string) (int, error)
- type BTreeOnHeapHeader
- type ColumnDescriptor
- type Encoding
- type File
- func (pstFile *File) DecodeMessageBytesToString(message Message, data []byte) (string, error)
- func (pstFile *File) FindBTreeNode(btreeType int, identifier int, formatType string) (BTreeNodeEntry, error)
- func (pstFile *File) GetAttachment(message *Message, attachmentNumber int, formatType string, ...) (Attachment, error)
- func (pstFile *File) GetAttachmentFilename(attachment Attachment) (string, error)
- func (pstFile *File) GetAttachmentInputStream(attachment Attachment, formatType string, encryptionType string) (HeapOnNodeInputStream, error)
- func (pstFile *File) GetAttachmentLongFilename(attachment Attachment) (string, error)
- func (pstFile *File) GetAttachmentString(attachment Attachment, propertyID int) (string, error)
- func (pstFile *File) GetAttachments(message *Message, formatType string, encryptionType string) ([]Attachment, error)
- func (pstFile *File) GetAttachmentsCount(message *Message, formatType string, encryptionType string) (int, error)
- func (pstFile *File) GetAttachmentsTableContext(message *Message, formatType string, encryptionType string) ([][]TableContextItem, error)
- func (pstFile *File) GetBTreeNodeEntries(btreeNodeOffset int, formatType string) ([]BTreeNodeEntry, error)
- func (pstFile *File) GetBTreeNodeEntryCount(btreeNodeOffset int, formatType string) (int, error)
- func (pstFile *File) GetBTreeNodeEntrySize(btreeNodeOffset int, formatType string) (int, error)
- func (pstFile *File) GetBTreeNodeLevel(btreeNodeOffset int, formatType string) (int, error)
- func (pstFile *File) GetBTreeOnHeapHeader(heapOnNode HeapOnNode, localDescriptors []LocalDescriptor, formatType string, ...) (BTreeOnHeapHeader, error)
- func (pstFile *File) GetBlockBTreeNode(identifier int, formatType string) (BTreeNodeEntry, error)
- func (pstFile *File) GetBlockBTreeOffset(formatType string) (int, error)
- func (pstFile *File) GetBlockSize(formatType string) (int, error)
- func (pstFile *File) GetBlockTrailerSize(formatType string) (int, error)
- func (pstFile *File) GetBlocks(nodeEntryHeapOnNodeOffset int, formatType string) ([]BTreeNodeEntry, error)
- func (pstFile *File) GetBlocksTotalSize(nodeEntryHeapOnNodeOffset int) (int, error)
- func (pstFile *File) GetContentType() ([]byte, error)
- func (pstFile *File) GetDataBTreeNode(identifier int, formatType string) (BTreeNodeEntry, error)
- func (pstFile *File) GetEncryptionType(formatType string) (string, error)
- func (pstFile *File) GetFormatType() (string, error)
- func (pstFile *File) GetLocalDescriptors(btreeNodeEntry BTreeNodeEntry, formatType string) ([]LocalDescriptor, error)
- func (pstFile *File) GetLocalDescriptorsFromIdentifier(localDescriptorsIdentifier int, formatType string) ([]LocalDescriptor, error)
- func (pstFile *File) GetMessage(identifier int, formatType string, encryptionType string) (Message, error)
- func (pstFile *File) GetMessageBCC(message Message, formatType string, encryptionType string) (string, error)
- func (pstFile *File) GetMessageBody(message Message, formatType string, encryptionType string) (string, error)
- func (pstFile *File) GetMessageBodyHTML(message Message, formatType string, encryptionType string) (string, error)
- func (pstFile *File) GetMessageCC(message Message, formatType string, encryptionType string) (string, error)
- func (pstFile *File) GetMessageClass(message Message, formatType string, encryptionType string) (string, error)
- func (pstFile *File) GetMessageDate(message Message, propertyID int) (time.Time, error)
- func (pstFile *File) GetMessageEncoding(message Message) (Encoding, error)
- func (pstFile *File) GetMessageFrom(message Message, formatType string, encryptionType string) (string, error)
- func (pstFile *File) GetMessageHasAttachments(message Message) (bool, error)
- func (pstFile *File) GetMessageHeaders(message Message, formatType string, encryptionType string) (string, error)
- func (pstFile *File) GetMessageID(message Message, formatType string, encryptionType string) (string, error)
- func (pstFile *File) GetMessageInteger(message Message, propertyID int) (int, error)
- func (pstFile *File) GetMessageReceivedDate(message Message) (time.Time, error)
- func (pstFile *File) GetMessageStore(formatType string, encryptionType string) (MessageStore, error)
- func (pstFile *File) GetMessageString(message Message, propertyID int, formatType string, encryptionType string) (string, error)
- func (pstFile *File) GetMessageSubject(message Message, formatType string, encryptionType string) (string, error)
- func (pstFile *File) GetMessageTableContext(folder Folder, formatType string, encryptionType string) ([][]TableContextItem, error)
- func (pstFile *File) GetMessageTo(message Message, formatType string, encryptionType string) (string, error)
- func (pstFile *File) GetMessages(folder Folder, formatType string, encryptionType string) ([]Message, error)
- func (pstFile *File) GetNodeBTreeNode(identifier int, formatType string) (BTreeNodeEntry, error)
- func (pstFile *File) GetNodeBTreeOffset(formatType string) (int, error)
- func (pstFile *File) GetPropertyContext(heapOnNode HeapOnNode, formatType string, encryptionType string) ([]PropertyContextItem, error)
- func (pstFile *File) GetRootFolder(formatType string, encryptionType string) (Folder, error)
- func (pstFile *File) GetSubFolderTableContext(folder Folder, formatType string, encryptionType string) ([][]TableContextItem, error)
- func (pstFile *File) GetSubFolders(folder Folder, formatType string, encryptionType string) ([]Folder, error)
- func (pstFile *File) GetTableContext(heapOnNode HeapOnNode, localDescriptors []LocalDescriptor, formatType string, ...) ([][]TableContextItem, error)
- func (pstFile *File) InitializeBTree(btreeType int, formatType string) error
- func (pstFile *File) InitializeBTrees(formatType string) error
- func (pstFile *File) IsValidSignature() (bool, error)
- func (pstFile *File) NewHeapOnNodeFromLocalDescriptor(localDescriptor LocalDescriptor, formatType string, encryptionType string) (HeapOnNode, error)
- func (pstFile *File) NewHeapOnNodeFromNode(btreeNodeEntry BTreeNodeEntry, formatType string, encryptionType string) (HeapOnNode, error)
- func (pstFile *File) NewHeapOnNodeInputStream(btreeNodeEntry BTreeNodeEntry, formatType string, encryptionType string) (HeapOnNodeInputStream, error)
- func (pstFile *File) NewHeapOnNodeInputStreamFromHNID(hnid int, heapOnNode HeapOnNode, localDescriptors []LocalDescriptor, ...) (HeapOnNodeInputStream, error)
- func (pstFile *File) Read(outputBufferSize int, offset int) ([]byte, error)
- func (pstFile *File) WalkBTree(btreeOffset int, formatType string) ([]BTreeNodeEntry, error)
- func (pstFile *File) WriteAttachmentToFile(attachment Attachment, outputPath string, formatType string, ...) error
- type Folder
- type HeapOnNode
- type HeapOnNodeInputStream
- func (heapOnNodeInputStream *HeapOnNodeInputStream) Read(outputBufferSize int, offset int) ([]byte, error)
- func (heapOnNodeInputStream *HeapOnNodeInputStream) SeekAndReadUint16(outputBufferSize int, offset int) (int, error)
- func (heapOnNodeInputStream *HeapOnNodeInputStream) SeekAndReadUint32(outputBufferSize int, offset int) (int, error)
- type LocalDescriptor
- type Message
- type MessageStore
- type Property
- type PropertyContextItem
- type TableContextItem
Constants ¶
const ( BlockTypeXBlock = 1 BlockTypeXXBlock = 2 )
Constants defining the block types.
const ( IdentifierTypeHID = 0 IdentifierTypeInternal = 1 IdentifierTypeNormalFolder = 2 IdentifierTypeSearchFolder = 3 IdentifierTypeNormalMessage = 4 IdentifierTypeAttachment = 5 IdentifierTypeSearchUpdateQueue = 6 IdentifierTypeSearchCriteriaObject = 7 IdentifierTypeAssociatedMessage = 8 IdentifierTypeContentsTableIndex = 10 IdentifierTypeReceiveFolderTable = 11 IdentifierTypeOutgoingQueueTable = 12 IdentifierTypeHierarchyTable = 13 IdentifierTypeContentsTable = 14 IdentifierTypeAssociatedContentsTable = 15 IdentifierTypeSearchContentsTable = 16 IdentifierTypeAttachmentTable = 17 IdentifierTypeRecipientTable = 18 IdentifierTypeSearchTableIndex = 19 IdentifierTypeLTP = 31 IdentifierTypeRootFolder = 290 IdentifierTypeMessageStore = 33 )
Constants defining the identifier types. References "Identifier types".
const ( BTreeTypeNode = 0 BTreeTypeBlock = 1 )
Constants defining the b-tree types.
const ( FormatTypeANSI = "ANSI" FormatTypeUnicode = "Unicode" FormatTypeUnicode4k = "Unicode4k" )
Constants defining the format types. References "Format Types".
const ( EncryptionTypeNone = "None" EncryptionTypePermute = "Permute" EncryptionTypeCyclic = "Cyclic" )
Constants defining the encryption types. References "Encryption Types".
const ( PropertyTypeInteger16 = 2 PropertyTypeInteger32 = 3 PropertyTypeFloating32 = 4 PropertyTypeFloating64 = 5 PropertyTypeCurrency = 6 PropertyTypeFloatingTime = 7 PropertyTypeErrorCode = 10 PropertyTypeBoolean = 11 PropertyTypeInteger64 = 20 PropertyTypeString = 31 PropertyTypeString8 = 30 PropertyTypeTime = 64 PropertyTypeGUID = 72 PropertyTypeServerID = 251 PropertyTypeRestriction = 253 PropertyTypeRuleAction = 254 PropertyTypeBinary = 258 PropertyTypeMultipleInteger16 = 4098 PropertyTypeMultipleInteger32 = 4099 PropertyTypeMultipleFloating32 = 4100 PropertyTypeMultipleFloating64 = 4101 PropertyTypeMultipleCurrency = 4102 PropertyTypeMultipleFloatingTime = 4103 PropertyTypeMultipleInteger64 = 4116 PropertyTypeMultipleString = 4127 PropertyTypeMultipleString8 = 4126 PropertyTypeMultipleTime = 4160 PropertyTypeMultipleGUID = 4168 PropertyTypeMultipleBinary = 4354 PropertyTypeUnspecified = 0 PropertyTypeNull = 1 PropertyTypeObject = 13 )
Constants defining the property types. References "Property types".
Variables ¶
var ( ContentTypePST = []byte("SM") ContentTypeOST = []byte("SO") ContentTypePAB = []byte("AB") )
Constants defining the content types. References "Content Types".
Functions ¶
func DecodeBytesToUTF16String ¶
DecodeBytesToUTF16String decodes the bytes to UTF-16. The libpff documentation states: "Unicode strings are stored in UTF-16 little-endian without the byte order mark (BOM)."
func DecodeCompressibleEncryption ¶
DecodeCompressibleEncryption decodes the Heap-on-Node using compressible encryption. References "Compressible encryption".
Types ¶
type Attachment ¶
type Attachment struct { PropertyContext []PropertyContextItem LocalDescriptors []LocalDescriptor }
Attachment represents a message attachment.
type BTreeNodeEntry ¶
type BTreeNodeEntry struct { Data []byte Children []BTreeNodeEntry }
BTreeNodeEntry represents an entry in a b-tree node.
func FindBTreeNodeFromNode ¶
func FindBTreeNodeFromNode(btreeNode BTreeNodeEntry, identifier int, formatType string) (BTreeNodeEntry, error)
FindBTreeNodeFromNode recursively walks the children of this node to find the given identifier.
func (*BTreeNodeEntry) GetDataIdentifier ¶
func (btreeNodeEntry *BTreeNodeEntry) GetDataIdentifier(formatType string) (int, error)
GetDataIdentifier returns the node identifier of the data (in the node b-tree). References "The b-tree entries".
func (*BTreeNodeEntry) GetFileOffset ¶
func (btreeNodeEntry *BTreeNodeEntry) GetFileOffset(isBranchNode bool, formatType string) (int, error)
GetFileOffset returns the file offset for this b-tree branch or leaf node. References "The b-tree entries".
func (*BTreeNodeEntry) GetIdentifier ¶
func (btreeNodeEntry *BTreeNodeEntry) GetIdentifier(formatType string) (int, error)
GetIdentifier returns the identifier of this b-tree node entry. References "The b-tree entries".
func (*BTreeNodeEntry) GetIdentifierType ¶
func (btreeNodeEntry *BTreeNodeEntry) GetIdentifierType(formatType string) (int, error)
GetIdentifierType returns the b-tree node entry identifier type. References "The b-tree entries", "Identifier".
func (*BTreeNodeEntry) GetLocalDescriptorsIdentifier ¶
func (btreeNodeEntry *BTreeNodeEntry) GetLocalDescriptorsIdentifier(formatType string) (int, error)
GetLocalDescriptorsIdentifier returns the identifier to the local descriptors in the block b-tree.
type BTreeOnHeapHeader ¶
BTreeOnHeapHeader represents the b-tree on heap header.
type ColumnDescriptor ¶
type ColumnDescriptor struct { PropertyType int PropertyID int DataOffset int DataSize int CellExistenceBitmapIndex int }
ColumnDescriptor represents a column in the Table Context. References "Table Context", "Table Context Column Descriptor".
func NewColumnDescriptor ¶
func NewColumnDescriptor(tableContextInputStream HeapOnNodeInputStream, columnStartOffset int) (ColumnDescriptor, error)
NewColumnDescriptor is a constructor for creating column descriptors.
type Encoding ¶
type Encoding struct { // References https://docs.microsoft.com/en-us/windows/win32/intl/code-page-identifiers Identifier int Name string }
Encoding represents an IANA index encoding.
func FindEncoding ¶
FindEncoding returns the encoding by the specified identifier.
func GetEncodings ¶
GetEncodings returns all available encodings.
type File ¶
type File struct { Filepath string // Variables defining the node and block b-tree which need to be initialized. NodeBTree []BTreeNodeEntry BlockBTree []BTreeNodeEntry }
File represents a PST file.
func (*File) DecodeMessageBytesToString ¶
DecodeMessageBytesToString decodes the message property context item to string using the message encoding.
func (*File) FindBTreeNode ¶
func (pstFile *File) FindBTreeNode(btreeType int, identifier int, formatType string) (BTreeNodeEntry, error)
FindBTreeNode returns the node in the node or block b-tree with the given identifier. Note that we don't return the first identifier because there may be two or more nodes with the same identifier so prefer leaf nodes (which there is always only one of).
func (*File) GetAttachment ¶
func (pstFile *File) GetAttachment(message *Message, attachmentNumber int, formatType string, encryptionType string) (Attachment, error)
GetAttachment returns the specified attachment.
func (*File) GetAttachmentFilename ¶
func (pstFile *File) GetAttachmentFilename(attachment Attachment) (string, error)
GetAttachmentFilename returns the file name of this attachment.
func (*File) GetAttachmentInputStream ¶
func (pstFile *File) GetAttachmentInputStream(attachment Attachment, formatType string, encryptionType string) (HeapOnNodeInputStream, error)
GetAttachmentInputStream returns the input stream of this attachment.
func (*File) GetAttachmentLongFilename ¶
func (pstFile *File) GetAttachmentLongFilename(attachment Attachment) (string, error)
GetAttachmentLongFilename returns the long file name of this attachment.
func (*File) GetAttachmentString ¶
func (pstFile *File) GetAttachmentString(attachment Attachment, propertyID int) (string, error)
GetAttachmentString returns the string value of the property.
func (*File) GetAttachments ¶
func (pstFile *File) GetAttachments(message *Message, formatType string, encryptionType string) ([]Attachment, error)
GetAttachments returns the attachments of this message.
func (*File) GetAttachmentsCount ¶
func (pstFile *File) GetAttachmentsCount(message *Message, formatType string, encryptionType string) (int, error)
GetAttachmentsCount returns the amount of rows in the attachments table context.
func (*File) GetAttachmentsTableContext ¶
func (pstFile *File) GetAttachmentsTableContext(message *Message, formatType string, encryptionType string) ([][]TableContextItem, error)
GetAttachmentsTableContext returns the table context of the attachments of this message.
func (*File) GetBTreeNodeEntries ¶
func (pstFile *File) GetBTreeNodeEntries(btreeNodeOffset int, formatType string) ([]BTreeNodeEntry, error)
GetBTreeNodeEntries returns the entries in the b-tree node. References "The node and block b-tree".
func (*File) GetBTreeNodeEntryCount ¶
GetBTreeNodeEntryCount returns the amount of entries in the b-tree. References "The node and block b-tree".
func (*File) GetBTreeNodeEntrySize ¶
GetBTreeNodeEntrySize returns the size of an entry in the b-tree. References "The node and block b-tree".
func (*File) GetBTreeNodeLevel ¶
GetBTreeNodeLevel returns the level of the b-tree node. References "The node and block b-tree".
func (*File) GetBTreeOnHeapHeader ¶
func (pstFile *File) GetBTreeOnHeapHeader(heapOnNode HeapOnNode, localDescriptors []LocalDescriptor, formatType string, encryptionType string) (BTreeOnHeapHeader, error)
GetBTreeOnHeapHeader returns the btree on heap header.
func (*File) GetBlockBTreeNode ¶
func (pstFile *File) GetBlockBTreeNode(identifier int, formatType string) (BTreeNodeEntry, error)
GetBlockBTreeNode returns the node with the given identifier in the block b-tree.
func (*File) GetBlockBTreeOffset ¶
GetBlockBTreeOffset returns the file offset to the block b-tree. References "The 64-bit header data", "The 32-bit header data".
func (*File) GetBlockSize ¶
GetBlockSize returns the size of a block. References "Blocks".
func (*File) GetBlockTrailerSize ¶
GetBlockTrailerSize returns the size of a block trailer. References "Blocks".
func (*File) GetBlocks ¶
func (pstFile *File) GetBlocks(nodeEntryHeapOnNodeOffset int, formatType string) ([]BTreeNodeEntry, error)
GetBlocks parses the XBlock and XXBlock from a Heap-on-Node. Used by the NodeInputStream (internal identifiers have blocks).
func (*File) GetBlocksTotalSize ¶
GetBlocksTotalSize returns the size of the external data referenced by the XBlock or XXBlock.
func (*File) GetContentType ¶
GetContentType returns if the file is a PST, OST or PAB file. References "File Header", "Content Types".
func (*File) GetDataBTreeNode ¶
func (pstFile *File) GetDataBTreeNode(identifier int, formatType string) (BTreeNodeEntry, error)
GetDataBTreeNode searches the identifier in the node b-tree, then searches the data identifier in the block b-tree.
func (*File) GetEncryptionType ¶
GetEncryptionType returns the encryption type. References "The 64-bit header data", "The 32-bit header data", "Encryption Types".
func (*File) GetFormatType ¶
GetFormatType returns the format type. References "File Header", "Format Types".
func (*File) GetLocalDescriptors ¶
func (pstFile *File) GetLocalDescriptors(btreeNodeEntry BTreeNodeEntry, formatType string) ([]LocalDescriptor, error)
func (*File) GetLocalDescriptorsFromIdentifier ¶
func (pstFile *File) GetLocalDescriptorsFromIdentifier(localDescriptorsIdentifier int, formatType string) ([]LocalDescriptor, error)
GetLocalDescriptorsFromIdentifier returns the local descriptors of the local descriptors identifier. References "Local Descriptors".
func (*File) GetMessage ¶
func (pstFile *File) GetMessage(identifier int, formatType string, encryptionType string) (Message, error)
GetMessage returns the message of the identifier.
func (*File) GetMessageBCC ¶
func (pstFile *File) GetMessageBCC(message Message, formatType string, encryptionType string) (string, error)
GetMessageBCC returns the BCC of this message.
func (*File) GetMessageBody ¶
func (pstFile *File) GetMessageBody(message Message, formatType string, encryptionType string) (string, error)
GetMessageBody returns the plaintext body of the message.
func (*File) GetMessageBodyHTML ¶
func (pstFile *File) GetMessageBodyHTML(message Message, formatType string, encryptionType string) (string, error)
GetMessageBodyHTML returns the HTML body of this message.
func (*File) GetMessageCC ¶
func (pstFile *File) GetMessageCC(message Message, formatType string, encryptionType string) (string, error)
GetMessageCC returns the "CC" header.
func (*File) GetMessageClass ¶
func (pstFile *File) GetMessageClass(message Message, formatType string, encryptionType string) (string, error)
GetMessageClass returns the message class.
func (*File) GetMessageDate ¶
GetMessageDate returns the date value of the property.
func (*File) GetMessageEncoding ¶
GetEncoding returns the encoding of the message.
func (*File) GetMessageFrom ¶
func (pstFile *File) GetMessageFrom(message Message, formatType string, encryptionType string) (string, error)
GetFrom returns the "From" header.
func (*File) GetMessageHasAttachments ¶
GetMessageHasAttachments returns true if this message has attachments.
func (*File) GetMessageHeaders ¶
func (pstFile *File) GetMessageHeaders(message Message, formatType string, encryptionType string) (string, error)
GetMessageHeaders return the message headers.
func (*File) GetMessageID ¶
func (pstFile *File) GetMessageID(message Message, formatType string, encryptionType string) (string, error)
GetMessageID returns the message ID.
func (*File) GetMessageInteger ¶
GetMessageInteger returns the integer value of the property.
func (*File) GetMessageReceivedDate ¶
GetMessageReceivedDate returns the date this message was received.
func (*File) GetMessageStore ¶
func (pstFile *File) GetMessageStore(formatType string, encryptionType string) (MessageStore, error)
GetMessageStore returns the message store of the PST file.
func (*File) GetMessageString ¶
func (pstFile *File) GetMessageString(message Message, propertyID int, formatType string, encryptionType string) (string, error)
GetMessageString returns the string value of the property.
func (*File) GetMessageSubject ¶
func (pstFile *File) GetMessageSubject(message Message, formatType string, encryptionType string) (string, error)
GetSubject returns the subject of this message.
func (*File) GetMessageTableContext ¶
func (pstFile *File) GetMessageTableContext(folder Folder, formatType string, encryptionType string) ([][]TableContextItem, error)
GetMessageTableContext returns the message table context of this folder.
func (*File) GetMessageTo ¶
func (pstFile *File) GetMessageTo(message Message, formatType string, encryptionType string) (string, error)
GetMessageTo returns the "To" header.
func (*File) GetMessages ¶
func (pstFile *File) GetMessages(folder Folder, formatType string, encryptionType string) ([]Message, error)
GetMessages returns an array of messages from the message table context.
func (*File) GetNodeBTreeNode ¶
func (pstFile *File) GetNodeBTreeNode(identifier int, formatType string) (BTreeNodeEntry, error)
GetNodeBTreeNode returns the node with the given identifier in the node b-tree.
func (*File) GetNodeBTreeOffset ¶
GetNodeBTreeOffset returns the file offset to the node b-tree. References "The 64-bit header data", "The 32-bit header data".
func (*File) GetPropertyContext ¶
func (pstFile *File) GetPropertyContext(heapOnNode HeapOnNode, formatType string, encryptionType string) ([]PropertyContextItem, error)
GetPropertyContext returns the property context (BC Table). References "Property Context".
func (*File) GetRootFolder ¶
GetRootFolder returns the root folder of the PST file.
func (*File) GetSubFolderTableContext ¶
func (pstFile *File) GetSubFolderTableContext(folder Folder, formatType string, encryptionType string) ([][]TableContextItem, error)
GetSubFolderTableContext returns the table context for the sub-folders of this folder.
func (*File) GetSubFolders ¶
func (pstFile *File) GetSubFolders(folder Folder, formatType string, encryptionType string) ([]Folder, error)
GetSubFolders returns the sub folders of this folder.
func (*File) GetTableContext ¶
func (pstFile *File) GetTableContext(heapOnNode HeapOnNode, localDescriptors []LocalDescriptor, formatType string, encryptionType string, startAtRow int, numberOfRowsToReturn int, columnToGet int) ([][]TableContextItem, error)
GetTableContext returns the table context. The number of rows to return may be -1 to return all rows. References "Table Context".
func (*File) InitializeBTree ¶
InitializeBTree walks the b-tree and finds the node with the given identifier.
func (*File) InitializeBTrees ¶
InitializeBTrees initializes the node and block b-tree.
func (*File) IsValidSignature ¶
IsValidSignature returns true is the file matches the PFF format signature. References "File Header".
func (*File) NewHeapOnNodeFromLocalDescriptor ¶
func (pstFile *File) NewHeapOnNodeFromLocalDescriptor(localDescriptor LocalDescriptor, formatType string, encryptionType string) (HeapOnNode, error)
NewHeapOnNodeFromLocalDescriptor creates a Heap-on-Node from the local descriptor.
func (*File) NewHeapOnNodeFromNode ¶
func (pstFile *File) NewHeapOnNodeFromNode(btreeNodeEntry BTreeNodeEntry, formatType string, encryptionType string) (HeapOnNode, error)
NewHeapOnNodeFromNode creates a Heap-on-Node from the b-tree node entry.
func (*File) NewHeapOnNodeInputStream ¶
func (pstFile *File) NewHeapOnNodeInputStream(btreeNodeEntry BTreeNodeEntry, formatType string, encryptionType string) (HeapOnNodeInputStream, error)
NewHeapOnNodeInputStream creates a node input stream from the Heap-on-Node.
func (*File) NewHeapOnNodeInputStreamFromHNID ¶
func (pstFile *File) NewHeapOnNodeInputStreamFromHNID(hnid int, heapOnNode HeapOnNode, localDescriptors []LocalDescriptor, formatType string, encryptionType string) (HeapOnNodeInputStream, error)
NewHeapOnNodeInputStreamFromHNID returns the offsets from the allocation table of the given HID.
func (*File) WalkBTree ¶
func (pstFile *File) WalkBTree(btreeOffset int, formatType string) ([]BTreeNodeEntry, error)
WalkBTree walks the b-tree and returns all nodes.
func (*File) WriteAttachmentToFile ¶
func (pstFile *File) WriteAttachmentToFile(attachment Attachment, outputPath string, formatType string, encryptionType string) error
WriteAttachmentToFile writes the input stream of the attachment to the specified output path.
type Folder ¶
type Folder struct { Identifier int DisplayName string HasSubFolders bool MessageCount int PropertyContext []PropertyContextItem }
Folder represents a folder.
type HeapOnNode ¶
type HeapOnNode struct { BTreeNodeEntry BTreeNodeEntry InputStream HeapOnNodeInputStream }
HeapOnNode represents a Heap-on-Node.
func (*HeapOnNode) GetHIDUserRoot ¶
func (heapOnNode *HeapOnNode) GetHIDUserRoot() (int, error)
GetHIDUserRoot returns the HID user root. References "Heap-on-Node header".
func (*HeapOnNode) GetPageMap ¶
func (heapOnNode *HeapOnNode) GetPageMap(blockOffset int) (int, error)
GetPageMap returns the Heap-on-Node Page Map. References "Heap-on-Node page map".
func (*HeapOnNode) GetTableType ¶
func (heapOnNode *HeapOnNode) GetTableType() (int, error)
GetTableType returns the table type. References "Heap-on-Node header", "Table types".
func (*HeapOnNode) IsValidSignature ¶
func (heapOnNode *HeapOnNode) IsValidSignature() (bool, error)
IsValidSignature returns true if the signature of the block matches 0xEC (236). References "Heap-on-Node header".
type HeapOnNodeInputStream ¶
type HeapOnNodeInputStream struct { File *File FormatType string EncryptionType string FileOffset int StartOffset int Size int Blocks []BTreeNodeEntry }
HeapOnNodeInputStream represents a node input stream for a Heap-on-Node.
func (*HeapOnNodeInputStream) Read ¶
func (heapOnNodeInputStream *HeapOnNodeInputStream) Read(outputBufferSize int, offset int) ([]byte, error)
Read reads from the node input stream.
func (*HeapOnNodeInputStream) SeekAndReadUint16 ¶
func (heapOnNodeInputStream *HeapOnNodeInputStream) SeekAndReadUint16(outputBufferSize int, offset int) (int, error)
SeekAndReadUint16 seeks and reads an uint16.
func (*HeapOnNodeInputStream) SeekAndReadUint32 ¶
func (heapOnNodeInputStream *HeapOnNodeInputStream) SeekAndReadUint32(outputBufferSize int, offset int) (int, error)
SeekAndReadUint32 seeks and reads an uint32.
type LocalDescriptor ¶
type LocalDescriptor struct {
Data []byte
}
LocalDescriptor represents an item in the local descriptors.
func FindLocalDescriptor ¶
func FindLocalDescriptor(localDescriptors []LocalDescriptor, identifier int, formatType string) (LocalDescriptor, error)
FindLocalDescriptor returns the local descriptor with the specified identifier.
func (*LocalDescriptor) GetDataIdentifier ¶
func (localDescriptor *LocalDescriptor) GetDataIdentifier(formatType string) (int, error)
GetDataIdentifier returns the data identifier of the local descriptor. References "Local Descriptors".
func (*LocalDescriptor) GetIdentifier ¶
func (localDescriptor *LocalDescriptor) GetIdentifier(formatType string) (int, error)
GetIdentifier returns the identifier of the local descriptor. References "Local Descriptors".
func (*LocalDescriptor) GetLocalDescriptorsIdentifier ¶
func (localDescriptor *LocalDescriptor) GetLocalDescriptorsIdentifier(formatType string) (int, error)
GetLocalDescriptorsIdentifier returns the local descriptors identifier of the local descriptor. References "Local Descriptors".
type Message ¶
type Message struct { PropertyContext []PropertyContextItem LocalDescriptors []LocalDescriptor AttachmentsTableContext [][]TableContextItem }
Message represents a message.
type MessageStore ¶
type MessageStore struct {
PropertyContext []PropertyContextItem
}
MessageStore represents the message store.
type Property ¶
Property represents a property.
func FindProperty ¶
FindProperty finds the property from the property ID.
func GetProperties ¶
GetProperties returns all available properties.
type PropertyContextItem ¶
type PropertyContextItem struct { Index int PropertyID int PropertyType int ReferenceHNID int IsExternalValueReference bool Data []byte }
PropertyContextItem represents an item within the property context. References "Property Context B-Tree-on-Heap Record".
func FindPropertyContextItem ¶
func FindPropertyContextItem(propertyContext []PropertyContextItem, propertyID int) (PropertyContextItem, error)
FindPropertyContextItem returns the property context item from the property ID.
func (*PropertyContextItem) String ¶
func (propertyContextItem *PropertyContextItem) String() (string, error)
String returns the string representation of this property.