Documentation
¶
Index ¶
- Variables
- type AllCryptKeys
- type AppState
- type AttachmentFetcher
- type AttachmentURLSrv
- type ChatLocalizer
- type ConvLoader
- type ConvLoaderJob
- type ConvLoaderPriority
- type ConversationSource
- type CryptKey
- type FetchRetrier
- type IdentifyNotifier
- type Inbox
- type InboxSource
- type MembershipUpdateRes
- type MessageDeliverer
- type NameInfo
- type NameInfoSource
- type Offlinable
- type ProgressReporter
- type PushHandler
- type RemoteConversation
- type RemoteConversationMetadata
- type Resumable
- type RetryDescription
- type Searcher
- type Sender
- type ServerCacheVersions
- type Syncer
- type TeamChannelSource
- type UPAKFinder
- type UnboxConversationInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ActionExpunge = "expunge"
View Source
var ActionNewConversation = "newConversation"
View Source
var ActionNewMessage = "newMessage"
View Source
var ActionReadMessage = "readMessage"
View Source
var ActionSetAppNotificationSettings = "setAppNotificationSettings"
View Source
var ActionSetStatus = "setStatus"
View Source
var ActionTeamType = "teamType"
View Source
var PushActivity = "chat.activity"
View Source
var PushConvRetention = "chat.convretention"
View Source
var PushKBFSUpgrade = "chat.kbfsupgrade"
View Source
var PushMembershipUpdate = "chat.membershipUpdate"
View Source
var PushTLFFinalize = "chat.tlffinalize"
View Source
var PushTLFResolve = "chat.tlfresolve"
View Source
var PushTeamChannels = "chat.teamchannels"
View Source
var PushTeamRetention = "chat.teamretention"
View Source
var PushTyping = "chat.typing"
Functions ¶
This section is empty.
Types ¶
type AllCryptKeys ¶
type AllCryptKeys map[chat1.ConversationMembersType][]CryptKey
func NewAllCryptKeys ¶
func NewAllCryptKeys() AllCryptKeys
type AttachmentFetcher ¶
type AttachmentFetcher interface {
FetchAttachment(ctx context.Context, w io.Writer, convID chat1.ConversationID, asset chat1.Asset,
ri func() chat1.RemoteInterface, signer s3.Signer, progress ProgressReporter) error
}
type AttachmentURLSrv ¶
type AttachmentURLSrv interface {
GetURL(ctx context.Context, convID chat1.ConversationID, msgID chat1.MessageID,
preview bool) string
GetAttachmentFetcher() AttachmentFetcher
}
type ChatLocalizer ¶
type ConvLoader ¶
type ConvLoaderJob ¶
type ConvLoaderJob struct {
ConvID chat1.ConversationID
Pagination *chat1.Pagination
Priority ConvLoaderPriority
PostLoadHook func(context.Context, chat1.ThreadView, ConvLoaderJob)
}
func NewConvLoaderJob ¶
func NewConvLoaderJob(convID chat1.ConversationID, pagination *chat1.Pagination, priority ConvLoaderPriority, postLoadHook func(context.Context, chat1.ThreadView, ConvLoaderJob)) ConvLoaderJob
func (ConvLoaderJob) HigherPriorityThan ¶
func (j ConvLoaderJob) HigherPriorityThan(j2 ConvLoaderJob) bool
func (ConvLoaderJob) String ¶
func (j ConvLoaderJob) String() string
type ConvLoaderPriority ¶
type ConvLoaderPriority int
var ( ConvLoaderPriorityHighest ConvLoaderPriority = 10 ConvLoaderPriorityHigh ConvLoaderPriority = 7 ConvLoaderPriorityMedium ConvLoaderPriority = 5 ConvLoaderPriorityLow ConvLoaderPriority = 3 ConvLoaderPriorityLowest ConvLoaderPriority )
func (ConvLoaderPriority) HigherThan ¶
func (c ConvLoaderPriority) HigherThan(c2 ConvLoaderPriority) bool
type ConversationSource ¶
type ConversationSource interface {
Offlinable
AcquireConversationLock(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID) error
ReleaseConversationLock(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID)
Push(ctx context.Context, convID chat1.ConversationID, uid gregor1.UID,
msg chat1.MessageBoxed) (chat1.MessageUnboxed, bool, error)
PushUnboxed(ctx context.Context, convID chat1.ConversationID,
uid gregor1.UID, msg chat1.MessageUnboxed) (continuousUpdate bool, err error)
Pull(ctx context.Context, convID chat1.ConversationID, uid gregor1.UID, query *chat1.GetThreadQuery,
pagination *chat1.Pagination) (chat1.ThreadView, []*chat1.RateLimit, error)
PullLocalOnly(ctx context.Context, convID chat1.ConversationID, uid gregor1.UID,
query *chat1.GetThreadQuery, p *chat1.Pagination, maxPlaceholders int) (chat1.ThreadView, error)
GetMessages(ctx context.Context, conv UnboxConversationInfo, uid gregor1.UID, msgIDs []chat1.MessageID) ([]chat1.MessageUnboxed, error)
GetMessagesWithRemotes(ctx context.Context, conv chat1.Conversation, uid gregor1.UID,
msgs []chat1.MessageBoxed) ([]chat1.MessageUnboxed, error)
Clear(ctx context.Context, convID chat1.ConversationID, uid gregor1.UID) error
TransformSupersedes(ctx context.Context, unboxInfo UnboxConversationInfo, uid gregor1.UID,
msgs []chat1.MessageUnboxed) ([]chat1.MessageUnboxed, error)
Expunge(ctx context.Context, convID chat1.ConversationID,
uid gregor1.UID, expunge chat1.Expunge) error
ClearFromDelete(ctx context.Context, uid gregor1.UID,
convID chat1.ConversationID, deleteID chat1.MessageID)
SetRemoteInterface(func() chat1.RemoteInterface)
}
type FetchRetrier ¶
type FetchRetrier interface {
Offlinable
Resumable
Failure(ctx context.Context, uid gregor1.UID, desc RetryDescription) error
Success(ctx context.Context, uid gregor1.UID, desc RetryDescription) error
Force(ctx context.Context)
Rekey(ctx context.Context, name string, membersType chat1.ConversationMembersType,
public bool)
}
type IdentifyNotifier ¶
type IdentifyNotifier interface {
Reset()
ResetOnGUIConnect()
Send(ctx context.Context, update keybase1.CanonicalTLFNameAndIDWithBreaks)
}
type Inbox ¶
type Inbox struct {
Version chat1.InboxVers
ConvsUnverified []RemoteConversation
Convs []chat1.ConversationLocal
Pagination *chat1.Pagination
}
type InboxSource ¶
type InboxSource interface {
Offlinable
Read(ctx context.Context, uid gregor1.UID, localizer ChatLocalizer, useLocalData bool,
query *chat1.GetInboxLocalQuery, p *chat1.Pagination) (Inbox, *chat1.RateLimit, error)
ReadUnverified(ctx context.Context, uid gregor1.UID, useLocalData bool,
query *chat1.GetInboxQuery, p *chat1.Pagination) (Inbox, *chat1.RateLimit, error)
IsMember(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID) (bool, *chat1.RateLimit, error)
NewConversation(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers,
conv chat1.Conversation) error
NewMessage(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, convID chat1.ConversationID,
msg chat1.MessageBoxed, maxMsgs []chat1.MessageSummary) (*chat1.ConversationLocal, error)
ReadMessage(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, convID chat1.ConversationID,
msgID chat1.MessageID) (*chat1.ConversationLocal, error)
SetStatus(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, convID chat1.ConversationID,
status chat1.ConversationStatus) (*chat1.ConversationLocal, error)
SetAppNotificationSettings(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers,
convID chat1.ConversationID, settings chat1.ConversationNotificationInfo) (*chat1.ConversationLocal, error)
TlfFinalize(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers,
convIDs []chat1.ConversationID, finalizeInfo chat1.ConversationFinalizeInfo) ([]chat1.ConversationLocal, error)
MembershipUpdate(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers,
joined []chat1.ConversationMember, removed []chat1.ConversationMember,
resets []chat1.ConversationMember, previews []chat1.ConversationID) (MembershipUpdateRes, error)
TeamTypeChanged(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, convID chat1.ConversationID,
teamType chat1.TeamType) (*chat1.ConversationLocal, error)
UpgradeKBFSToImpteam(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, convID chat1.ConversationID) (*chat1.ConversationLocal, error)
Expunge(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, convID chat1.ConversationID,
expunge chat1.Expunge, maxMsgs []chat1.MessageSummary) (*chat1.ConversationLocal, error)
SetConvRetention(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, convID chat1.ConversationID,
policy chat1.RetentionPolicy) (*chat1.ConversationLocal, error)
SetTeamRetention(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, teamID keybase1.TeamID,
policy chat1.RetentionPolicy) ([]chat1.ConversationLocal, error)
GetInboxQueryLocalToRemote(ctx context.Context,
lquery *chat1.GetInboxLocalQuery) (*chat1.GetInboxQuery, *NameInfo, error)
SetRemoteInterface(func() chat1.RemoteInterface)
}
type MembershipUpdateRes ¶
type MembershipUpdateRes struct {
UserJoinedConvs []chat1.ConversationLocal
UserRemovedConvs []chat1.ConversationID
UserResetConvs []chat1.ConversationID
OthersJoinedConvs []chat1.ConversationMember
OthersRemovedConvs []chat1.ConversationMember
OthersResetConvs []chat1.ConversationMember
}
type MessageDeliverer ¶
type MessageDeliverer interface {
Offlinable
Resumable
Queue(ctx context.Context, convID chat1.ConversationID, msg chat1.MessagePlaintext,
outboxID *chat1.OutboxID, identifyBehavior keybase1.TLFIdentifyBehavior) (chat1.OutboxRecord, error)
ForceDeliverLoop(ctx context.Context)
}
type NameInfo ¶
type NameInfo struct {
ID chat1.TLFID
CanonicalName string
IdentifyFailures []keybase1.TLFIdentifyFailure
CryptKeys map[chat1.ConversationMembersType][]CryptKey
}
func NewNameInfo ¶
func NewNameInfo() *NameInfo
type NameInfoSource ¶
type NameInfoSource interface {
Lookup(ctx context.Context, name string, public bool) (*NameInfo, error)
EncryptionKeys(ctx context.Context, tlfName string, tlfID chat1.TLFID,
membersType chat1.ConversationMembersType, public bool) (*NameInfo, error)
DecryptionKeys(ctx context.Context, tlfName string, tlfID chat1.TLFID,
membersType chat1.ConversationMembersType, public bool,
keyGeneration int, kbfsEncrypted bool) (*NameInfo, error)
EphemeralEncryptionKey(ctx context.Context, tlfName string, tlfID chat1.TLFID,
membersType chat1.ConversationMembersType, public bool) (keybase1.TeamEk, error)
EphemeralDecryptionKey(ctx context.Context, tlfName string, tlfID chat1.TLFID,
membersType chat1.ConversationMembersType, public bool,
generation keybase1.EkGeneration) (keybase1.TeamEk, error)
}
type Offlinable ¶
type ProgressReporter ¶
type ProgressReporter func(bytesCompleted, bytesTotal int64)
type PushHandler ¶
type PushHandler interface {
TlfFinalize(context.Context, gregor.OutOfBandMessage) error
TlfResolve(context.Context, gregor.OutOfBandMessage) error
Activity(context.Context, gregor.OutOfBandMessage) error
Typing(context.Context, gregor.OutOfBandMessage) error
MembershipUpdate(context.Context, gregor.OutOfBandMessage) error
HandleOobm(context.Context, gregor.OutOfBandMessage) (bool, error)
UpgradeKBFSToImpteam(ctx context.Context, m gregor.OutOfBandMessage) error
}
type RemoteConversation ¶
type RemoteConversation struct {
Conv chat1.Conversation `codec:"c"`
LocalMetadata *RemoteConversationMetadata `codec:"l"`
}
func (RemoteConversation) GetConvID ¶
func (rc RemoteConversation) GetConvID() chat1.ConversationID
func (RemoteConversation) GetMtime ¶
func (rc RemoteConversation) GetMtime() gregor1.Time
type RetryDescription ¶
type Searcher ¶
type Searcher interface {
SearchRegexp(ctx context.Context, uiCh chan chat1.ChatSearchHit, conversationID chat1.ConversationID, re *regexp.Regexp, maxHits int, maxMessages int) (hits []chat1.ChatSearchHit, rlimits []chat1.RateLimit, err error)
}
type Sender ¶
type Sender interface {
Send(ctx context.Context, convID chat1.ConversationID, msg chat1.MessagePlaintext,
clientPrev chat1.MessageID, outboxID *chat1.OutboxID) (chat1.OutboxID, *chat1.MessageBoxed, *chat1.RateLimit, error)
Prepare(ctx context.Context, msg chat1.MessagePlaintext, membersType chat1.ConversationMembersType,
conv *chat1.Conversation) (*chat1.MessageBoxed, []chat1.Asset, []gregor1.UID, chat1.ChannelMention, *chat1.TopicNameState, error)
}
type ServerCacheVersions ¶
type Syncer ¶
type Syncer interface {
IsConnected(ctx context.Context) bool
Connected(ctx context.Context, cli chat1.RemoteInterface, uid gregor1.UID,
syncRes *chat1.SyncChatRes) error
Disconnected(ctx context.Context)
Sync(ctx context.Context, cli chat1.RemoteInterface, uid gregor1.UID,
syncRes *chat1.SyncChatRes) error
RegisterOfflinable(offlinable Offlinable)
SendChatStaleNotifications(ctx context.Context, uid gregor1.UID,
updates []chat1.ConversationStaleUpdate, immediate bool)
SelectConversation(ctx context.Context, convID chat1.ConversationID)
Shutdown()
}
type TeamChannelSource ¶
type TeamChannelSource interface {
Offlinable
GetChannelsFull(context.Context, gregor1.UID, chat1.TLFID, chat1.TopicType) ([]chat1.ConversationLocal, []chat1.RateLimit, error)
GetChannelsTopicName(context.Context, gregor1.UID, chat1.TLFID, chat1.TopicType) ([]chat1.ChannelNameMention, []chat1.RateLimit, error)
GetChannelTopicName(context.Context, gregor1.UID, chat1.TLFID, chat1.TopicType, chat1.ConversationID) (string, []chat1.RateLimit, error)
ChannelsChanged(context.Context, chat1.TLFID)
}
type UPAKFinder ¶
type UPAKFinder interface {
LookupUsernameAndDevice(ctx context.Context, uid keybase1.UID, deviceID keybase1.DeviceID) (username libkb.NormalizedUsername, deviceName string, deviceType string, err error)
CheckKIDForUID(ctx context.Context, uid keybase1.UID, kid keybase1.KID) (found bool, revokedAt *keybase1.KeybaseTime, deleted bool, err error)
}
type UnboxConversationInfo ¶
type UnboxConversationInfo interface {
GetConvID() chat1.ConversationID
GetMembersType() chat1.ConversationMembersType
GetFinalizeInfo() *chat1.ConversationFinalizeInfo
GetExpunge() *chat1.Expunge
IsPublic() bool
}
Click to show internal directories.
Click to hide internal directories.