Documentation ¶
Overview ¶
Package chatdb provides an interface ChatDB for interacting with the Mac OS Messages database typically located at $HOME/Library/Messages/chat.db. See [this Medium post](https://towardsdatascience.com/heres-how-you-can-access-your-entire-imessage-history-on-your-mac-f8878276c6e9) for a decent primer on navigating the database. Specifically, this package is tailored to supporting the exporting of all messages in the database to readable, searchable text files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
Attachment represents a row from the attachment table.
type ChatDB ¶
type ChatDB interface { // Init determines the version of the database, preparing it to make the // appropriate queries. Init(macOSVersion *semver.Version) error // GetHandleMap returns a mapping from handle ID to phone number or email // address. If a contact map is supplied, it will attempt to resolve these // handles to formatted names. GetHandleMap(contactMap map[string]*vcard.Card) (map[int]string, error) // GetChats returns a slice of EntityChats, effectively a table scan of // the chat table. GetChats(contactMap map[string]*vcard.Card) ([]EntityChats, error) // GetMessageIDs returns a slice of DatedMessageIDs corresponding to a // given chat ID. GetMessageIDs(chatID int) ([]DatedMessageID, error) // GetMessage returns a message retrieved from the database formatted for // writing to a chat file, as well as flag indicating the validity of the // text in the message. GetMessage(messageID int, handleMap map[int]string) (string, bool, error) // GetAttachmentPaths returns a list of attachment filepaths associated with // each message ID. GetAttachmentPaths(ptools pathtools.PathTools) (map[int][]Attachment, error) }
ChatDB extracts data from a Mac OS Messages database on disk.
type DatedMessageID ¶
DatedMessageID pairs a message ID and its date, in the legacy date format.
type EntityChats ¶
EntityChats represents all of the chats with a given entity (associated with the same vCard, phone number, or email address). In the case of group chats, this struct will only contain a single Chat.
Directories ¶
Path | Synopsis |
---|---|
Package mock_chatdb is a generated GoMock package.
|
Package mock_chatdb is a generated GoMock package. |