Documentation ¶
Index ¶
- Variables
- func CheckAndRecordBodyHash(ctx context.Context, g *globals.Context, bodyHash chat1.Hash, ...) error
- func CheckAndRecordPrevPointer(ctx context.Context, g *globals.Context, msgID chat1.MessageID, ...) error
- func GetSecretBoxKey(ctx context.Context, g *libkb.GlobalContext, getSecretUI func() libkb.SecretUI) (fkey [32]byte, err error)
- func NewOutboxID() (chat1.OutboxID, error)
- type AbortedError
- type AssetDeleter
- type BodyHashChecker
- type ByCtimeOrder
- type ByDatabaseOrder
- type DummyAssetDeleter
- type Error
- type FetchResult
- type HoleyResultCollector
- type Inbox
- func (i *Inbox) Clear(ctx context.Context, uid gregor1.UID) (err Error)
- func (i *Inbox) Expunge(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, ...) (err Error)
- func (i *Inbox) GetConversation(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID) (res types.RemoteConversation, err Error)
- func (i *Inbox) MembershipUpdate(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, ...) (err Error)
- func (i *Inbox) Merge(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, ...) (err Error)
- func (i *Inbox) MergeLocalMetadata(ctx context.Context, uid gregor1.UID, convs []chat1.ConversationLocal) (err Error)
- func (i *Inbox) NewConversation(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, ...) (err Error)
- func (i *Inbox) NewMessage(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, ...) (err Error)
- func (i *Inbox) Read(ctx context.Context, uid gregor1.UID, query *chat1.GetInboxQuery, ...) (vers chat1.InboxVers, res []types.RemoteConversation, ...)
- func (i *Inbox) ReadAll(ctx context.Context, uid gregor1.UID) (vers chat1.InboxVers, res []types.RemoteConversation, err Error)
- func (i *Inbox) ReadMessage(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, ...) (err Error)
- func (i *Inbox) ReadShared(ctx context.Context, uid gregor1.UID) (res []SharedInboxItem, err Error)
- func (i *Inbox) ServerVersion(ctx context.Context, uid gregor1.UID) (vers int, err Error)
- func (i *Inbox) SetAppNotificationSettings(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, ...) (err Error)
- func (i *Inbox) SetConvRetention(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, ...) (err Error)
- func (i *Inbox) SetConvSettings(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, ...) (err Error)
- func (i *Inbox) SetStatus(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, ...) (err Error)
- func (i *Inbox) SetTeamRetention(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, ...) (res []chat1.ConversationID, err Error)
- func (i *Inbox) SubteamRename(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, ...) (err Error)
- func (i *Inbox) Sync(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, ...) (res InboxSyncRes, err Error)
- func (i *Inbox) TeamTypeChanged(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, ...) (err Error)
- func (i *Inbox) TlfFinalize(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, ...) (err Error)
- func (i *Inbox) UpgradeKBFSToImpteam(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, ...) (err Error)
- func (i *Inbox) Version(ctx context.Context, uid gregor1.UID) (vers chat1.InboxVers, err Error)
- type InboxSyncRes
- type InboxSyncResExpunge
- type InboxVersionSource
- type InsatiableResultCollector
- func (s *InsatiableResultCollector) Done() bool
- func (s *InsatiableResultCollector) Error(err Error) Error
- func (s *InsatiableResultCollector) Name() string
- func (s *InsatiableResultCollector) Push(msg chat1.MessageUnboxed)
- func (s *InsatiableResultCollector) PushPlaceholder(chat1.MessageID) bool
- func (s *InsatiableResultCollector) Result() []chat1.MessageUnboxed
- func (s *InsatiableResultCollector) SetTarget(num int)
- func (s *InsatiableResultCollector) String() string
- type InternalError
- type MergeResult
- type MiscError
- type MissError
- type Outbox
- func (o *Outbox) CancelMessagesWithPredicate(ctx context.Context, shouldCancel func(chat1.OutboxRecord) bool) (int, error)
- func (o *Outbox) GetUID() gregor1.UID
- func (o *Outbox) MarkAllAsError(ctx context.Context, errRec chat1.OutboxStateError) (res []chat1.OutboxRecord, err error)
- func (o *Outbox) MarkAsError(ctx context.Context, obr chat1.OutboxRecord, errRec chat1.OutboxStateError) (res chat1.OutboxRecord, err error)
- func (o *Outbox) OutboxPurge(ctx context.Context) (ephemeralPurged []chat1.OutboxRecord, err error)
- func (o *Outbox) PullAllConversations(ctx context.Context, includeErrors bool, remove bool) ([]chat1.OutboxRecord, error)
- func (o *Outbox) PushMessage(ctx context.Context, convID chat1.ConversationID, msg chat1.MessagePlaintext, ...) (rec chat1.OutboxRecord, err Error)
- func (o *Outbox) RecordFailedAttempt(ctx context.Context, oldObr chat1.OutboxRecord) error
- func (o *Outbox) RemoveMessage(ctx context.Context, obid chat1.OutboxID) error
- func (o *Outbox) RetryMessage(ctx context.Context, obid chat1.OutboxID, ...) (res *chat1.OutboxRecord, err error)
- func (o *Outbox) SetClock(cl clockwork.Clock)
- func (o *Outbox) SprinkleIntoThread(ctx context.Context, convID chat1.ConversationID, thread *chat1.ThreadView) error
- func (o *Outbox) UpdateMessage(ctx context.Context, replaceobr chat1.OutboxRecord) error
- type PrevChecker
- type RemoteError
- type ResultCollector
- type SecretUI
- type ServerVersions
- func (s *ServerVersions) Fetch(ctx context.Context) (chat1.ServerCacheVers, error)
- func (s *ServerVersions) MatchBodies(ctx context.Context, vers int) (int, error)
- func (s *ServerVersions) MatchInbox(ctx context.Context, vers int) (int, error)
- func (s *ServerVersions) Set(ctx context.Context, vers chat1.ServerCacheVers) (err error)
- type SharedInboxItem
- type SimpleResultCollector
- func (s *SimpleResultCollector) Done() bool
- func (s *SimpleResultCollector) Error(err Error) Error
- func (s *SimpleResultCollector) Name() string
- func (s *SimpleResultCollector) Push(msg chat1.MessageUnboxed)
- func (s *SimpleResultCollector) PushPlaceholder(chat1.MessageID) bool
- func (s *SimpleResultCollector) Result() []chat1.MessageUnboxed
- func (s *SimpleResultCollector) SetTarget(num int)
- func (s *SimpleResultCollector) String() string
- type Storage
- func (s *Storage) ClearAll(ctx context.Context, convID chat1.ConversationID, uid gregor1.UID) (err Error)
- func (s *Storage) ClearBefore(ctx context.Context, convID chat1.ConversationID, uid gregor1.UID, ...) (err Error)
- func (s *Storage) EphemeralPurge(ctx context.Context, convID chat1.ConversationID, uid gregor1.UID, ...) (newPurgeInfo *chat1.EphemeralPurgeInfo, explodedMsgs []chat1.MessageUnboxed, ...)
- func (s *Storage) Expunge(ctx context.Context, convID chat1.ConversationID, uid gregor1.UID, ...) (res MergeResult, err Error)
- func (s *Storage) Fetch(ctx context.Context, conv chat1.Conversation, uid gregor1.UID, ...) (res FetchResult, err Error)
- func (s *Storage) FetchMessages(ctx context.Context, convID chat1.ConversationID, uid gregor1.UID, ...) (res []*chat1.MessageUnboxed, err Error)
- func (s *Storage) FetchUpToLocalMaxMsgID(ctx context.Context, convID chat1.ConversationID, uid gregor1.UID, ...) (res FetchResult, err Error)
- func (s *Storage) GetAllPurgeInfo(ctx context.Context, uid gregor1.UID) (allPurgeInfo map[string]chat1.EphemeralPurgeInfo, err error)
- func (s *Storage) GetMaxMsgID(ctx context.Context, convID chat1.ConversationID, uid gregor1.UID) (chat1.MessageID, error)
- func (s *Storage) IsTLFIdentifyBroken(ctx context.Context, tlfID chat1.TLFID) bool
- func (s *Storage) Merge(ctx context.Context, convID chat1.ConversationID, uid gregor1.UID, ...) (res MergeResult, err Error)
- func (s *Storage) MergeHelper(ctx context.Context, convID chat1.ConversationID, uid gregor1.UID, ...) (res MergeResult, err Error)
- func (s *Storage) Nuke(ctx context.Context, convID chat1.ConversationID, uid gregor1.UID) Error
- func (s *Storage) ResultCollectorFromQuery(ctx context.Context, query *chat1.GetThreadQuery, pagination *chat1.Pagination) ResultCollector
- func (s *Storage) SetAssetDeleter(assetDeleter AssetDeleter)
- func (s *Storage) SetClock(clock clockwork.Clock)
- func (s *Storage) UpdateTLFIdentifyBreak(ctx context.Context, tlfID chat1.TLFID, breaks []keybase1.TLFIdentifyFailure) error
- type TypedResultCollector
- func (t *TypedResultCollector) Done() bool
- func (t *TypedResultCollector) Error(err Error) Error
- func (t *TypedResultCollector) Name() string
- func (t *TypedResultCollector) Push(msg chat1.MessageUnboxed)
- func (t *TypedResultCollector) PushPlaceholder(msgID chat1.MessageID) bool
- func (t *TypedResultCollector) Result() []chat1.MessageUnboxed
- func (t *TypedResultCollector) SetTarget(num int)
- func (t *TypedResultCollector) String() string
- type VersionMismatchError
Constants ¶
This section is empty.
Variables ¶
var DefaultSecretUI = func() libkb.SecretUI { return SecretUI{} }
Functions ¶
func CheckAndRecordBodyHash ¶
func CheckAndRecordBodyHash(ctx context.Context, g *globals.Context, bodyHash chat1.Hash, uniqueMsgID chat1.MessageID, uniqueConvID chat1.ConversationID) error
CheckAndRecordBodyHash checks the current message's body hash against all the body hashes we've seen, to prevent replays. If the header hash is new, add it to the set.
func CheckAndRecordPrevPointer ¶
func CheckAndRecordPrevPointer(ctx context.Context, g *globals.Context, msgID chat1.MessageID, convID chat1.ConversationID, uniqueHeaderHash chat1.Hash) error
CheckAndRecordPrevPointer checks the current message's header hash against all the prev pointers we've ever seen. If the current message is new, add it to the set.
func GetSecretBoxKey ¶
func NewOutboxID ¶
Types ¶
type AbortedError ¶
type AbortedError struct{}
func NewAbortedError ¶
func NewAbortedError() AbortedError
func (AbortedError) Error ¶
func (e AbortedError) Error() string
func (AbortedError) Message ¶
func (e AbortedError) Message() string
func (AbortedError) ShouldClear ¶
func (e AbortedError) ShouldClear() bool
type AssetDeleter ¶
type BodyHashChecker ¶
type ByCtimeOrder ¶
type ByCtimeOrder []chat1.OutboxRecord
func (ByCtimeOrder) Len ¶
func (a ByCtimeOrder) Len() int
func (ByCtimeOrder) Less ¶
func (a ByCtimeOrder) Less(i, j int) bool
func (ByCtimeOrder) Swap ¶
func (a ByCtimeOrder) Swap(i, j int)
type ByDatabaseOrder ¶
type ByDatabaseOrder []types.RemoteConversation
func (ByDatabaseOrder) Len ¶
func (a ByDatabaseOrder) Len() int
func (ByDatabaseOrder) Less ¶
func (a ByDatabaseOrder) Less(i, j int) bool
func (ByDatabaseOrder) Swap ¶
func (a ByDatabaseOrder) Swap(i, j int)
type DummyAssetDeleter ¶
type DummyAssetDeleter struct{}
func (DummyAssetDeleter) DeleteAssets ¶
func (d DummyAssetDeleter) DeleteAssets(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID, assets []chat1.Asset)
type FetchResult ¶
type FetchResult struct { Thread chat1.ThreadView Exploded []chat1.MessageUnboxed }
type HoleyResultCollector ¶
type HoleyResultCollector struct { ResultCollector // contains filtered or unexported fields }
func NewHoleyResultCollector ¶
func NewHoleyResultCollector(maxHoles int, rc ResultCollector) *HoleyResultCollector
func (*HoleyResultCollector) Holes ¶
func (h *HoleyResultCollector) Holes() int
func (*HoleyResultCollector) PushPlaceholder ¶
func (h *HoleyResultCollector) PushPlaceholder(msgID chat1.MessageID) bool
type Inbox ¶
type Inbox struct { globals.Contextified utils.DebugLabeler // contains filtered or unexported fields }
func (*Inbox) Expunge ¶
func (i *Inbox) Expunge(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, convID chat1.ConversationID, expunge chat1.Expunge, maxMsgs []chat1.MessageSummary) (err Error)
Mark the expunge on the stored inbox The inbox Expunge tag is kept up to date for retention but not for delete-history. Does not delete any messages. Relies on separate server mechanism to delete clear max messages.
func (*Inbox) GetConversation ¶
func (i *Inbox) GetConversation(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID) (res types.RemoteConversation, err Error)
func (*Inbox) MembershipUpdate ¶
func (i *Inbox) MembershipUpdate(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, userJoined []chat1.Conversation, userRemoved []chat1.ConversationMember, othersJoined []chat1.ConversationMember, othersRemoved []chat1.ConversationMember, userReset []chat1.ConversationMember, othersReset []chat1.ConversationMember) (err Error)
func (*Inbox) Merge ¶
func (i *Inbox) Merge(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, convsIn []chat1.Conversation, query *chat1.GetInboxQuery, p *chat1.Pagination) (err Error)
Merge add/updates conversations into the inbox. If a given conversation is either missing from the inbox, or is of greater version than what is currently stored, we write it down. Otherwise, we ignore it. If the inbox is currently blank, then we write down the given inbox version.
func (*Inbox) MergeLocalMetadata ¶
func (*Inbox) NewConversation ¶
func (*Inbox) NewMessage ¶
func (i *Inbox) NewMessage(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, convID chat1.ConversationID, msg chat1.MessageBoxed, maxMsgs []chat1.MessageSummary) (err Error)
func (*Inbox) Read ¶
func (i *Inbox) Read(ctx context.Context, uid gregor1.UID, query *chat1.GetInboxQuery, p *chat1.Pagination) (vers chat1.InboxVers, res []types.RemoteConversation, pagination *chat1.Pagination, err Error)
func (*Inbox) ReadMessage ¶
func (*Inbox) ReadShared ¶
func (*Inbox) ServerVersion ¶
func (*Inbox) SetAppNotificationSettings ¶
func (*Inbox) SetConvRetention ¶
func (*Inbox) SetConvSettings ¶
func (*Inbox) SetTeamRetention ¶
func (i *Inbox) SetTeamRetention(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, teamID keybase1.TeamID, policy chat1.RetentionPolicy) (res []chat1.ConversationID, err Error)
Update any local conversations with this team ID.
func (*Inbox) SubteamRename ¶
func (*Inbox) TeamTypeChanged ¶
func (*Inbox) TlfFinalize ¶
func (*Inbox) UpgradeKBFSToImpteam ¶
type InboxSyncRes ¶
type InboxSyncRes struct { FilteredConvs []types.RemoteConversation TeamTypeChanged bool MembersTypeChanged []chat1.ConversationID Expunges []InboxSyncResExpunge TopicNameChanged []chat1.ConversationID }
type InboxSyncResExpunge ¶
type InboxSyncResExpunge struct { ConvID chat1.ConversationID Expunge chat1.Expunge }
type InboxVersionSource ¶
type InboxVersionSource struct {
globals.Contextified
}
func NewInboxVersionSource ¶
func NewInboxVersionSource(g *globals.Context) *InboxVersionSource
func (*InboxVersionSource) GetInboxVersion ¶
type InsatiableResultCollector ¶
type InsatiableResultCollector struct {
// contains filtered or unexported fields
}
func NewInsatiableResultCollector ¶
func NewInsatiableResultCollector() *InsatiableResultCollector
InsatiableResultCollector aggregates all messages all the way back. Its result can include holes.
func (*InsatiableResultCollector) Done ¶
func (s *InsatiableResultCollector) Done() bool
func (*InsatiableResultCollector) Error ¶
func (s *InsatiableResultCollector) Error(err Error) Error
func (*InsatiableResultCollector) Name ¶
func (s *InsatiableResultCollector) Name() string
func (*InsatiableResultCollector) Push ¶
func (s *InsatiableResultCollector) Push(msg chat1.MessageUnboxed)
func (*InsatiableResultCollector) PushPlaceholder ¶
func (s *InsatiableResultCollector) PushPlaceholder(chat1.MessageID) bool
func (*InsatiableResultCollector) Result ¶
func (s *InsatiableResultCollector) Result() []chat1.MessageUnboxed
func (*InsatiableResultCollector) SetTarget ¶
func (s *InsatiableResultCollector) SetTarget(num int)
func (*InsatiableResultCollector) String ¶
func (s *InsatiableResultCollector) String() string
type InternalError ¶
type InternalError struct {
Msg string
}
func NewInternalError ¶
func NewInternalError(ctx context.Context, d utils.DebugLabeler, msg string, args ...interface{}) InternalError
func (InternalError) Error ¶
func (e InternalError) Error() string
func (InternalError) Message ¶
func (e InternalError) Message() string
func (InternalError) ShouldClear ¶
func (e InternalError) ShouldClear() bool
type MergeResult ¶
type MergeResult struct { Expunged *chat1.Expunge Exploded []chat1.MessageUnboxed ReactionTargets []chat1.MessageUnboxed }
type Outbox ¶
type Outbox struct { globals.Contextified utils.DebugLabeler // contains filtered or unexported fields }
func (*Outbox) CancelMessagesWithPredicate ¶
func (*Outbox) MarkAllAsError ¶
func (o *Outbox) MarkAllAsError(ctx context.Context, errRec chat1.OutboxStateError) (res []chat1.OutboxRecord, err error)
func (*Outbox) MarkAsError ¶
func (o *Outbox) MarkAsError(ctx context.Context, obr chat1.OutboxRecord, errRec chat1.OutboxStateError) (res chat1.OutboxRecord, err error)
MarkAsError will either mark an existing record as an error, or it will add the passed record as an error with the specified error state
func (*Outbox) OutboxPurge ¶
OutboxPurge is called periodically to ensure messages don't hang out too long in the outbox (since they are not encrypted with ephemeral keys until they leave it). Currently we purge anything that is in the error state and has been in the outbox for > errorPurgeCutoff minutes for regular messages or ephemeralPurgeCutoff minutes for ephemeral messages.
func (*Outbox) PullAllConversations ¶
func (o *Outbox) PullAllConversations(ctx context.Context, includeErrors bool, remove bool) ([]chat1.OutboxRecord, error)
PullAllConversations grabs all outbox entries for the current outbox, and optionally deletes them from storage
func (*Outbox) PushMessage ¶
func (o *Outbox) PushMessage(ctx context.Context, convID chat1.ConversationID, msg chat1.MessagePlaintext, suppliedOutboxID *chat1.OutboxID, identifyBehavior keybase1.TLFIdentifyBehavior) (rec chat1.OutboxRecord, err Error)
func (*Outbox) RecordFailedAttempt ¶
RecordFailedAttempt will either modify an existing matching record (if sending) to next attempt number, or if the record doesn't exist it adds it in.
func (*Outbox) RemoveMessage ¶
func (*Outbox) RetryMessage ¶
func (o *Outbox) RetryMessage(ctx context.Context, obid chat1.OutboxID, identifyBehavior *keybase1.TLFIdentifyBehavior) (res *chat1.OutboxRecord, err error)
func (*Outbox) SprinkleIntoThread ¶
func (o *Outbox) SprinkleIntoThread(ctx context.Context, convID chat1.ConversationID, thread *chat1.ThreadView) error
func (*Outbox) UpdateMessage ¶
type PrevChecker ¶
type RemoteError ¶
type RemoteError struct {
Msg string
}
func (RemoteError) Error ¶
func (e RemoteError) Error() string
func (RemoteError) Message ¶
func (e RemoteError) Message() string
func (RemoteError) ShouldClear ¶
func (e RemoteError) ShouldClear() bool
type ResultCollector ¶
type SecretUI ¶
type SecretUI struct { }
func (SecretUI) GetPassphrase ¶
func (d SecretUI) GetPassphrase(pinentry keybase1.GUIEntryArg, terminal *keybase1.SecretEntryArg) (keybase1.GetPassphraseRes, error)
type ServerVersions ¶
type ServerVersions struct { globals.Contextified utils.DebugLabeler // contains filtered or unexported fields }
func NewServerVersions ¶
func NewServerVersions(g *globals.Context) *ServerVersions
func (*ServerVersions) Fetch ¶
func (s *ServerVersions) Fetch(ctx context.Context) (chat1.ServerCacheVers, error)
func (*ServerVersions) MatchBodies ¶
func (*ServerVersions) MatchInbox ¶
func (*ServerVersions) Set ¶
func (s *ServerVersions) Set(ctx context.Context, vers chat1.ServerCacheVers) (err error)
type SharedInboxItem ¶
type SharedInboxItem struct {}
type SimpleResultCollector ¶
type SimpleResultCollector struct {
// contains filtered or unexported fields
}
SimpleResultCollector aggregates all results in a basic way. It is not thread safe.
func NewSimpleResultCollector ¶
func NewSimpleResultCollector(num int) *SimpleResultCollector
func (*SimpleResultCollector) Done ¶
func (s *SimpleResultCollector) Done() bool
func (*SimpleResultCollector) Error ¶
func (s *SimpleResultCollector) Error(err Error) Error
func (*SimpleResultCollector) Name ¶
func (s *SimpleResultCollector) Name() string
func (*SimpleResultCollector) Push ¶
func (s *SimpleResultCollector) Push(msg chat1.MessageUnboxed)
func (*SimpleResultCollector) PushPlaceholder ¶
func (s *SimpleResultCollector) PushPlaceholder(chat1.MessageID) bool
func (*SimpleResultCollector) Result ¶
func (s *SimpleResultCollector) Result() []chat1.MessageUnboxed
func (*SimpleResultCollector) SetTarget ¶
func (s *SimpleResultCollector) SetTarget(num int)
func (*SimpleResultCollector) String ¶
func (s *SimpleResultCollector) String() string
type Storage ¶
type Storage struct { globals.Contextified utils.DebugLabeler // contains filtered or unexported fields }
func (*Storage) ClearBefore ¶
func (s *Storage) ClearBefore(ctx context.Context, convID chat1.ConversationID, uid gregor1.UID, upto chat1.MessageID) (err Error)
ClearBefore clears all messages up to (but not including) the upto messageID
func (*Storage) EphemeralPurge ¶
func (s *Storage) EphemeralPurge(ctx context.Context, convID chat1.ConversationID, uid gregor1.UID, purgeInfo *chat1.EphemeralPurgeInfo) (newPurgeInfo *chat1.EphemeralPurgeInfo, explodedMsgs []chat1.MessageUnboxed, err Error)
For a given conversation, purge all ephemeral messages from purgeInfo.MinUnexplodedID to the present, updating bookkeeping for the next time we need to purge this conv.
func (*Storage) Fetch ¶
func (s *Storage) Fetch(ctx context.Context, conv chat1.Conversation, uid gregor1.UID, rc ResultCollector, query *chat1.GetThreadQuery, pagination *chat1.Pagination) (res FetchResult, err Error)
func (*Storage) FetchMessages ¶
func (*Storage) FetchUpToLocalMaxMsgID ¶
func (s *Storage) FetchUpToLocalMaxMsgID(ctx context.Context, convID chat1.ConversationID, uid gregor1.UID, rc ResultCollector, iboxMaxMsgID chat1.MessageID, query *chat1.GetThreadQuery, pagination *chat1.Pagination) (res FetchResult, err Error)
func (*Storage) GetAllPurgeInfo ¶
func (*Storage) GetMaxMsgID ¶
func (*Storage) IsTLFIdentifyBroken ¶
func (*Storage) Merge ¶
func (s *Storage) Merge(ctx context.Context, convID chat1.ConversationID, uid gregor1.UID, msgs []chat1.MessageUnboxed) (res MergeResult, err Error)
Merge requires msgs to be sorted by descending message ID
func (*Storage) MergeHelper ¶
func (s *Storage) MergeHelper(ctx context.Context, convID chat1.ConversationID, uid gregor1.UID, msgs []chat1.MessageUnboxed, expunge *chat1.Expunge) (res MergeResult, err Error)
MergeHelper requires msgs to be sorted by descending message ID expunge is optional
func (*Storage) ResultCollectorFromQuery ¶
func (s *Storage) ResultCollectorFromQuery(ctx context.Context, query *chat1.GetThreadQuery, pagination *chat1.Pagination) ResultCollector
func (*Storage) SetAssetDeleter ¶
func (s *Storage) SetAssetDeleter(assetDeleter AssetDeleter)
func (*Storage) UpdateTLFIdentifyBreak ¶
type TypedResultCollector ¶
type TypedResultCollector struct {
// contains filtered or unexported fields
}
TypedResultCollector aggregates results with a type constraints. It is not thread safe.
func NewTypedResultCollector ¶
func NewTypedResultCollector(num int, typs []chat1.MessageType) *TypedResultCollector
func (*TypedResultCollector) Done ¶
func (t *TypedResultCollector) Done() bool
func (*TypedResultCollector) Error ¶
func (t *TypedResultCollector) Error(err Error) Error
func (*TypedResultCollector) Name ¶
func (t *TypedResultCollector) Name() string
func (*TypedResultCollector) Push ¶
func (t *TypedResultCollector) Push(msg chat1.MessageUnboxed)
func (*TypedResultCollector) PushPlaceholder ¶
func (t *TypedResultCollector) PushPlaceholder(msgID chat1.MessageID) bool
func (*TypedResultCollector) Result ¶
func (t *TypedResultCollector) Result() []chat1.MessageUnboxed
func (*TypedResultCollector) SetTarget ¶
func (t *TypedResultCollector) SetTarget(num int)
func (*TypedResultCollector) String ¶
func (t *TypedResultCollector) String() string
type VersionMismatchError ¶
type VersionMismatchError struct {
// contains filtered or unexported fields
}
func NewVersionMismatchError ¶
func NewVersionMismatchError(oldVers chat1.InboxVers, newVers chat1.InboxVers) VersionMismatchError
func (VersionMismatchError) Error ¶
func (e VersionMismatchError) Error() string
func (VersionMismatchError) Message ¶
func (e VersionMismatchError) Message() string
func (VersionMismatchError) ShouldClear ¶
func (e VersionMismatchError) ShouldClear() bool