Documentation ¶
Index ¶
- Constants
- type Backfill
- type BackfillQuery
- func (bq *BackfillQuery) Count(ctx context.Context, userID id.UserID) (count int, err error)
- func (bq *BackfillQuery) DeleteAll(userID id.UserID)
- func (bq *BackfillQuery) DeleteAllForPortal(userID id.UserID, portalGUID string)
- func (bq *BackfillQuery) GetBackfillState(userID id.UserID, portalGUID string) (backfillState *BackfillState)
- func (bq *BackfillQuery) GetNext(userID id.UserID) (backfill *Backfill)
- func (bq *BackfillQuery) IncompleteCount(ctx context.Context, userID id.UserID) (incompleteCount int, err error)
- func (bq *BackfillQuery) New() *Backfill
- func (bq *BackfillQuery) NewBackfillState(userID id.UserID, portalGUID string) *BackfillState
- func (bq *BackfillQuery) NewWithValues(userID id.UserID, priority int, portalGUID string, ...) *Backfill
- type BackfillState
- type Database
- type KeyValueQuery
- type MergedChatQuery
- type Message
- type MessageQuery
- func (mq *MessageQuery) FindChatByGUID(guid string) (chatGUID string)
- func (mq *MessageQuery) GetByGUID(chat string, guid string, part int) *Message
- func (mq *MessageQuery) GetByMXID(mxid id.EventID) *Message
- func (mq *MessageQuery) GetEarliestTimestampInChat(chat string) (int64, error)
- func (mq *MessageQuery) GetFirstInChat(chat string) *Message
- func (mq *MessageQuery) GetIDsSince(chat string, since time.Time) (messages []string)
- func (mq *MessageQuery) GetLastByGUID(chat string, guid string) *Message
- func (mq *MessageQuery) GetLastInChat(chat string) *Message
- func (mq *MessageQuery) MergePortalGUID(txn dbutil.Execable, to string, from ...string) int64
- func (mq *MessageQuery) New() *Message
- func (mq *MessageQuery) SplitPortalGUID(txn dbutil.Execable, fromHandle, fromPortal, to string) int64
- type Portal
- type PortalQuery
- func (pq *PortalQuery) Count() (count int)
- func (pq *PortalQuery) FindByThreadID(threadID string) []*Portal
- func (pq *PortalQuery) FindPrivateChats() []*Portal
- func (pq *PortalQuery) GetAllWithMXID() []*Portal
- func (pq *PortalQuery) GetByGUID(guid string) *Portal
- func (pq *PortalQuery) GetByMXID(mxid id.RoomID) *Portal
- func (pq *PortalQuery) New() *Portal
- type Puppet
- type PuppetQuery
- type Tapback
- type TapbackQuery
- type User
- type UserQuery
Constants ¶
View Source
const ( KVSendStatusStart = "com.beeper.send_status_start" KVBridgeWasConnected = "bridge_was_connected" KVBridgeFirstConnect = "bridge_first_connect" KVBridgeInfoVersion = "bridge_info_version" KVLookedForPortals = "looked_for_portals" ExpectedBridgeInfoVersion = "1" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backfill ¶
type Backfill struct { // Fields QueueID int UserID id.UserID Priority int PortalGUID string TimeStart *time.Time TimeEnd *time.Time MaxBatchEvents int MaxTotalEvents int BatchDelay int DispatchTime *time.Time CompletedAt *time.Time // contains filtered or unexported fields }
func (*Backfill) MarkDispatched ¶
func (b *Backfill) MarkDispatched()
type BackfillQuery ¶
type BackfillQuery struct {
// contains filtered or unexported fields
}
func (*BackfillQuery) DeleteAll ¶
func (bq *BackfillQuery) DeleteAll(userID id.UserID)
func (*BackfillQuery) DeleteAllForPortal ¶
func (bq *BackfillQuery) DeleteAllForPortal(userID id.UserID, portalGUID string)
func (*BackfillQuery) GetBackfillState ¶
func (bq *BackfillQuery) GetBackfillState(userID id.UserID, portalGUID string) (backfillState *BackfillState)
func (*BackfillQuery) GetNext ¶
func (bq *BackfillQuery) GetNext(userID id.UserID) (backfill *Backfill)
GetNext returns the next backfill to perform
func (*BackfillQuery) IncompleteCount ¶
func (*BackfillQuery) New ¶
func (bq *BackfillQuery) New() *Backfill
func (*BackfillQuery) NewBackfillState ¶
func (bq *BackfillQuery) NewBackfillState(userID id.UserID, portalGUID string) *BackfillState
type BackfillState ¶
type BackfillState struct { // Fields UserID id.UserID PortalGUID string ProcessingBatch bool BackfillComplete bool FirstExpectedTimestamp uint64 // contains filtered or unexported fields }
func (*BackfillState) Scan ¶
func (b *BackfillState) Scan(row dbutil.Scannable) *BackfillState
func (*BackfillState) SetProcessingBatch ¶
func (b *BackfillState) SetProcessingBatch(processing bool)
func (*BackfillState) Upsert ¶
func (b *BackfillState) Upsert()
type Database ¶
type Database struct { *dbutil.Database User *UserQuery Portal *PortalQuery Puppet *PuppetQuery Message *MessageQuery Tapback *TapbackQuery KV *KeyValueQuery MergedChat *MergedChatQuery Backfill *BackfillQuery }
type KeyValueQuery ¶
type KeyValueQuery struct {
// contains filtered or unexported fields
}
func (*KeyValueQuery) Delete ¶
func (kvq *KeyValueQuery) Delete(key string)
func (*KeyValueQuery) Get ¶
func (kvq *KeyValueQuery) Get(key string) (value string)
func (*KeyValueQuery) Set ¶
func (kvq *KeyValueQuery) Set(key, value string)
type MergedChatQuery ¶
type MergedChatQuery struct {
// contains filtered or unexported fields
}
func (*MergedChatQuery) Get ¶
func (mcq *MergedChatQuery) Get(guid string) (target string)
func (*MergedChatQuery) GetAllForTarget ¶
func (mcq *MergedChatQuery) GetAllForTarget(guid string) (sources []string)
func (*MergedChatQuery) Remove ¶
func (mcq *MergedChatQuery) Remove(guid string)
type Message ¶
type MessageQuery ¶
type MessageQuery struct {
// contains filtered or unexported fields
}
func (*MessageQuery) FindChatByGUID ¶
func (mq *MessageQuery) FindChatByGUID(guid string) (chatGUID string)
func (*MessageQuery) GetByGUID ¶
func (mq *MessageQuery) GetByGUID(chat string, guid string, part int) *Message
func (*MessageQuery) GetEarliestTimestampInChat ¶
func (mq *MessageQuery) GetEarliestTimestampInChat(chat string) (int64, error)
func (*MessageQuery) GetFirstInChat ¶
func (mq *MessageQuery) GetFirstInChat(chat string) *Message
func (*MessageQuery) GetIDsSince ¶
func (mq *MessageQuery) GetIDsSince(chat string, since time.Time) (messages []string)
func (*MessageQuery) GetLastByGUID ¶
func (mq *MessageQuery) GetLastByGUID(chat string, guid string) *Message
func (*MessageQuery) GetLastInChat ¶
func (mq *MessageQuery) GetLastInChat(chat string) *Message
func (*MessageQuery) MergePortalGUID ¶
func (*MessageQuery) New ¶
func (mq *MessageQuery) New() *Message
func (*MessageQuery) SplitPortalGUID ¶
func (mq *MessageQuery) SplitPortalGUID(txn dbutil.Execable, fromHandle, fromPortal, to string) int64
type Portal ¶
type PortalQuery ¶
type PortalQuery struct {
// contains filtered or unexported fields
}
func (*PortalQuery) Count ¶
func (pq *PortalQuery) Count() (count int)
func (*PortalQuery) FindByThreadID ¶
func (pq *PortalQuery) FindByThreadID(threadID string) []*Portal
func (*PortalQuery) FindPrivateChats ¶
func (pq *PortalQuery) FindPrivateChats() []*Portal
func (*PortalQuery) GetAllWithMXID ¶
func (pq *PortalQuery) GetAllWithMXID() []*Portal
func (*PortalQuery) GetByGUID ¶
func (pq *PortalQuery) GetByGUID(guid string) *Portal
func (*PortalQuery) New ¶
func (pq *PortalQuery) New() *Portal
type Puppet ¶
type PuppetQuery ¶
type PuppetQuery struct {
// contains filtered or unexported fields
}
func (*PuppetQuery) Get ¶
func (pq *PuppetQuery) Get(id string) *Puppet
func (*PuppetQuery) GetAll ¶
func (pq *PuppetQuery) GetAll() (puppets []*Puppet)
func (*PuppetQuery) New ¶
func (pq *PuppetQuery) New() *Puppet
type Tapback ¶
type TapbackQuery ¶
type TapbackQuery struct {
// contains filtered or unexported fields
}
func (*TapbackQuery) GetByGUID ¶
func (mq *TapbackQuery) GetByGUID(chat, message string, part int, sender string) *Tapback
func (*TapbackQuery) GetByTapbackGUID ¶
func (mq *TapbackQuery) GetByTapbackGUID(chat, tapback string) *Tapback
func (*TapbackQuery) New ¶
func (mq *TapbackQuery) New() *Tapback
Source Files ¶
Click to show internal directories.
Click to hide internal directories.