Documentation
¶
Index ¶
- func ResolveMessageText(rawMessage string, msgType string, textContent string, format MessageFormat) string
- type BridgeLookup
- type Message
- type MessageFormat
- type MessageListOptions
- type Participant
- type SearchOptions
- type SearchResult
- type Store
- func (s *Store) Close() error
- func (s *Store) GetMessageWithContext(ctx context.Context, messageID string, contextSize int, format MessageFormat) ([]Message, Thread, int, error)
- func (s *Store) GetThread(ctx context.Context, threadID string) (Thread, error)
- func (s *Store) HasFTS(ctx context.Context) (bool, error)
- func (s *Store) LatestMessage(ctx context.Context, threadID string, format MessageFormat) (Message, error)
- func (s *Store) ListMessages(ctx context.Context, opts MessageListOptions) ([]Message, Thread, error)
- func (s *Store) ListThreads(ctx context.Context, opts ThreadListOptions) ([]Thread, error)
- func (s *Store) SearchMessages(ctx context.Context, opts SearchOptions) ([]SearchResult, error)
- type StoreOptions
- type Thread
- type ThreadListOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResolveMessageText ¶
func ResolveMessageText(rawMessage string, msgType string, textContent string, format MessageFormat) string
Types ¶
type BridgeLookup ¶
type BridgeLookup struct {
// contains filtered or unexported fields
}
BridgeLookup resolves DM names via platform bridge databases.
func NewBridgeLookup ¶
func NewBridgeLookup(indexDBPath string, overrideRoot string) (*BridgeLookup, error)
NewBridgeLookup discovers megabridge.db files under the Beeper support directory.
func (*BridgeLookup) Count ¶ added in v0.2.1
func (b *BridgeLookup) Count() int
Count returns the number of discovered bridge databases.
func (*BridgeLookup) LookupDMName ¶
func (b *BridgeLookup) LookupDMName(ctx context.Context, roomID string, accountID string) (string, bool, error)
LookupDMName attempts to resolve a DM name for the given room ID.
func (*BridgeLookup) Platforms ¶ added in v0.2.1
func (b *BridgeLookup) Platforms() []string
Platforms returns the list of platforms with discovered bridge databases.
type MessageFormat ¶
type MessageFormat string
const ( FormatPlain MessageFormat = "plain" FormatRich MessageFormat = "rich" )
type MessageListOptions ¶
type Participant ¶
type SearchOptions ¶
type SearchResult ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func OpenWithOptions ¶
func OpenWithOptions(path string, opts StoreOptions) (*Store, error)
func (*Store) GetMessageWithContext ¶
func (*Store) LatestMessage ¶
func (*Store) ListMessages ¶
func (*Store) ListThreads ¶
func (*Store) SearchMessages ¶
func (s *Store) SearchMessages(ctx context.Context, opts SearchOptions) ([]SearchResult, error)
type StoreOptions ¶
type ThreadListOptions ¶
Click to show internal directories.
Click to hide internal directories.