Documentation
¶
Index ¶
- func IsNotFound(err error) bool
- type Chat
- type DB
- func (d *DB) Close() error
- func (d *DB) CountChats() (int64, error)
- func (d *DB) CountMessages() (int64, error)
- func (d *DB) GetChat(peerID string) (Chat, error)
- func (d *DB) GetMessage(chatID string, msgID int) (Message, error)
- func (d *DB) HasFTS() bool
- func (d *DB) ListChats(kind string, limit int) ([]Chat, error)
- func (d *DB) ListMessages(p ListMessagesParams) ([]Message, error)
- func (d *DB) MessageContext(chatID string, msgID int, before, after int) ([]Message, error)
- func (d *DB) SearchMessages(p SearchMessagesParams) ([]Message, error)
- func (d *DB) UpdateMessageLocalPath(chatID string, msgID int, localPath string) error
- func (d *DB) UpsertChat(peerID, kind, name string, lastMsgTS time.Time) error
- func (d *DB) UpsertMessage(p UpsertMessageParams) error
- type ListMessagesParams
- type Message
- type SearchMessagesParams
- type UpsertMessageParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNotFound ¶
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) CountChats ¶
func (*DB) CountMessages ¶
func (*DB) ListMessages ¶
func (d *DB) ListMessages(p ListMessagesParams) ([]Message, error)
func (*DB) MessageContext ¶
func (*DB) SearchMessages ¶
func (d *DB) SearchMessages(p SearchMessagesParams) ([]Message, error)
func (*DB) UpdateMessageLocalPath ¶
func (*DB) UpsertChat ¶
func (*DB) UpsertMessage ¶
func (d *DB) UpsertMessage(p UpsertMessageParams) error
type ListMessagesParams ¶
type Message ¶
type Message struct {
ChatID string `json:"chat_id"`
ChatName string `json:"chat_name"`
MsgID int `json:"msg_id"`
SenderID string `json:"sender_id"`
SenderName string `json:"sender_name"`
Timestamp time.Time `json:"timestamp"`
FromMe bool `json:"from_me"`
Text string `json:"text"`
MediaType string `json:"media_type,omitempty"`
Snippet string `json:"snippet,omitempty"`
}
type SearchMessagesParams ¶
Click to show internal directories.
Click to hide internal directories.