Versions in this module Expand all Collapse all v4 v4.0.0 May 8, 2022 Changes in this version + const BTreeTypeBlock + const BTreeTypeNode + const BlockTypeXBlock + const BlockTypeXXBlock + const EncryptionTypeCyclic + const EncryptionTypeNone + const EncryptionTypePermute + const FormatTypeANSI + const FormatTypeUnicode + const FormatTypeUnicode4k + const IdentifierTypeAssociatedContentsTable + const IdentifierTypeAssociatedMessage + const IdentifierTypeAttachment + const IdentifierTypeAttachmentTable + const IdentifierTypeContentsTable + const IdentifierTypeContentsTableIndex + const IdentifierTypeHID + const IdentifierTypeHierarchyTable + const IdentifierTypeInternal + const IdentifierTypeLTP + const IdentifierTypeMessageStore + const IdentifierTypeNameToIDMap + const IdentifierTypeNormalFolder + const IdentifierTypeNormalMessage + const IdentifierTypeOutgoingQueueTable + const IdentifierTypeReceiveFolderTable + const IdentifierTypeRecipientTable + const IdentifierTypeRootFolder + const IdentifierTypeSearchContentsTable + const IdentifierTypeSearchCriteriaObject + const IdentifierTypeSearchFolder + const IdentifierTypeSearchTableIndex + const IdentifierTypeSearchUpdateQueue + const PropertyTypeBinary + const PropertyTypeBoolean + const PropertyTypeCurrency + const PropertyTypeErrorCode + const PropertyTypeFloating32 + const PropertyTypeFloating64 + const PropertyTypeFloatingTime + const PropertyTypeGUID + const PropertyTypeInteger16 + const PropertyTypeInteger32 + const PropertyTypeInteger64 + const PropertyTypeMultipleBinary + const PropertyTypeMultipleCurrency + const PropertyTypeMultipleFloating32 + const PropertyTypeMultipleFloating64 + const PropertyTypeMultipleFloatingTime + const PropertyTypeMultipleGUID + const PropertyTypeMultipleInteger16 + const PropertyTypeMultipleInteger32 + const PropertyTypeMultipleInteger64 + const PropertyTypeMultipleString + const PropertyTypeMultipleString8 + const PropertyTypeMultipleTime + const PropertyTypeNull + const PropertyTypeObject + const PropertyTypeRestriction + const PropertyTypeRuleAction + const PropertyTypeServerID + const PropertyTypeString + const PropertyTypeString8 + const PropertyTypeTime + const PropertyTypeUnspecified + var BTreeDegree = 6 + var ContentTypeOST = []byte("SO") + var ContentTypePAB = []byte("AB") + var ContentTypePST = []byte("SM") + var PropertySetAddress = 2 + var PropertySetAirSync = 13 + var PropertySetAppointment = 4 + var PropertySetAttachment = 16 + var PropertySetCommon = 1 + var PropertySetInternetHeaders = 3 + var PropertySetLog = 6 + var PropertySetMAPI = 12 + var PropertySetMeeting = 5 + var PropertySetMessaging = 7 + var PropertySetNote = 8 + var PropertySetPostRSS = 9 + var PropertySetPublicStrings = 0 + var PropertySetSharing = 14 + var PropertySetTask = 10 + var PropertySetUnifiedMessaging = 11 + var PropertySetXMLExtractedEntities = 15 + var PropertySets = []string + func DecodeBytesToString(encoding Encoding, data []byte) (string, error) + func DecodeBytesToUTF16String(input []byte) (string, error) + func DecodeCompressibleEncryption(data []byte) []byte + func GetBTreeNodeEntryDataIdentifier(nodeEntryData []byte, formatType string) (int, error) + func GetBTreeNodeEntryFileOffset(nodeEntryData []byte, formatType string, isBranchNode bool) (int, error) + func GetBTreeNodeEntryIdentifier(nodeEntryData []byte, formatType string) (int, error) + func GetBTreeNodeEntryIdentifierType(nodeEntryData []byte, formatType string) (int, error) + func GetBTreeNodeEntryLocalDescriptorsIdentifier(nodeEntryData []byte, formatType string) (int, error) + func GetBTreeNodeEntrySize(nodeEntryData []byte, formatType string) (int, error) + type Attachment struct + LocalDescriptors []LocalDescriptor + PropertyContext []PropertyContextItem + func (attachment *Attachment) GetFilename() (string, error) + func (attachment *Attachment) GetInputStream(pstFile *File, formatType string, encryptionType string) (HeapOnNodeInputStream, error) + func (attachment *Attachment) GetLongFilename() (string, error) + func (attachment *Attachment) GetString(propertyID int) (string, error) + func (attachment *Attachment) WriteToFile(outputPath string, pstFile *File, formatType string, encryptionType string) error + type BTreeNodeEntry struct + DataIdentifier int + FileOffset int + Identifier int + IdentifierType int + LocalDescriptorsIdentifier int + NodeLevel int + Size int + func NewBTreeNodeEntry(nodeEntryData []byte, formatType string, nodeLevel int) (BTreeNodeEntry, error) + func (btreeNodeEntry BTreeNodeEntry) Less(than BTreeNodeEntry) bool + type BTreeOnHeapHeader struct + HIDRoot int + KeySize int + Levels int + TableType int + ValueSize int + type ColumnDescriptor struct + CellExistenceBitmapIndex int + DataOffset int + DataSize int + PropertyID int + PropertyType int + func NewColumnDescriptor(tableContextInputStream HeapOnNodeInputStream, columnStartOffset int) (ColumnDescriptor, error) + type Encoding struct + Identifier int + Name string + func FindEncoding(identifier int) (Encoding, error) + func GetEncodings() ([]Encoding, error) + func (encoding *Encoding) String() string + type File struct + BlockBTree *btree.BTree[BTreeNodeEntry] + FormatType string + NameToIDMap *NameToIDMap + NodeBTree *btree.BTree[BTreeNodeEntry] + Reader io.ReadSeekCloser + func NewFromFile(filePath string) (File, error) + func NewFromReader(reader io.ReadSeekCloser) File + func (pstFile *File) Close() error + func (pstFile *File) FindBTreeNode(btreeType int, identifier int) (BTreeNodeEntry, error) + func (pstFile *File) GetBTreeNodeEntries(btreeNodeOffset int, formatType string, nodeLevel int) ([]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) (BTreeNodeEntry, error) + func (pstFile *File) GetBlockBTreeOffset(formatType string) (int, error) + func (pstFile *File) GetBlockIdentifierSize(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) (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) GetMessageStore(formatType string, encryptionType string) (MessageStore, error) + func (pstFile *File) GetMessageTableContext(folder Folder, formatType string, encryptionType string) ([][]TableContextItem, error) + func (pstFile *File) GetMessages(folder Folder, formatType string, encryptionType string) ([]Message, error) + func (pstFile *File) GetNameToIDMap(formatType string, encryptionType string) (*NameToIDMap, error) + func (pstFile *File) GetNodeBTreeNode(identifier int) (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) InitializeNameToIDMap(formatType string, encryptionType 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(nodeEntry 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) WalkAndCreateBTree(nodeEntryBTree *btree.BTree[BTreeNodeEntry], btreeOffset int, ...) error + type Folder struct + DisplayName string + HasSubFolders bool + Identifier int + MessageCount int + PropertyContext []PropertyContextItem + type GUID struct + Data1 uint32 + Data2 uint16 + Data3 uint16 + Data4 [8]byte + func GUIDFromWindowsArray(b [16]byte) GUID + func (g GUID) String() string + type HeapOnNode struct + BTreeNodeEntry BTreeNodeEntry + InputStream HeapOnNodeInputStream + func (heapOnNode *HeapOnNode) GetHIDUserRoot() (int, error) + func (heapOnNode *HeapOnNode) GetPageMap(blockOffset int) (int, error) + func (heapOnNode *HeapOnNode) GetTableType() (int, error) + func (heapOnNode *HeapOnNode) IsValidSignature() (bool, error) + type HeapOnNodeInputStream struct + Blocks []BTreeNodeEntry + EncryptionType string + File *File + FileOffset int + FormatType string + Size int + StartOffset int + UnencryptedInternalAttachmentData []byte + func (heapOnNodeInputStream *HeapOnNodeInputStream) Read(outputBufferSize int, offset int) ([]byte, error) + func (heapOnNodeInputStream *HeapOnNodeInputStream) ReadCompletely() ([]byte, error) + func (heapOnNodeInputStream *HeapOnNodeInputStream) SeekAndReadUint16(outputBufferSize int, offset int) (int, error) + func (heapOnNodeInputStream *HeapOnNodeInputStream) SeekAndReadUint32(outputBufferSize int, offset int) (int, error) + type LocalDescriptor struct + func FindLocalDescriptor(localDescriptors []LocalDescriptor, identifier int, formatType string) (LocalDescriptor, error) + func (localDescriptor *LocalDescriptor) GetData(pstFile *File, formatType string, encryptionType string) ([]byte, error) + func (localDescriptor *LocalDescriptor) GetDataIdentifier(formatType string) (int, error) + func (localDescriptor *LocalDescriptor) GetIdentifier(formatType string) (int, error) + func (localDescriptor *LocalDescriptor) GetLocalDescriptorsIdentifier(formatType string) (int, error) + type Message struct + AttachmentsTableContext [][]TableContextItem + LocalDescriptors []LocalDescriptor + PropertyContext []PropertyContextItem + func (message *Message) GetAppointmentAllAttendees(pstFile *File, formatType string, encryptionType string) (string, error) + func (message *Message) GetAppointmentEndTime(pstFile *File) (time.Time, error) + func (message *Message) GetAppointmentLocation(pstFile *File, formatType string, encryptionType string) (string, error) + func (message *Message) GetAppointmentStartTime(pstFile *File) (time.Time, error) + func (message *Message) GetAttachment(attachmentNumber int, pstFile *File, formatType string, encryptionType string) (Attachment, error) + func (message *Message) GetAttachments(pstFile *File, formatType string, encryptionType string) ([]Attachment, error) + func (message *Message) GetAttachmentsCount(pstFile *File, formatType string, encryptionType string) (int, error) + func (message *Message) GetAttachmentsTableContext(pstFile *File, formatType string, encryptionType string) ([][]TableContextItem, error) + func (message *Message) GetBCC(pstFile *File, formatType string, encryptionType string) (string, error) + func (message *Message) GetBody(pstFile *File, formatType string, encryptionType string) (string, error) + func (message *Message) GetBodyHTML(pstFile *File, formatType string, encryptionType string) (string, error) + func (message *Message) GetCC(pstFile *File, formatType string, encryptionType string) (string, error) + func (message *Message) GetContactBusinessPhoneNumber(pstFile *File, formatType string, encryptionType string) (string, error) + func (message *Message) GetContactCompanyName(pstFile *File, formatType string, encryptionType string) (string, error) + func (message *Message) GetContactEmailDisplayName(pstFile *File, formatType string, encryptionType string) (string, error) + func (message *Message) GetContactGivenName(pstFile *File, formatType string, encryptionType string) (string, error) + func (message *Message) GetContactMobilePhoneNumber(pstFile *File, formatType string, encryptionType string) (string, error) + func (message *Message) GetDate(propertyID int) (time.Time, error) + func (message *Message) GetEncoding() (Encoding, error) + func (message *Message) GetFrom(pstFile *File, formatType string, encryptionType string) (string, error) + func (message *Message) GetHeaders(pstFile *File, formatType string, encryptionType string) (string, error) + func (message *Message) GetInteger(propertyID int) (int, error) + func (message *Message) GetMessageClass(pstFile *File, formatType string, encryptionType string) (string, error) + func (message *Message) GetMessageID(pstFile *File, formatType string, encryptionType string) (string, error) + func (message *Message) GetReceivedDate() (time.Time, error) + func (message *Message) GetString(propertyID int, pstFile *File, formatType string, encryptionType string) (string, error) + func (message *Message) GetSubject(pstFile *File, formatType string, encryptionType string) (string, error) + func (message *Message) GetTo(pstFile *File, formatType string, encryptionType string) (string, error) + func (message *Message) HasAttachments() (bool, error) + type MessageStore struct + PropertyContext []PropertyContextItem + type NameToIDMap struct + IDToName map[int]int + IDToString map[int]string + NameToID map[int]int + PropertySets []string + StringToID map[string]int + func (nameToIDMap *NameToIDMap) GetPropertyID(key int, propertySetIndex int) (int, error) + type Property struct + ID int + Name string + func FindProperty(propertyID int) (Property, error) + func GetProperties() ([]Property, error) + type PropertyContextItem struct + Index int + IsExternalValueReference bool + PropertyID int + PropertyType int + ReferenceHNID int + func FindPropertyContextItem(propertyContext []PropertyContextItem, propertyID int) (PropertyContextItem, error) + func (propertyContextItem *PropertyContextItem) GetData(pstFile *File, localDescriptors []LocalDescriptor, formatType string, ...) ([]byte, error) + func (propertyContextItem *PropertyContextItem) GetDate() time.Time + func (propertyContextItem *PropertyContextItem) GetInteger() int + func (propertyContextItem *PropertyContextItem) GetString(encoding Encoding, localDescriptors []LocalDescriptor, pstFile *File, ...) (string, error) + func (propertyContextItem *PropertyContextItem) String() (string, error) + type TableContextItem struct + Data []byte + IsExternalValueReference bool + PropertyID int + PropertyType int + ReferenceHNID int Other modules containing this package github.com/mooijtech/go-pst github.com/mooijtech/go-pst/v2 github.com/mooijtech/go-pst/v3 github.com/mooijtech/go-pst/v5 github.com/mooijtech/go-pst/v6