Documentation
¶
Index ¶
- Constants
- Variables
- func BackgroundContext(sourceCtx context.Context, g *globals.Context) context.Context
- func Context(ctx context.Context, g *globals.Context, mode keybase1.TLFIdentifyBehavior, ...) context.Context
- func CtxAddLogTags(ctx context.Context, env appTypeSource) context.Context
- func CtxTrace(ctx context.Context) (string, bool)
- func CurrentUID(g *globals.Context) (keybase1.UID, error)
- func FindConversations(ctx context.Context, g *globals.Context, debugger utils.DebugLabeler, ...) (res []chat1.ConversationLocal, rl []chat1.RateLimit, err error)
- func GetInboxQueryNameInfo(ctx context.Context, g *globals.Context, lquery *chat1.GetInboxLocalQuery) (types.NameInfo, error)
- func GetLastSendTime(ctx context.Context, g *globals.Context, log utils.DebugLabeler) time.Time
- func GetTopicNameState(ctx context.Context, g *globals.Context, debugger utils.DebugLabeler, ...) (res chat1.TopicNameState, err error)
- func GetUnverifiedConv(ctx context.Context, g *globals.Context, uid gregor1.UID, ...) (chat1.Conversation, *chat1.RateLimit, error)
- func IdentifyMode(ctx context.Context) (ib keybase1.TLFIdentifyBehavior, breaks *[]keybase1.TLFIdentifyFailure, ...)
- func IdentifyModeCtx(ctx context.Context, mode keybase1.TLFIdentifyBehavior, ...) context.Context
- func JoinConversation(ctx context.Context, g *globals.Context, debugger utils.DebugLabeler, ...) (rl []chat1.RateLimit, err error)
- func LeaveConversation(ctx context.Context, g *globals.Context, debugger utils.DebugLabeler, ...) (rl []chat1.RateLimit, err error)
- func NewConversation(ctx context.Context, g *globals.Context, uid gregor1.UID, tlfName string, ...) (chat1.ConversationLocal, []chat1.RateLimit, error)
- func NewConversationSource(g *globals.Context, typ string, boxer *Boxer, storage *storage.Storage, ...) types.ConversationSource
- func NewInboxSource(g *globals.Context, typ string, ri func() chat1.RemoteInterface) types.InboxSource
- func PreviewConversation(ctx context.Context, g *globals.Context, debugger utils.DebugLabeler, ...) (rl []chat1.RateLimit, err error)
- func RecentConversationParticipants(ctx context.Context, g *globals.Context, myUID gregor1.UID) ([]gregor1.UID, error)
- func RecordChatSend(ctx context.Context, g *globals.Context, log utils.DebugLabeler)
- func TouchFirstChatActiveQueryTime(ctx context.Context, g *globals.Context, log utils.DebugLabeler) time.Time
- type AttachmentInfo
- type AttachmentStash
- type AttachmentStore
- func (a *AttachmentStore) DeleteAsset(ctx context.Context, params chat1.S3Params, signer s3.Signer, ...) error
- func (a *AttachmentStore) DeleteAssets(ctx context.Context, params chat1.S3Params, signer s3.Signer, ...) error
- func (a *AttachmentStore) DownloadAsset(ctx context.Context, params chat1.S3Params, asset chat1.Asset, w io.Writer, ...) error
- func (a *AttachmentStore) PutS3(ctx context.Context, r io.Reader, size int64, task *UploadTask, ...) (*PutS3Result, error)
- func (a *AttachmentStore) UploadAsset(ctx context.Context, task *UploadTask) (chat1.Asset, error)
- type BackgroundConvLoader
- type BlockingLocalizer
- type BlockingSender
- func (s *BlockingSender) Prepare(ctx context.Context, plaintext chat1.MessagePlaintext, ...) (*chat1.MessageBoxed, []chat1.Asset, []gregor1.UID, chat1.ChannelMention, ...)
- func (s *BlockingSender) Send(ctx context.Context, convID chat1.ConversationID, msg chat1.MessagePlaintext, ...) (obid chat1.OutboxID, boxed *chat1.MessageBoxed, rl *chat1.RateLimit, err error)
- func (s *BlockingSender) Sign(payload []byte) ([]byte, error)
- type BodyHashInvalid
- type Boxer
- func (b *Boxer) BoxMessage(ctx context.Context, msg chat1.MessagePlaintext, ...) (*chat1.MessageBoxed, error)
- func (b *Boxer) CompareTlfNames(ctx context.Context, tlfName1, tlfName2 string, conv chat1.Conversation, ...) (bool, error)
- func (b *Boxer) UnboxMessage(ctx context.Context, boxed chat1.MessageBoxed, conv unboxConversationInfo) (m chat1.MessageUnboxed, uberr UnboxingError)
- func (b *Boxer) UnboxMessages(ctx context.Context, boxed []chat1.MessageBoxed, conv unboxConversationInfo) (unboxed []chat1.MessageUnboxed, err error)
- func (b *Boxer) UnboxThread(ctx context.Context, boxed chat1.ThreadViewBoxed, conv unboxConversationInfo) (thread chat1.ThreadView, err error)
- func (b *Boxer) ValidSenderKey(ctx context.Context, sender gregor1.UID, key []byte, ctime gregor1.Time) (found, validAtCTime bool, revoked *gregor1.Time, unboxErr UnboxingError)
- type BoxingCryptKeysError
- type BoxingError
- type BufferSource
- type ByMsgID
- type CachingTeamChannelSource
- func (c *CachingTeamChannelSource) ChannelsChanged(ctx context.Context, teamID chat1.TLFID)
- func (c *CachingTeamChannelSource) Connected(ctx context.Context)
- func (c *CachingTeamChannelSource) Disconnected(ctx context.Context)
- func (c *CachingTeamChannelSource) GetChannelsFull(ctx context.Context, uid gregor1.UID, teamID chat1.TLFID, ...) (res []chat1.ConversationLocal, rl []chat1.RateLimit, err error)
- func (c *CachingTeamChannelSource) GetChannelsTopicName(ctx context.Context, uid gregor1.UID, teamID chat1.TLFID, ...) (res []types.ConvIDAndTopicName, rl []chat1.RateLimit, err error)
- func (c *CachingTeamChannelSource) IsOffline(ctx context.Context) bool
- type ChatThreadConsistencyError
- type ConsistencyErrorCode
- type ConversationRetry
- type Decrypter
- type Deliverer
- func (s *Deliverer) Connected(ctx context.Context)
- func (s *Deliverer) Disconnected(ctx context.Context)
- func (s *Deliverer) ForceDeliverLoop(ctx context.Context)
- func (s *Deliverer) IsOffline(ctx context.Context) bool
- func (s *Deliverer) Queue(ctx context.Context, convID chat1.ConversationID, msg chat1.MessagePlaintext, ...) (obr chat1.OutboxRecord, err error)
- func (s *Deliverer) SetClock(clock clockwork.Clock)
- func (s *Deliverer) SetSender(sender types.Sender)
- func (s *Deliverer) Start(ctx context.Context, uid gregor1.UID)
- func (s *Deliverer) Stop(ctx context.Context) chan struct{}
- type DelivererInfoError
- type DuplicateTopicNameError
- type Encrypter
- type ErrorWrapper
- type FetchRetrier
- func (f *FetchRetrier) Connected(ctx context.Context)
- func (f *FetchRetrier) Disconnected(ctx context.Context)
- func (f *FetchRetrier) Failure(ctx context.Context, uid gregor1.UID, desc types.RetryDescription) (err error)
- func (f *FetchRetrier) Force(ctx context.Context)
- func (f *FetchRetrier) IsOffline(ctx context.Context) bool
- func (f *FetchRetrier) Rekey(ctx context.Context, name string, membersType chat1.ConversationMembersType, ...)
- func (f *FetchRetrier) SetClock(clock clockwork.Clock)
- func (f *FetchRetrier) Start(ctx context.Context, uid gregor1.UID)
- func (f *FetchRetrier) Stop(ctx context.Context) chan struct{}
- func (f *FetchRetrier) Success(ctx context.Context, uid gregor1.UID, desc types.RetryDescription) (err error)
- type FetchType
- type FileStash
- type FullInboxRetry
- type HeaderMismatchError
- type Helper
- func (h *Helper) SendMsgByID(ctx context.Context, convID chat1.ConversationID, ...) error
- func (h *Helper) SendMsgByIDNonblock(ctx context.Context, convID chat1.ConversationID, ...) error
- func (h *Helper) SendMsgByName(ctx context.Context, name string, topicName *string, ...) error
- func (h *Helper) SendMsgByNameNonblock(ctx context.Context, name string, topicName *string, ...) error
- func (h *Helper) SendTextByID(ctx context.Context, convID chat1.ConversationID, ...) error
- func (h *Helper) SendTextByIDNonblock(ctx context.Context, convID chat1.ConversationID, ...) error
- func (h *Helper) SendTextByName(ctx context.Context, name string, topicName *string, ...) error
- func (h *Helper) SendTextByNameNonblock(ctx context.Context, name string, topicName *string, ...) error
- type HybridConversationSource
- func (s *HybridConversationSource) Clear(convID chat1.ConversationID, uid gregor1.UID) error
- func (s *HybridConversationSource) GetMessages(ctx context.Context, conv types.UnboxConversationInfo, uid gregor1.UID, ...) ([]chat1.MessageUnboxed, error)
- func (s *HybridConversationSource) GetMessagesWithRemotes(ctx context.Context, conv chat1.Conversation, uid gregor1.UID, ...) ([]chat1.MessageUnboxed, error)
- func (s *HybridConversationSource) Pull(ctx context.Context, convID chat1.ConversationID, uid gregor1.UID, ...) (thread chat1.ThreadView, rl []*chat1.RateLimit, err error)
- func (s *HybridConversationSource) PullLocalOnly(ctx context.Context, convID chat1.ConversationID, uid gregor1.UID, ...) (tv chat1.ThreadView, err error)
- func (s *HybridConversationSource) Push(ctx context.Context, convID chat1.ConversationID, uid gregor1.UID, ...) (decmsg chat1.MessageUnboxed, continuousUpdate bool, err error)
- func (s HybridConversationSource) SetRemoteInterface(ri func() chat1.RemoteInterface)
- func (s HybridConversationSource) TransformSupersedes(ctx context.Context, conv chat1.Conversation, uid gregor1.UID, ...) ([]chat1.MessageUnboxed, error)
- type HybridInboxSource
- func (s HybridInboxSource) Connected(ctx context.Context)
- func (s HybridInboxSource) Disconnected(ctx context.Context)
- func (b HybridInboxSource) GetInboxQueryLocalToRemote(ctx context.Context, lquery *chat1.GetInboxLocalQuery) (rquery *chat1.GetInboxQuery, info types.NameInfo, err error)
- func (b HybridInboxSource) IsMember(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID) (bool, *chat1.RateLimit, error)
- func (s HybridInboxSource) IsOffline(ctx context.Context) bool
- func (s *HybridInboxSource) MembershipUpdate(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, ...) (res types.MembershipUpdateRes, err error)
- func (s *HybridInboxSource) NewConversation(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, ...) (err error)
- func (s *HybridInboxSource) NewMessage(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, ...) (conv *chat1.ConversationLocal, err error)
- func (s *HybridInboxSource) Read(ctx context.Context, uid gregor1.UID, localizer types.ChatLocalizer, ...) (inbox types.Inbox, rl *chat1.RateLimit, err error)
- func (s *HybridInboxSource) ReadMessage(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, ...) (conv *chat1.ConversationLocal, err error)
- func (s *HybridInboxSource) ReadUnverified(ctx context.Context, uid gregor1.UID, useLocalData bool, ...) (res types.Inbox, rl *chat1.RateLimit, err error)
- func (s *HybridInboxSource) SetAppNotificationSettings(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, ...) (conv *chat1.ConversationLocal, err error)
- func (b HybridInboxSource) SetRemoteInterface(ri func() chat1.RemoteInterface)
- func (s *HybridInboxSource) SetStatus(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, ...) (conv *chat1.ConversationLocal, err error)
- func (s *HybridInboxSource) TeamTypeChanged(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, ...) (conv *chat1.ConversationLocal, err error)
- func (s *HybridInboxSource) TlfFinalize(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, ...) (convs []chat1.ConversationLocal, err error)
- type IdentifyChangedHandler
- type IdentifyNotifier
- type ImplicitTeamsNameInfoSource
- type KBFSNameInfoSource
- func (t *KBFSNameInfoSource) CompleteAndCanonicalizePrivateTlfName(ctx context.Context, tlfName string) (res keybase1.CanonicalTLFNameAndIDWithBreaks, err error)
- func (t *KBFSNameInfoSource) CryptKeys(ctx context.Context, tlfName string) (res keybase1.GetTLFCryptKeysRes, ferr error)
- func (t *KBFSNameInfoSource) Lookup(ctx context.Context, tlfName string, visibility keybase1.TLFVisibility) (res types.NameInfo, err error)
- func (t *KBFSNameInfoSource) PublicCanonicalTLFNameAndID(ctx context.Context, tlfName string) (res keybase1.CanonicalTLFNameAndIDWithBreaks, ferr error)
- type KeyFinder
- type KeyFinderImpl
- func (k *KeyFinderImpl) Find(ctx context.Context, name string, membersType chat1.ConversationMembersType, ...) (types.NameInfo, error)
- func (k *KeyFinderImpl) FindForDecryption(ctx context.Context, tlfName string, teamID chat1.TLFID, ...) (res types.NameInfo, err error)
- func (k *KeyFinderImpl) FindForEncryption(ctx context.Context, tlfName string, teamID chat1.TLFID, ...) (res types.NameInfo, err error)
- func (k *KeyFinderImpl) SetNameInfoSourceOverride(ni types.NameInfoSource)
- type NameIdentifier
- type NonblockInboxResult
- type NonblockingLocalizer
- type NonblockingSender
- func (s *NonblockingSender) Prepare(ctx context.Context, msg chat1.MessagePlaintext, ...) (*chat1.MessageBoxed, []chat1.Asset, []gregor1.UID, chat1.ChannelMention, ...)
- func (s *NonblockingSender) Send(ctx context.Context, convID chat1.ConversationID, msg chat1.MessagePlaintext, ...) (chat1.OutboxID, *chat1.MessageBoxed, *chat1.RateLimit, error)
- type OfflineClient
- type OfflineError
- type PermanentUnboxingError
- type PreviewRes
- type ProgressReporter
- type PushHandler
- func (g *PushHandler) Activity(ctx context.Context, m gregor.OutOfBandMessage) (err error)
- func (g *PushHandler) HandleOobm(ctx context.Context, obm gregor.OutOfBandMessage) (bool, error)
- func (g *PushHandler) MembershipUpdate(ctx context.Context, m gregor.OutOfBandMessage) (err error)
- func (g *PushHandler) SetBadger(badger *badges.Badger)
- func (g *PushHandler) SetClock(clock clockwork.Clock)
- func (g *PushHandler) TeamChannels(ctx context.Context, m gregor.OutOfBandMessage) (err error)
- func (g *PushHandler) TlfFinalize(ctx context.Context, m gregor.OutOfBandMessage) (err error)
- func (g *PushHandler) TlfResolve(ctx context.Context, m gregor.OutOfBandMessage) (err error)
- func (g *PushHandler) Typing(ctx context.Context, m gregor.OutOfBandMessage) (err error)
- type PutS3Result
- type ReadResetter
- type RemoteClient
- type RemoteConversationSource
- func (s *RemoteConversationSource) Clear(convID chat1.ConversationID, uid gregor1.UID) error
- func (s *RemoteConversationSource) GetMessages(ctx context.Context, conv types.UnboxConversationInfo, uid gregor1.UID, ...) ([]chat1.MessageUnboxed, error)
- func (s *RemoteConversationSource) GetMessagesWithRemotes(ctx context.Context, conv chat1.Conversation, uid gregor1.UID, ...) ([]chat1.MessageUnboxed, error)
- func (s *RemoteConversationSource) Pull(ctx context.Context, convID chat1.ConversationID, uid gregor1.UID, ...) (chat1.ThreadView, []*chat1.RateLimit, error)
- func (s *RemoteConversationSource) PullLocalOnly(ctx context.Context, convID chat1.ConversationID, uid gregor1.UID, ...) (chat1.ThreadView, error)
- func (s *RemoteConversationSource) Push(ctx context.Context, convID chat1.ConversationID, uid gregor1.UID, ...) (chat1.MessageUnboxed, bool, error)
- func (s RemoteConversationSource) SetRemoteInterface(ri func() chat1.RemoteInterface)
- func (s RemoteConversationSource) TransformSupersedes(ctx context.Context, conv chat1.Conversation, uid gregor1.UID, ...) ([]chat1.MessageUnboxed, error)
- type RemoteInboxSource
- func (s RemoteInboxSource) Connected(ctx context.Context)
- func (s RemoteInboxSource) Disconnected(ctx context.Context)
- func (b RemoteInboxSource) GetInboxQueryLocalToRemote(ctx context.Context, lquery *chat1.GetInboxLocalQuery) (rquery *chat1.GetInboxQuery, info types.NameInfo, err error)
- func (b RemoteInboxSource) IsMember(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID) (bool, *chat1.RateLimit, error)
- func (s RemoteInboxSource) IsOffline(ctx context.Context) bool
- func (s *RemoteInboxSource) MembershipUpdate(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, ...) (res types.MembershipUpdateRes, err error)
- func (s *RemoteInboxSource) NewConversation(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, ...) error
- func (s *RemoteInboxSource) NewMessage(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, ...) (*chat1.ConversationLocal, error)
- func (s *RemoteInboxSource) Read(ctx context.Context, uid gregor1.UID, localizer types.ChatLocalizer, ...) (types.Inbox, *chat1.RateLimit, error)
- func (s *RemoteInboxSource) ReadMessage(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, ...) (*chat1.ConversationLocal, error)
- func (s *RemoteInboxSource) ReadUnverified(ctx context.Context, uid gregor1.UID, useLocalData bool, ...) (types.Inbox, *chat1.RateLimit, error)
- func (s *RemoteInboxSource) SetAppNotificationSettings(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, ...) (*chat1.ConversationLocal, error)
- func (b RemoteInboxSource) SetRemoteInterface(ri func() chat1.RemoteInterface)
- func (s *RemoteInboxSource) SetStatus(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, ...) (*chat1.ConversationLocal, error)
- func (s *RemoteInboxSource) TlfFinalize(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, ...) ([]chat1.ConversationLocal, error)
- type Server
- func (h *Server) AddTeamMemberAfterReset(ctx context.Context, arg chat1.AddTeamMemberAfterResetArg) (err error)
- func (h *Server) CancelPost(ctx context.Context, outboxID chat1.OutboxID) (err error)
- func (h *Server) DeleteConversationLocal(ctx context.Context, arg chat1.DeleteConversationLocalArg) (res chat1.DeleteConversationLocalRes, err error)
- func (h *Server) DownloadAttachmentLocal(ctx context.Context, arg chat1.DownloadAttachmentLocalArg) (res chat1.DownloadAttachmentLocalRes, err error)
- func (h *Server) DownloadFileAttachmentLocal(ctx context.Context, arg chat1.DownloadFileAttachmentLocalArg) (res chat1.DownloadAttachmentLocalRes, err error)
- func (h *Server) FindConversationsLocal(ctx context.Context, arg chat1.FindConversationsLocalArg) (res chat1.FindConversationsLocalRes, err error)
- func (h *Server) GenerateOutboxID(ctx context.Context) (res chat1.OutboxID, err error)
- func (h *Server) GetCachedThread(ctx context.Context, arg chat1.GetCachedThreadArg) (res chat1.GetThreadLocalRes, err error)
- func (h *Server) GetConversationForCLILocal(ctx context.Context, arg chat1.GetConversationForCLILocalQuery) (res chat1.GetConversationForCLILocalRes, err error)
- func (h *Server) GetGlobalAppNotificationSettingsLocal(ctx context.Context) (res chat1.GlobalAppNotificationSettings, err error)
- func (h *Server) GetInboxAndUnboxLocal(ctx context.Context, arg chat1.GetInboxAndUnboxLocalArg) (res chat1.GetInboxAndUnboxLocalRes, err error)
- func (h *Server) GetInboxNonblockLocal(ctx context.Context, arg chat1.GetInboxNonblockLocalArg) (res chat1.NonblockFetchRes, err error)
- func (h *Server) GetInboxSummaryForCLILocal(ctx context.Context, arg chat1.GetInboxSummaryForCLILocalQuery) (res chat1.GetInboxSummaryForCLILocalRes, err error)
- func (h *Server) GetMessagesLocal(ctx context.Context, arg chat1.GetMessagesLocalArg) (res chat1.GetMessagesLocalRes, err error)
- func (h *Server) GetTLFConversationsLocal(ctx context.Context, arg chat1.GetTLFConversationsLocalArg) (res chat1.GetTLFConversationsLocalRes, err error)
- func (h *Server) GetThreadLocal(ctx context.Context, arg chat1.GetThreadLocalArg) (res chat1.GetThreadLocalRes, err error)
- func (h *Server) GetThreadNonblock(ctx context.Context, arg chat1.GetThreadNonblockArg) (res chat1.NonblockFetchRes, fullErr error)
- func (h *Server) JoinConversationByIDLocal(ctx context.Context, convID chat1.ConversationID) (res chat1.JoinLeaveConversationLocalRes, err error)
- func (h *Server) JoinConversationLocal(ctx context.Context, arg chat1.JoinConversationLocalArg) (res chat1.JoinLeaveConversationLocalRes, err error)
- func (h *Server) LeaveConversationLocal(ctx context.Context, convID chat1.ConversationID) (res chat1.JoinLeaveConversationLocalRes, err error)
- func (h *Server) MakePreview(ctx context.Context, arg chat1.MakePreviewArg) (res chat1.MakePreviewRes, err error)
- func (h *Server) MarkAsReadLocal(ctx context.Context, arg chat1.MarkAsReadLocalArg) (res chat1.MarkAsReadLocalRes, err error)
- func (h *Server) NewConversationLocal(ctx context.Context, arg chat1.NewConversationLocalArg) (res chat1.NewConversationLocalRes, err error)
- func (h *Server) PostAttachmentLocal(ctx context.Context, arg chat1.PostAttachmentLocalArg) (res chat1.PostLocalRes, err error)
- func (h *Server) PostDeleteNonblock(ctx context.Context, arg chat1.PostDeleteNonblockArg) (chat1.PostLocalNonblockRes, error)
- func (h *Server) PostEditNonblock(ctx context.Context, arg chat1.PostEditNonblockArg) (chat1.PostLocalNonblockRes, error)
- func (h *Server) PostFileAttachmentLocal(ctx context.Context, arg chat1.PostFileAttachmentLocalArg) (res chat1.PostLocalRes, err error)
- func (h *Server) PostHeadline(ctx context.Context, arg chat1.PostHeadlineArg) (chat1.PostLocalRes, error)
- func (h *Server) PostHeadlineNonblock(ctx context.Context, arg chat1.PostHeadlineNonblockArg) (chat1.PostLocalNonblockRes, error)
- func (h *Server) PostLocal(ctx context.Context, arg chat1.PostLocalArg) (res chat1.PostLocalRes, err error)
- func (h *Server) PostLocalNonblock(ctx context.Context, arg chat1.PostLocalNonblockArg) (res chat1.PostLocalNonblockRes, err error)
- func (h *Server) PostMetadata(ctx context.Context, arg chat1.PostMetadataArg) (chat1.PostLocalRes, error)
- func (h *Server) PostMetadataNonblock(ctx context.Context, arg chat1.PostMetadataNonblockArg) (chat1.PostLocalNonblockRes, error)
- func (h *Server) PostTextNonblock(ctx context.Context, arg chat1.PostTextNonblockArg) (chat1.PostLocalNonblockRes, error)
- func (h *Server) PreviewConversationByIDLocal(ctx context.Context, convID chat1.ConversationID) (res chat1.JoinLeaveConversationLocalRes, err error)
- func (h *Server) RetryPost(ctx context.Context, outboxID chat1.OutboxID) (err error)
- func (h *Server) SetAppNotificationSettingsLocal(ctx context.Context, arg chat1.SetAppNotificationSettingsLocalArg) (res chat1.SetAppNotificationSettingsLocalRes, err error)
- func (h *Server) SetConversationStatusLocal(ctx context.Context, arg chat1.SetConversationStatusLocalArg) (res chat1.SetConversationStatusLocalRes, err error)
- func (h *Server) SetGlobalAppNotificationSettingsLocal(ctx context.Context, strSettings map[string]bool) (err error)
- func (h *Server) Sign(payload []byte) ([]byte, error)
- func (h *Server) UnboxMobilePushNotification(ctx context.Context, arg chat1.UnboxMobilePushNotificationArg) (res string, err error)
- func (h *Server) UpdateTyping(ctx context.Context, arg chat1.UpdateTypingArg) (err error)
- type ServerConnection
- type SignDecrypter
- type SignEncrypter
- func (s *SignEncrypter) Encrypt(r io.Reader) (io.Reader, error)
- func (s *SignEncrypter) EncryptKey() []byte
- func (s *SignEncrypter) EncryptResume(r io.Reader, nonce signencrypt.Nonce, encKey signencrypt.SecretboxKey, ...) (io.Reader, error)
- func (s *SignEncrypter) EncryptWithNonce(r io.Reader, nonce signencrypt.Nonce) (io.Reader, error)
- func (s *SignEncrypter) EncryptedLen(size int) int
- func (s *SignEncrypter) SignKey() []byte
- func (s *SignEncrypter) VerifyKey() []byte
- type StashKey
- type Syncer
- func (s *Syncer) Connected(ctx context.Context, cli chat1.RemoteInterface, uid gregor1.UID, ...) (err error)
- func (s *Syncer) Disconnected(ctx context.Context)
- func (s *Syncer) IsConnected(ctx context.Context) bool
- func (s *Syncer) RegisterOfflinable(offlinable types.Offlinable)
- func (s *Syncer) SendChatStaleNotifications(ctx context.Context, uid gregor1.UID, updates []chat1.ConversationStaleUpdate, ...)
- func (s *Syncer) SetClock(clock clockwork.Clock)
- func (s *Syncer) Shutdown()
- func (s *Syncer) Sync(ctx context.Context, cli chat1.RemoteInterface, uid gregor1.UID, ...) (err error)
- type TeamsNameInfoSource
- type TransientUnboxingError
- type TypingMonitor
- type UISource
- type UnboxingError
- type UploadTask
- type VersionError
Constants ¶
const CurrentMessageBoxedVersion = chat1.MessageBoxedVersion_V2
Variables ¶
var ActiveIntervalAfterSend = 30 * 24 * time.Hour
var ErrAbortOnPartMismatch = errors.New("local part mismatch, aborting upload")
ErrAbortOnPartMismatch is returned when there is a mismatch between a current part and a previous attempt part. If ErrAbortOnPartMismatch is returned, the caller should abort the upload attempt and start from scratch.
var ErrChatServerTimeout = errors.New("timeout calling chat server")
var ErrDuplicateConnection = errors.New("error calling chat server")
var ErrKeyServerTimeout = errors.New("timeout calling into key server")
var ErrPartNotFound = errors.New("part does not exist in stash")
var InitialAssumedActiveInterval = 24 * time.Hour
All devices are presumed active for the first 24 hours. See comment below.
Functions ¶
func BackgroundContext ¶
func Context ¶
func Context(ctx context.Context, g *globals.Context, mode keybase1.TLFIdentifyBehavior, breaks *[]keybase1.TLFIdentifyFailure, notifier *IdentifyNotifier) context.Context
func FindConversations ¶
func FindConversations(ctx context.Context, g *globals.Context, debugger utils.DebugLabeler, ri func() chat1.RemoteInterface, uid gregor1.UID, tlfName string, topicType chat1.TopicType, membersTypeIn chat1.ConversationMembersType, vis keybase1.TLFVisibility, topicName string, oneChatPerTLF *bool) (res []chat1.ConversationLocal, rl []chat1.RateLimit, err error)
func GetInboxQueryNameInfo ¶
func GetLastSendTime ¶
Returns the zero time if there is no recorded last send time (either because the device has never sent a message, or because it hasn't sent one since we started recording).
func GetTopicNameState ¶
func GetTopicNameState(ctx context.Context, g *globals.Context, debugger utils.DebugLabeler, convs []chat1.ConversationLocal, uid gregor1.UID, tlfID chat1.TLFID, topicType chat1.TopicType, membersType chat1.ConversationMembersType) (res chat1.TopicNameState, err error)
func GetUnverifiedConv ¶
func IdentifyMode ¶
func IdentifyMode(ctx context.Context) (ib keybase1.TLFIdentifyBehavior, breaks *[]keybase1.TLFIdentifyFailure, ok bool)
func IdentifyModeCtx ¶
func IdentifyModeCtx(ctx context.Context, mode keybase1.TLFIdentifyBehavior, breaks *[]keybase1.TLFIdentifyFailure) context.Context
func JoinConversation ¶
func JoinConversation(ctx context.Context, g *globals.Context, debugger utils.DebugLabeler, ri func() chat1.RemoteInterface, uid gregor1.UID, convID chat1.ConversationID) (rl []chat1.RateLimit, err error)
func LeaveConversation ¶
func LeaveConversation(ctx context.Context, g *globals.Context, debugger utils.DebugLabeler, ri func() chat1.RemoteInterface, uid gregor1.UID, convID chat1.ConversationID) (rl []chat1.RateLimit, err error)
func NewConversation ¶
func NewConversationSource ¶
func NewConversationSource(g *globals.Context, typ string, boxer *Boxer, storage *storage.Storage, ri func() chat1.RemoteInterface) types.ConversationSource
func NewInboxSource ¶
func NewInboxSource(g *globals.Context, typ string, ri func() chat1.RemoteInterface) types.InboxSource
func PreviewConversation ¶
func PreviewConversation(ctx context.Context, g *globals.Context, debugger utils.DebugLabeler, ri func() chat1.RemoteInterface, uid gregor1.UID, convID chat1.ConversationID) (rl []chat1.RateLimit, err error)
func RecordChatSend ¶
func TouchFirstChatActiveQueryTime ¶
func TouchFirstChatActiveQueryTime(ctx context.Context, g *globals.Context, log utils.DebugLabeler) time.Time
If no first query time is found in the local db, this function writes the current time.
Types ¶
type AttachmentInfo ¶
type AttachmentInfo struct {
ObjectKey string // s3 destination
EncKey signencrypt.SecretboxKey // encryption key
SignKey signencrypt.SignKey // signing key
VerifyKey signencrypt.VerifyKey // verification key
Parts map[int]string // map of parts uploaded to S3, key == part number, value == hash of ciphertext
StartedAt time.Time // when the upload started
}
type AttachmentStash ¶
type AttachmentStore ¶
type AttachmentStore struct {
utils.DebugLabeler
// contains filtered or unexported fields
}
func NewAttachmentStore ¶
func NewAttachmentStore(log logger.Logger, runtimeDir string) *AttachmentStore
NewAttachmentStore creates a standard AttachmentStore that uses a real S3 connection.
func (*AttachmentStore) DeleteAsset ¶
func (*AttachmentStore) DeleteAssets ¶
func (*AttachmentStore) DownloadAsset ¶
func (a *AttachmentStore) DownloadAsset(ctx context.Context, params chat1.S3Params, asset chat1.Asset, w io.Writer, signer s3.Signer, progress ProgressReporter) error
DownloadAsset gets an object from S3 as described in asset.
func (*AttachmentStore) PutS3 ¶
func (a *AttachmentStore) PutS3(ctx context.Context, r io.Reader, size int64, task *UploadTask, previous *AttachmentInfo) (*PutS3Result, error)
PutS3 uploads the data in Reader r to S3. It chooses whether to use putSingle or putMultiPipeline based on the size of the object.
func (*AttachmentStore) UploadAsset ¶
func (a *AttachmentStore) UploadAsset(ctx context.Context, task *UploadTask) (chat1.Asset, error)
type BackgroundConvLoader ¶
type BackgroundConvLoader struct {
globals.Contextified
utils.DebugLabeler
sync.Mutex
// contains filtered or unexported fields
}
func NewBackgroundConvLoader ¶
func NewBackgroundConvLoader(g *globals.Context) *BackgroundConvLoader
func (*BackgroundConvLoader) Queue ¶
func (b *BackgroundConvLoader) Queue(ctx context.Context, convID chat1.ConversationID) error
func (*BackgroundConvLoader) Start ¶
func (b *BackgroundConvLoader) Start(ctx context.Context, uid gregor1.UID)
func (*BackgroundConvLoader) Stop ¶
func (b *BackgroundConvLoader) Stop(ctx context.Context) chan struct{}
type BlockingLocalizer ¶
type BlockingLocalizer struct {
globals.Contextified
// contains filtered or unexported fields
}
func NewBlockingLocalizer ¶
func NewBlockingLocalizer(g *globals.Context) *BlockingLocalizer
func (*BlockingLocalizer) Localize ¶
func (b *BlockingLocalizer) Localize(ctx context.Context, uid gregor1.UID, inbox types.Inbox) (res []chat1.ConversationLocal, err error)
func (*BlockingLocalizer) Name ¶
func (b *BlockingLocalizer) Name() string
func (*BlockingLocalizer) SetOffline ¶
func (b *BlockingLocalizer) SetOffline()
type BlockingSender ¶
type BlockingSender struct {
globals.Contextified
utils.DebugLabeler
// contains filtered or unexported fields
}
func NewBlockingSender ¶
func NewBlockingSender(g *globals.Context, boxer *Boxer, store *AttachmentStore, getRi func() chat1.RemoteInterface) *BlockingSender
func (*BlockingSender) Prepare ¶
func (s *BlockingSender) Prepare(ctx context.Context, plaintext chat1.MessagePlaintext, membersType chat1.ConversationMembersType, conv *chat1.Conversation) (*chat1.MessageBoxed, []chat1.Asset, []gregor1.UID, chat1.ChannelMention, *chat1.TopicNameState, error)
Prepare a message to be sent. Returns (boxedMessage, pendingAssetDeletes, error)
func (*BlockingSender) Send ¶
func (s *BlockingSender) Send(ctx context.Context, convID chat1.ConversationID, msg chat1.MessagePlaintext, clientPrev chat1.MessageID, outboxID *chat1.OutboxID) (obid chat1.OutboxID, boxed *chat1.MessageBoxed, rl *chat1.RateLimit, err error)
type BodyHashInvalid ¶
type BodyHashInvalid struct{}
func (BodyHashInvalid) Error ¶
func (e BodyHashInvalid) Error() string
type Boxer ¶
type Boxer struct {
utils.DebugLabeler
globals.Contextified
// contains filtered or unexported fields
}
func (*Boxer) BoxMessage ¶
func (b *Boxer) BoxMessage(ctx context.Context, msg chat1.MessagePlaintext, membersType chat1.ConversationMembersType, signingKeyPair libkb.NaclSigningKeyPair) (*chat1.MessageBoxed, error)
BoxMessage encrypts a keybase1.MessagePlaintext into a chat1.MessageBoxed. It finds the most recent key for the TLF.
func (*Boxer) CompareTlfNames ¶
func (*Boxer) UnboxMessage ¶
func (b *Boxer) UnboxMessage(ctx context.Context, boxed chat1.MessageBoxed, conv unboxConversationInfo) (m chat1.MessageUnboxed, uberr UnboxingError)
UnboxMessage unboxes a chat1.MessageBoxed into a chat1.MessageUnboxed. It finds the appropriate keybase1.CryptKey, decrypts the message, and verifies several things:
- The message's signature is valid.
- (TODO) The signing KID was valid when the signature was made.
- (TODO) The signing KID belongs to the sending device.
- (TODO) The sending device belongs to the sender. [Note that we do currently check the KID -> UID relationship, independent of the device ID.]
- (TODO) The sender has write permission in the TLF.
- (TODO) The TLF name, public flag, and finalized info resolve to the TLF ID.
- The conversation ID derives from the ConversationIDTriple.
- The body hash is not a replay from another message we know about.
- The prev pointers are consistent with other messages we know about.
- (TODO) The prev pointers are not absurdly ancient.
- The ClientHeader provided with the BoxedMessage matches the one we decrypt.
The first return value is unusable if the err != nil. Returns (_, err) for non-permanent errors, and (MessageUnboxedError, nil) for permanent errors. Permanent errors can be cached and must be treated as a value to deal with, whereas temporary errors are transient failures.
func (*Boxer) UnboxMessages ¶
func (b *Boxer) UnboxMessages(ctx context.Context, boxed []chat1.MessageBoxed, conv unboxConversationInfo) (unboxed []chat1.MessageUnboxed, err error)
func (*Boxer) UnboxThread ¶
func (b *Boxer) UnboxThread(ctx context.Context, boxed chat1.ThreadViewBoxed, conv unboxConversationInfo) (thread chat1.ThreadView, err error)
unboxThread transforms a chat1.ThreadViewBoxed to a keybase1.ThreadView.
func (*Boxer) ValidSenderKey ¶
func (b *Boxer) ValidSenderKey(ctx context.Context, sender gregor1.UID, key []byte, ctime gregor1.Time) (found, validAtCTime bool, revoked *gregor1.Time, unboxErr UnboxingError)
ValidSenderKey checks that the key was active for sender at ctime. This trusts the server for ctime, so a colluding server could use a revoked key and this check erroneously pass. But (revoked != nil) if the key was ever revoked, so that is irrespective of ctime. Returns (validAtCtime, revoked, err)
type BoxingCryptKeysError ¶
type BoxingCryptKeysError struct {
Err error
}
func NewBoxingCryptKeysError ¶
func NewBoxingCryptKeysError(err error) BoxingCryptKeysError
func (BoxingCryptKeysError) Error ¶
func (e BoxingCryptKeysError) Error() string
func (BoxingCryptKeysError) Inner ¶
func (e BoxingCryptKeysError) Inner() error
func (BoxingCryptKeysError) IsImmediateFail ¶
func (e BoxingCryptKeysError) IsImmediateFail() (chat1.OutboxErrorType, bool)
type BoxingError ¶
func NewBoxingError ¶
func NewBoxingError(msg string, perm bool) BoxingError
func (BoxingError) Error ¶
func (e BoxingError) Error() string
func (BoxingError) IsImmediateFail ¶
func (e BoxingError) IsImmediateFail() (chat1.OutboxErrorType, bool)
type BufferSource ¶
type BufferSource struct {
// contains filtered or unexported fields
}
func (*BufferSource) Basename ¶
func (b *BufferSource) Basename() string
func (*BufferSource) Bytes ¶
func (b *BufferSource) Bytes() []byte
func (*BufferSource) Close ¶
func (b *BufferSource) Close() error
func (*BufferSource) FileSize ¶
func (b *BufferSource) FileSize() int
func (*BufferSource) Open ¶
func (b *BufferSource) Open(sessionID int, cli *keybase1.StreamUiClient) (ReadResetter, error)
type ByMsgID ¶
type ByMsgID []chat1.MessageUnboxed
type CachingTeamChannelSource ¶
type CachingTeamChannelSource struct {
globals.Contextified
utils.DebugLabeler
sync.Mutex
// contains filtered or unexported fields
}
func NewCachingTeamChannelSource ¶
func NewCachingTeamChannelSource(g *globals.Context, ri func() chat1.RemoteInterface) *CachingTeamChannelSource
func (*CachingTeamChannelSource) ChannelsChanged ¶
func (c *CachingTeamChannelSource) ChannelsChanged(ctx context.Context, teamID chat1.TLFID)
func (*CachingTeamChannelSource) Connected ¶
func (c *CachingTeamChannelSource) Connected(ctx context.Context)
func (*CachingTeamChannelSource) Disconnected ¶
func (c *CachingTeamChannelSource) Disconnected(ctx context.Context)
func (*CachingTeamChannelSource) GetChannelsFull ¶
func (*CachingTeamChannelSource) GetChannelsTopicName ¶
type ChatThreadConsistencyError ¶
type ChatThreadConsistencyError interface {
error
Code() ConsistencyErrorCode
}
func CheckPrevPointersAndGetUnpreved ¶
func CheckPrevPointersAndGetUnpreved(thread *chat1.ThreadView) ([]chat1.MessagePreviousPointer, ChatThreadConsistencyError)
Ingest a ThreadView, check several invariants, and produce a list of prev pointers to not-yet-pointed-to messages. Check several invariants at the same time: 1. No two messages have the same ID. 2. All prev pointers point to messages with lesser IDs. 3. All prev pointers to a message agree on that message's header hash. 4. For all messages we have locally, the hashes pointing to them are actually correct. TODO: All of this should happen in the cache instead of here all at once.
func NewChatThreadConsistencyError ¶
func NewChatThreadConsistencyError(code ConsistencyErrorCode, msg string, formatArgs ...interface{}) ChatThreadConsistencyError
type ConsistencyErrorCode ¶
type ConsistencyErrorCode int
const ( DuplicateID ConsistencyErrorCode = iota OutOfOrderID InconsistentHash IncorrectHash )
type ConversationRetry ¶
type ConversationRetry struct {
globals.Contextified
utils.DebugLabeler
// contains filtered or unexported fields
}
func NewConversationRetry ¶
func NewConversationRetry(g *globals.Context, convID chat1.ConversationID, tlfID *chat1.TLFID, kind FetchType) *ConversationRetry
func (*ConversationRetry) RekeyFixable ¶
func (*ConversationRetry) SendStale ¶
func (c *ConversationRetry) SendStale(ctx context.Context, uid gregor1.UID)
func (*ConversationRetry) String ¶
func (c *ConversationRetry) String() string
type Decrypter ¶
type Decrypter interface {
// Decrypt takes a ciphertext reader, encryption and verify keys.
// It returns a plaintext reader. It uses the constant nonce.
Decrypt(ciphertext io.Reader, encKey, verifyKey []byte) (plaintext io.Reader)
// DecryptWithNonce takes a ciphertext reader, nonce, encryption and verify keys.
// It returns a plaintext reader.
DecryptWithNonce(ciphertext io.Reader, nonce signencrypt.Nonce, encKey, verifyKey []byte) (plaintext io.Reader)
}
type Deliverer ¶
type Deliverer struct {
globals.Contextified
sync.Mutex
utils.DebugLabeler
// contains filtered or unexported fields
}
func (*Deliverer) Disconnected ¶
func (*Deliverer) ForceDeliverLoop ¶
func (*Deliverer) Queue ¶
func (s *Deliverer) Queue(ctx context.Context, convID chat1.ConversationID, msg chat1.MessagePlaintext, outboxID *chat1.OutboxID, identifyBehavior keybase1.TLFIdentifyBehavior) (obr chat1.OutboxRecord, err error)
type DelivererInfoError ¶
type DelivererInfoError interface {
IsImmediateFail() (chat1.OutboxErrorType, bool)
}
type DuplicateTopicNameError ¶
type DuplicateTopicNameError struct {
TopicName string
}
func (DuplicateTopicNameError) Error ¶
func (e DuplicateTopicNameError) Error() string
type Encrypter ¶
type Encrypter interface {
// EncryptedLen returns the number of bytes that the ciphertext of
// size plaintext bytes will be.
EncryptedLen(size int) int
// Encrypt takes a plaintext reader and returns a ciphertext reader.
// It generates new keys every time it is called and uses a
// constant nonce.
Encrypt(plaintext io.Reader) (ciphertext io.Reader, err error)
// EncryptWithNonce takes a plaintext reader and returns a ciphertext reader.
// It generates new keys every time it is called and uses
// the provided nonce.
EncryptWithNonce(plaintext io.Reader, nonce signencrypt.Nonce) (ciphertext io.Reader, err error)
// EncryptResume takes a plaintext reader and a set of keys. It
// returns a ciphertext reader. It *does not* generate new keys
// but uses the parameter keys. These keys should *only* be used
// to encrypt the same plaintext as a previous attempt.
EncryptResume(r io.Reader, nonce signencrypt.Nonce, encKey signencrypt.SecretboxKey, signKey signencrypt.SignKey, verifyKey signencrypt.VerifyKey) (io.Reader, error)
// EncryptKey returns the ephemeral key that was used during the
// last invocation of Encrypt.
EncryptKey() []byte
// VerifyKey returns the public portion of the signing key used during
// the last invocation of Encrypt. It can be used for signature
// verification.
VerifyKey() []byte
}
type ErrorWrapper ¶
type ErrorWrapper struct {
// contains filtered or unexported fields
}
func NewErrorWrapper ¶
func NewErrorWrapper(prefix string, err error) *ErrorWrapper
func (*ErrorWrapper) Details ¶
func (e *ErrorWrapper) Details() string
func (*ErrorWrapper) Error ¶
func (e *ErrorWrapper) Error() string
type FetchRetrier ¶
type FetchRetrier struct {
globals.Contextified
utils.DebugLabeler
sync.Mutex
// contains filtered or unexported fields
}
FetchRetrier is responsible for tracking any nonblock fetch failures, and retrying them automatically.
func NewFetchRetrier ¶
func NewFetchRetrier(g *globals.Context) *FetchRetrier
func (*FetchRetrier) Connected ¶
func (f *FetchRetrier) Connected(ctx context.Context)
Connected is called when a connection to the chat server is established, and forces a pass over the retry queue
func (*FetchRetrier) Disconnected ¶
func (f *FetchRetrier) Disconnected(ctx context.Context)
Disconnected is called when we lose connection to the chat server, and pauses attempts on the retry queue.
func (*FetchRetrier) Failure ¶
func (f *FetchRetrier) Failure(ctx context.Context, uid gregor1.UID, desc types.RetryDescription) (err error)
Failure indicates a failure of type kind has happened when loading a conversation.
func (*FetchRetrier) Force ¶
func (f *FetchRetrier) Force(ctx context.Context)
Force forces a run of the retry loop.
func (*FetchRetrier) IsOffline ¶
func (f *FetchRetrier) IsOffline(ctx context.Context) bool
IsOffline returns if the module thinks we are connected to the chat server.
func (*FetchRetrier) Rekey ¶
func (f *FetchRetrier) Rekey(ctx context.Context, name string, membersType chat1.ConversationMembersType, public bool)
func (*FetchRetrier) SetClock ¶
func (f *FetchRetrier) SetClock(clock clockwork.Clock)
SetClock sets a custom clock for testing.
func (*FetchRetrier) Stop ¶
func (f *FetchRetrier) Stop(ctx context.Context) chan struct{}
func (*FetchRetrier) Success ¶
func (f *FetchRetrier) Success(ctx context.Context, uid gregor1.UID, desc types.RetryDescription) (err error)
Success indicates a success of type kind loading a conversation. This effectively removes that conversation from the retry queue.
type FullInboxRetry ¶
type FullInboxRetry struct {
globals.Contextified
utils.DebugLabeler
// contains filtered or unexported fields
}
func NewFullInboxRetry ¶
func NewFullInboxRetry(g *globals.Context, query *chat1.GetInboxLocalQuery, p *chat1.Pagination) FullInboxRetry
func (FullInboxRetry) RekeyFixable ¶
func (FullInboxRetry) SendStale ¶
func (f FullInboxRetry) SendStale(ctx context.Context, uid gregor1.UID)
func (FullInboxRetry) String ¶
func (f FullInboxRetry) String() string
type HeaderMismatchError ¶
type HeaderMismatchError struct {
Field string
}
func NewHeaderMismatchError ¶
func NewHeaderMismatchError(field string) HeaderMismatchError
func (HeaderMismatchError) Error ¶
func (e HeaderMismatchError) Error() string
type Helper ¶
type Helper struct {
globals.Contextified
utils.DebugLabeler
// contains filtered or unexported fields
}
func (*Helper) SendMsgByID ¶
func (h *Helper) SendMsgByID(ctx context.Context, convID chat1.ConversationID, trip chat1.ConversationIDTriple, tlfName string, body chat1.MessageBody, msgType chat1.MessageType) error
func (*Helper) SendMsgByIDNonblock ¶
func (h *Helper) SendMsgByIDNonblock(ctx context.Context, convID chat1.ConversationID, trip chat1.ConversationIDTriple, tlfName string, body chat1.MessageBody, msgType chat1.MessageType) error
func (*Helper) SendMsgByName ¶
func (h *Helper) SendMsgByName(ctx context.Context, name string, topicName *string, membersType chat1.ConversationMembersType, ident keybase1.TLFIdentifyBehavior, body chat1.MessageBody, msgType chat1.MessageType) error
func (*Helper) SendMsgByNameNonblock ¶
func (h *Helper) SendMsgByNameNonblock(ctx context.Context, name string, topicName *string, membersType chat1.ConversationMembersType, ident keybase1.TLFIdentifyBehavior, body chat1.MessageBody, msgType chat1.MessageType) error
func (*Helper) SendTextByID ¶
func (h *Helper) SendTextByID(ctx context.Context, convID chat1.ConversationID, trip chat1.ConversationIDTriple, tlfName string, text string) error
func (*Helper) SendTextByIDNonblock ¶
func (h *Helper) SendTextByIDNonblock(ctx context.Context, convID chat1.ConversationID, trip chat1.ConversationIDTriple, tlfName string, text string) error
func (*Helper) SendTextByName ¶
func (*Helper) SendTextByNameNonblock ¶
type HybridConversationSource ¶
type HybridConversationSource struct {
globals.Contextified
utils.DebugLabeler
// contains filtered or unexported fields
}
func NewHybridConversationSource ¶
func NewHybridConversationSource(g *globals.Context, b *Boxer, storage *storage.Storage, ri func() chat1.RemoteInterface) *HybridConversationSource
func (*HybridConversationSource) Clear ¶
func (s *HybridConversationSource) Clear(convID chat1.ConversationID, uid gregor1.UID) error
func (*HybridConversationSource) GetMessages ¶
func (s *HybridConversationSource) GetMessages(ctx context.Context, conv types.UnboxConversationInfo, uid gregor1.UID, msgIDs []chat1.MessageID) ([]chat1.MessageUnboxed, error)
func (*HybridConversationSource) GetMessagesWithRemotes ¶
func (s *HybridConversationSource) GetMessagesWithRemotes(ctx context.Context, conv chat1.Conversation, uid gregor1.UID, msgs []chat1.MessageBoxed) ([]chat1.MessageUnboxed, error)
func (*HybridConversationSource) Pull ¶
func (s *HybridConversationSource) Pull(ctx context.Context, convID chat1.ConversationID, uid gregor1.UID, query *chat1.GetThreadQuery, pagination *chat1.Pagination) (thread chat1.ThreadView, rl []*chat1.RateLimit, err error)
func (*HybridConversationSource) PullLocalOnly ¶
func (s *HybridConversationSource) PullLocalOnly(ctx context.Context, convID chat1.ConversationID, uid gregor1.UID, query *chat1.GetThreadQuery, pagination *chat1.Pagination) (tv chat1.ThreadView, err error)
func (*HybridConversationSource) Push ¶
func (s *HybridConversationSource) Push(ctx context.Context, convID chat1.ConversationID, uid gregor1.UID, msg chat1.MessageBoxed) (decmsg chat1.MessageUnboxed, continuousUpdate bool, err error)
func (HybridConversationSource) SetRemoteInterface ¶
func (s HybridConversationSource) SetRemoteInterface(ri func() chat1.RemoteInterface)
func (HybridConversationSource) TransformSupersedes ¶
func (s HybridConversationSource) TransformSupersedes(ctx context.Context, conv chat1.Conversation, uid gregor1.UID, msgs []chat1.MessageUnboxed) ([]chat1.MessageUnboxed, error)
type HybridInboxSource ¶
type HybridInboxSource struct {
globals.Contextified
utils.DebugLabeler
// contains filtered or unexported fields
}
func NewHybridInboxSource ¶
func NewHybridInboxSource(g *globals.Context, getChatInterface func() chat1.RemoteInterface) *HybridInboxSource
func (HybridInboxSource) Disconnected ¶
func (HybridInboxSource) GetInboxQueryLocalToRemote ¶
func (b HybridInboxSource) GetInboxQueryLocalToRemote(ctx context.Context, lquery *chat1.GetInboxLocalQuery) (rquery *chat1.GetInboxQuery, info types.NameInfo, err error)
func (*HybridInboxSource) MembershipUpdate ¶
func (s *HybridInboxSource) MembershipUpdate(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, joined []chat1.ConversationMember, removed []chat1.ConversationMember, resets []chat1.ConversationMember, previews []chat1.ConversationID) (res types.MembershipUpdateRes, err error)
func (*HybridInboxSource) NewConversation ¶
func (s *HybridInboxSource) NewConversation(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, conv chat1.Conversation) (err error)
func (*HybridInboxSource) NewMessage ¶
func (s *HybridInboxSource) NewMessage(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, convID chat1.ConversationID, msg chat1.MessageBoxed) (conv *chat1.ConversationLocal, err error)
func (*HybridInboxSource) Read ¶
func (s *HybridInboxSource) Read(ctx context.Context, uid gregor1.UID, localizer types.ChatLocalizer, useLocalData bool, query *chat1.GetInboxLocalQuery, p *chat1.Pagination) (inbox types.Inbox, rl *chat1.RateLimit, err error)
func (*HybridInboxSource) ReadMessage ¶
func (s *HybridInboxSource) ReadMessage(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, convID chat1.ConversationID, msgID chat1.MessageID) (conv *chat1.ConversationLocal, err error)
func (*HybridInboxSource) ReadUnverified ¶
func (s *HybridInboxSource) ReadUnverified(ctx context.Context, uid gregor1.UID, useLocalData bool, query *chat1.GetInboxQuery, p *chat1.Pagination) (res types.Inbox, rl *chat1.RateLimit, err error)
func (*HybridInboxSource) SetAppNotificationSettings ¶
func (s *HybridInboxSource) SetAppNotificationSettings(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, convID chat1.ConversationID, settings chat1.ConversationNotificationInfo) (conv *chat1.ConversationLocal, err error)
func (HybridInboxSource) SetRemoteInterface ¶
func (b HybridInboxSource) SetRemoteInterface(ri func() chat1.RemoteInterface)
func (*HybridInboxSource) SetStatus ¶
func (s *HybridInboxSource) SetStatus(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, convID chat1.ConversationID, status chat1.ConversationStatus) (conv *chat1.ConversationLocal, err error)
func (*HybridInboxSource) TeamTypeChanged ¶
func (s *HybridInboxSource) TeamTypeChanged(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, convID chat1.ConversationID, teamType chat1.TeamType) (conv *chat1.ConversationLocal, err error)
func (*HybridInboxSource) TlfFinalize ¶
func (s *HybridInboxSource) TlfFinalize(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, convIDs []chat1.ConversationID, finalizeInfo chat1.ConversationFinalizeInfo) (convs []chat1.ConversationLocal, err error)
type IdentifyChangedHandler ¶
type IdentifyChangedHandler struct {
globals.Contextified
utils.DebugLabeler
}
func NewIdentifyChangedHandler ¶
func NewIdentifyChangedHandler(g *globals.Context) *IdentifyChangedHandler
func (*IdentifyChangedHandler) BackgroundIdentifyChanged ¶
func (h *IdentifyChangedHandler) BackgroundIdentifyChanged(ctx context.Context, job engine.IdentifyJob)
func (*IdentifyChangedHandler) HandleUserChanged ¶
func (h *IdentifyChangedHandler) HandleUserChanged(uid keybase1.UID) (err error)
type IdentifyNotifier ¶
type IdentifyNotifier struct {
globals.Contextified
utils.DebugLabeler
sync.RWMutex
// contains filtered or unexported fields
}
func CtxIdentifyNotifier ¶
func CtxIdentifyNotifier(ctx context.Context) *IdentifyNotifier
func NewIdentifyNotifier ¶
func NewIdentifyNotifier(g *globals.Context) *IdentifyNotifier
func (*IdentifyNotifier) Send ¶
func (i *IdentifyNotifier) Send(update keybase1.CanonicalTLFNameAndIDWithBreaks)
type ImplicitTeamsNameInfoSource ¶
type ImplicitTeamsNameInfoSource struct {
globals.Contextified
utils.DebugLabeler
*NameIdentifier
}
func NewImplicitTeamsNameInfoSource ¶
func NewImplicitTeamsNameInfoSource(g *globals.Context) *ImplicitTeamsNameInfoSource
type KBFSNameInfoSource ¶
type KBFSNameInfoSource struct {
globals.Contextified
utils.DebugLabeler
*NameIdentifier
}
func NewKBFSNameInfoSource ¶
func NewKBFSNameInfoSource(g *globals.Context) *KBFSNameInfoSource
func (*KBFSNameInfoSource) CompleteAndCanonicalizePrivateTlfName ¶
func (t *KBFSNameInfoSource) CompleteAndCanonicalizePrivateTlfName(ctx context.Context, tlfName string) (res keybase1.CanonicalTLFNameAndIDWithBreaks, err error)
func (*KBFSNameInfoSource) CryptKeys ¶
func (t *KBFSNameInfoSource) CryptKeys(ctx context.Context, tlfName string) (res keybase1.GetTLFCryptKeysRes, ferr error)
func (*KBFSNameInfoSource) Lookup ¶
func (t *KBFSNameInfoSource) Lookup(ctx context.Context, tlfName string, visibility keybase1.TLFVisibility) (res types.NameInfo, err error)
func (*KBFSNameInfoSource) PublicCanonicalTLFNameAndID ¶
func (t *KBFSNameInfoSource) PublicCanonicalTLFNameAndID(ctx context.Context, tlfName string) (res keybase1.CanonicalTLFNameAndIDWithBreaks, ferr error)
type KeyFinder ¶
type KeyFinder interface {
Find(ctx context.Context, name string, membersType chat1.ConversationMembersType, public bool) (types.NameInfo, error)
FindForEncryption(ctx context.Context, tlfName string, teamID chat1.TLFID, membersType chat1.ConversationMembersType, public bool) (types.NameInfo, error)
FindForDecryption(ctx context.Context, tlfName string, teamID chat1.TLFID, membersType chat1.ConversationMembersType, public bool, keyGeneration int) (types.NameInfo, error)
SetNameInfoSourceOverride(types.NameInfoSource)
}
KeyFinder remembers results from previous calls to CryptKeys().
func NewKeyFinder ¶
NewKeyFinder creates a KeyFinder.
type KeyFinderImpl ¶
type KeyFinderImpl struct {
globals.Contextified
utils.DebugLabeler
sync.Mutex
// contains filtered or unexported fields
}
func (*KeyFinderImpl) Find ¶
func (k *KeyFinderImpl) Find(ctx context.Context, name string, membersType chat1.ConversationMembersType, public bool) (types.NameInfo, error)
Find finds keybase1.TLFCryptKeys for tlfName, checking for existing results.
func (*KeyFinderImpl) FindForDecryption ¶
func (k *KeyFinderImpl) FindForDecryption(ctx context.Context, tlfName string, teamID chat1.TLFID, membersType chat1.ConversationMembersType, public bool, keyGeneration int) (res types.NameInfo, err error)
Ignores tlfName or teamID based on membersType.
func (*KeyFinderImpl) FindForEncryption ¶
func (k *KeyFinderImpl) FindForEncryption(ctx context.Context, tlfName string, teamID chat1.TLFID, membersType chat1.ConversationMembersType, public bool) (res types.NameInfo, err error)
Find keys up-to-date enough for encrypting. Ignores tlfName or teamID based on membersType.
func (*KeyFinderImpl) SetNameInfoSourceOverride ¶
func (k *KeyFinderImpl) SetNameInfoSourceOverride(ni types.NameInfoSource)
type NameIdentifier ¶
type NameIdentifier struct {
globals.Contextified
}
func NewNameIdentifier ¶
func NewNameIdentifier(g *globals.Context) *NameIdentifier
func (*NameIdentifier) Identify ¶
func (t *NameIdentifier) Identify(ctx context.Context, names []string, private bool, identBehavior keybase1.TLFIdentifyBehavior) ([]keybase1.TLFIdentifyFailure, error)
type NonblockInboxResult ¶
type NonblockInboxResult struct {
Conv chat1.Conversation
Err *chat1.ConversationErrorLocal
ConvRes *chat1.ConversationLocal
InboxRes *types.Inbox
}
type NonblockingLocalizer ¶
type NonblockingLocalizer struct {
globals.Contextified
utils.DebugLabeler
// contains filtered or unexported fields
}
func NewNonblockingLocalizer ¶
func NewNonblockingLocalizer(g *globals.Context, localizeCb chan NonblockInboxResult, maxUnbox *int) *NonblockingLocalizer
func (*NonblockingLocalizer) Localize ¶
func (b *NonblockingLocalizer) Localize(ctx context.Context, uid gregor1.UID, inbox types.Inbox) (res []chat1.ConversationLocal, err error)
func (*NonblockingLocalizer) Name ¶
func (b *NonblockingLocalizer) Name() string
func (*NonblockingLocalizer) SetOffline ¶
func (b *NonblockingLocalizer) SetOffline()
type NonblockingSender ¶
type NonblockingSender struct {
globals.Contextified
utils.DebugLabeler
// contains filtered or unexported fields
}
func NewNonblockingSender ¶
func NewNonblockingSender(g *globals.Context, sender types.Sender) *NonblockingSender
func (*NonblockingSender) Prepare ¶
func (s *NonblockingSender) Prepare(ctx context.Context, msg chat1.MessagePlaintext, membersType chat1.ConversationMembersType, conv *chat1.Conversation) (*chat1.MessageBoxed, []chat1.Asset, []gregor1.UID, chat1.ChannelMention, *chat1.TopicNameState, error)
func (*NonblockingSender) Send ¶
func (s *NonblockingSender) Send(ctx context.Context, convID chat1.ConversationID, msg chat1.MessagePlaintext, clientPrev chat1.MessageID, outboxID *chat1.OutboxID) (chat1.OutboxID, *chat1.MessageBoxed, *chat1.RateLimit, error)
type OfflineClient ¶
type OfflineClient struct {
}
type OfflineError ¶
type OfflineError struct {
}
func (OfflineError) Error ¶
func (e OfflineError) Error() string
type PermanentUnboxingError ¶
type PermanentUnboxingError struct {
// contains filtered or unexported fields
}
func (PermanentUnboxingError) Error ¶
func (e PermanentUnboxingError) Error() string
func (PermanentUnboxingError) ExportType ¶
func (e PermanentUnboxingError) ExportType() chat1.MessageUnboxedErrorType
func (PermanentUnboxingError) Inner ¶
func (e PermanentUnboxingError) Inner() error
func (PermanentUnboxingError) IsPermanent ¶
func (e PermanentUnboxingError) IsPermanent() bool
type PreviewRes ¶
type ProgressReporter ¶
type ProgressReporter func(bytesCompleted, bytesTotal int64)
type PushHandler ¶
type PushHandler struct {
globals.Contextified
utils.DebugLabeler
sync.Mutex
// contains filtered or unexported fields
}
func NewPushHandler ¶
func NewPushHandler(g *globals.Context) *PushHandler
func (*PushHandler) Activity ¶
func (g *PushHandler) Activity(ctx context.Context, m gregor.OutOfBandMessage) (err error)
func (*PushHandler) HandleOobm ¶
func (g *PushHandler) HandleOobm(ctx context.Context, obm gregor.OutOfBandMessage) (bool, error)
func (*PushHandler) MembershipUpdate ¶
func (g *PushHandler) MembershipUpdate(ctx context.Context, m gregor.OutOfBandMessage) (err error)
func (*PushHandler) SetBadger ¶
func (g *PushHandler) SetBadger(badger *badges.Badger)
func (*PushHandler) SetClock ¶
func (g *PushHandler) SetClock(clock clockwork.Clock)
func (*PushHandler) TeamChannels ¶
func (g *PushHandler) TeamChannels(ctx context.Context, m gregor.OutOfBandMessage) (err error)
func (*PushHandler) TlfFinalize ¶
func (g *PushHandler) TlfFinalize(ctx context.Context, m gregor.OutOfBandMessage) (err error)
func (*PushHandler) TlfResolve ¶
func (g *PushHandler) TlfResolve(ctx context.Context, m gregor.OutOfBandMessage) (err error)
func (*PushHandler) Typing ¶
func (g *PushHandler) Typing(ctx context.Context, m gregor.OutOfBandMessage) (err error)
type PutS3Result ¶
PutS3Result is the success result of calling PutS3.
type ReadResetter ¶
type RemoteClient ¶
type RemoteClient struct {
utils.DebugLabeler
// contains filtered or unexported fields
}
func NewRemoteClient ¶
func NewRemoteClient(g *globals.Context, cli rpc.GenericClient) *RemoteClient
type RemoteConversationSource ¶
type RemoteConversationSource struct {
globals.Contextified
// contains filtered or unexported fields
}
func NewRemoteConversationSource ¶
func NewRemoteConversationSource(g *globals.Context, b *Boxer, ri func() chat1.RemoteInterface) *RemoteConversationSource
func (*RemoteConversationSource) Clear ¶
func (s *RemoteConversationSource) Clear(convID chat1.ConversationID, uid gregor1.UID) error
func (*RemoteConversationSource) GetMessages ¶
func (s *RemoteConversationSource) GetMessages(ctx context.Context, conv types.UnboxConversationInfo, uid gregor1.UID, msgIDs []chat1.MessageID) ([]chat1.MessageUnboxed, error)
func (*RemoteConversationSource) GetMessagesWithRemotes ¶
func (s *RemoteConversationSource) GetMessagesWithRemotes(ctx context.Context, conv chat1.Conversation, uid gregor1.UID, msgs []chat1.MessageBoxed) ([]chat1.MessageUnboxed, error)
func (*RemoteConversationSource) Pull ¶
func (s *RemoteConversationSource) Pull(ctx context.Context, convID chat1.ConversationID, uid gregor1.UID, query *chat1.GetThreadQuery, pagination *chat1.Pagination) (chat1.ThreadView, []*chat1.RateLimit, error)
func (*RemoteConversationSource) PullLocalOnly ¶
func (s *RemoteConversationSource) PullLocalOnly(ctx context.Context, convID chat1.ConversationID, uid gregor1.UID, query *chat1.GetThreadQuery, pagination *chat1.Pagination) (chat1.ThreadView, error)
func (*RemoteConversationSource) Push ¶
func (s *RemoteConversationSource) Push(ctx context.Context, convID chat1.ConversationID, uid gregor1.UID, msg chat1.MessageBoxed) (chat1.MessageUnboxed, bool, error)
func (RemoteConversationSource) SetRemoteInterface ¶
func (s RemoteConversationSource) SetRemoteInterface(ri func() chat1.RemoteInterface)
func (RemoteConversationSource) TransformSupersedes ¶
func (s RemoteConversationSource) TransformSupersedes(ctx context.Context, conv chat1.Conversation, uid gregor1.UID, msgs []chat1.MessageUnboxed) ([]chat1.MessageUnboxed, error)
type RemoteInboxSource ¶
type RemoteInboxSource struct {
globals.Contextified
utils.DebugLabeler
// contains filtered or unexported fields
}
func NewRemoteInboxSource ¶
func NewRemoteInboxSource(g *globals.Context, ri func() chat1.RemoteInterface) *RemoteInboxSource
func (RemoteInboxSource) Disconnected ¶
func (RemoteInboxSource) GetInboxQueryLocalToRemote ¶
func (b RemoteInboxSource) GetInboxQueryLocalToRemote(ctx context.Context, lquery *chat1.GetInboxLocalQuery) (rquery *chat1.GetInboxQuery, info types.NameInfo, err error)
func (*RemoteInboxSource) MembershipUpdate ¶
func (s *RemoteInboxSource) MembershipUpdate(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, joined []chat1.ConversationMember, removed []chat1.ConversationMember, resets []chat1.ConversationMember, previews []chat1.ConversationID) (res types.MembershipUpdateRes, err error)
func (*RemoteInboxSource) NewConversation ¶
func (s *RemoteInboxSource) NewConversation(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, conv chat1.Conversation) error
func (*RemoteInboxSource) NewMessage ¶
func (s *RemoteInboxSource) NewMessage(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, convID chat1.ConversationID, msg chat1.MessageBoxed) (*chat1.ConversationLocal, error)
func (*RemoteInboxSource) Read ¶
func (s *RemoteInboxSource) Read(ctx context.Context, uid gregor1.UID, localizer types.ChatLocalizer, useLocalData bool, query *chat1.GetInboxLocalQuery, p *chat1.Pagination) (types.Inbox, *chat1.RateLimit, error)
func (*RemoteInboxSource) ReadMessage ¶
func (s *RemoteInboxSource) ReadMessage(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, convID chat1.ConversationID, msgID chat1.MessageID) (*chat1.ConversationLocal, error)
func (*RemoteInboxSource) ReadUnverified ¶
func (s *RemoteInboxSource) ReadUnverified(ctx context.Context, uid gregor1.UID, useLocalData bool, rquery *chat1.GetInboxQuery, p *chat1.Pagination) (types.Inbox, *chat1.RateLimit, error)
func (*RemoteInboxSource) SetAppNotificationSettings ¶
func (s *RemoteInboxSource) SetAppNotificationSettings(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, convID chat1.ConversationID, settings chat1.ConversationNotificationInfo) (*chat1.ConversationLocal, error)
func (RemoteInboxSource) SetRemoteInterface ¶
func (b RemoteInboxSource) SetRemoteInterface(ri func() chat1.RemoteInterface)
func (*RemoteInboxSource) SetStatus ¶
func (s *RemoteInboxSource) SetStatus(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, convID chat1.ConversationID, status chat1.ConversationStatus) (*chat1.ConversationLocal, error)
func (*RemoteInboxSource) TlfFinalize ¶
func (s *RemoteInboxSource) TlfFinalize(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, convIDs []chat1.ConversationID, finalizeInfo chat1.ConversationFinalizeInfo) ([]chat1.ConversationLocal, error)
type Server ¶
type Server struct {
globals.Contextified
utils.DebugLabeler
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(g *globals.Context, store *AttachmentStore, serverConn ServerConnection, uiSource UISource) *Server
func (*Server) AddTeamMemberAfterReset ¶
func (*Server) CancelPost ¶
func (*Server) DeleteConversationLocal ¶
func (h *Server) DeleteConversationLocal(ctx context.Context, arg chat1.DeleteConversationLocalArg) (res chat1.DeleteConversationLocalRes, err error)
func (*Server) DownloadAttachmentLocal ¶
func (h *Server) DownloadAttachmentLocal(ctx context.Context, arg chat1.DownloadAttachmentLocalArg) (res chat1.DownloadAttachmentLocalRes, err error)
DownloadAttachmentLocal implements chat1.LocalInterface.DownloadAttachmentLocal.
func (*Server) DownloadFileAttachmentLocal ¶
func (h *Server) DownloadFileAttachmentLocal(ctx context.Context, arg chat1.DownloadFileAttachmentLocalArg) (res chat1.DownloadAttachmentLocalRes, err error)
DownloadFileAttachmentLocal implements chat1.LocalInterface.DownloadFileAttachmentLocal.
func (*Server) FindConversationsLocal ¶
func (h *Server) FindConversationsLocal(ctx context.Context, arg chat1.FindConversationsLocalArg) (res chat1.FindConversationsLocalRes, err error)
func (*Server) GenerateOutboxID ¶
func (*Server) GetCachedThread ¶
func (h *Server) GetCachedThread(ctx context.Context, arg chat1.GetCachedThreadArg) (res chat1.GetThreadLocalRes, err error)
func (*Server) GetConversationForCLILocal ¶
func (h *Server) GetConversationForCLILocal(ctx context.Context, arg chat1.GetConversationForCLILocalQuery) (res chat1.GetConversationForCLILocalRes, err error)
func (*Server) GetGlobalAppNotificationSettingsLocal ¶
func (*Server) GetInboxAndUnboxLocal ¶
func (h *Server) GetInboxAndUnboxLocal(ctx context.Context, arg chat1.GetInboxAndUnboxLocalArg) (res chat1.GetInboxAndUnboxLocalRes, err error)
GetInboxAndUnboxLocal implements keybase.chatLocal.getInboxAndUnboxLocal protocol.
func (*Server) GetInboxNonblockLocal ¶
func (h *Server) GetInboxNonblockLocal(ctx context.Context, arg chat1.GetInboxNonblockLocalArg) (res chat1.NonblockFetchRes, err error)
func (*Server) GetInboxSummaryForCLILocal ¶
func (h *Server) GetInboxSummaryForCLILocal(ctx context.Context, arg chat1.GetInboxSummaryForCLILocalQuery) (res chat1.GetInboxSummaryForCLILocalRes, err error)
func (*Server) GetMessagesLocal ¶
func (h *Server) GetMessagesLocal(ctx context.Context, arg chat1.GetMessagesLocalArg) (res chat1.GetMessagesLocalRes, err error)
func (*Server) GetTLFConversationsLocal ¶
func (h *Server) GetTLFConversationsLocal(ctx context.Context, arg chat1.GetTLFConversationsLocalArg) (res chat1.GetTLFConversationsLocalRes, err error)
func (*Server) GetThreadLocal ¶
func (h *Server) GetThreadLocal(ctx context.Context, arg chat1.GetThreadLocalArg) (res chat1.GetThreadLocalRes, err error)
GetThreadLocal implements keybase.chatLocal.getThreadLocal protocol.
func (*Server) GetThreadNonblock ¶
func (h *Server) GetThreadNonblock(ctx context.Context, arg chat1.GetThreadNonblockArg) (res chat1.NonblockFetchRes, fullErr error)
func (*Server) JoinConversationByIDLocal ¶
func (h *Server) JoinConversationByIDLocal(ctx context.Context, convID chat1.ConversationID) (res chat1.JoinLeaveConversationLocalRes, err error)
func (*Server) JoinConversationLocal ¶
func (h *Server) JoinConversationLocal(ctx context.Context, arg chat1.JoinConversationLocalArg) (res chat1.JoinLeaveConversationLocalRes, err error)
func (*Server) LeaveConversationLocal ¶
func (h *Server) LeaveConversationLocal(ctx context.Context, convID chat1.ConversationID) (res chat1.JoinLeaveConversationLocalRes, err error)
func (*Server) MakePreview ¶
func (h *Server) MakePreview(ctx context.Context, arg chat1.MakePreviewArg) (res chat1.MakePreviewRes, err error)
MakePreview implements chat1.LocalInterface.MakePreview.
func (*Server) MarkAsReadLocal ¶
func (h *Server) MarkAsReadLocal(ctx context.Context, arg chat1.MarkAsReadLocalArg) (res chat1.MarkAsReadLocalRes, err error)
func (*Server) NewConversationLocal ¶
func (h *Server) NewConversationLocal(ctx context.Context, arg chat1.NewConversationLocalArg) (res chat1.NewConversationLocalRes, err error)
NewConversationLocal implements keybase.chatLocal.newConversationLocal protocol. Create a new conversation. Or in the case of CHAT, create-or-get a conversation.
func (*Server) PostAttachmentLocal ¶
func (h *Server) PostAttachmentLocal(ctx context.Context, arg chat1.PostAttachmentLocalArg) (res chat1.PostLocalRes, err error)
PostAttachmentLocal implements chat1.LocalInterface.PostAttachmentLocal.
func (*Server) PostDeleteNonblock ¶
func (h *Server) PostDeleteNonblock(ctx context.Context, arg chat1.PostDeleteNonblockArg) (chat1.PostLocalNonblockRes, error)
func (*Server) PostEditNonblock ¶
func (h *Server) PostEditNonblock(ctx context.Context, arg chat1.PostEditNonblockArg) (chat1.PostLocalNonblockRes, error)
func (*Server) PostFileAttachmentLocal ¶
func (h *Server) PostFileAttachmentLocal(ctx context.Context, arg chat1.PostFileAttachmentLocalArg) (res chat1.PostLocalRes, err error)
PostFileAttachmentLocal implements chat1.LocalInterface.PostFileAttachmentLocal.
func (*Server) PostHeadline ¶
func (h *Server) PostHeadline(ctx context.Context, arg chat1.PostHeadlineArg) (chat1.PostLocalRes, error)
func (*Server) PostHeadlineNonblock ¶
func (h *Server) PostHeadlineNonblock(ctx context.Context, arg chat1.PostHeadlineNonblockArg) (chat1.PostLocalNonblockRes, error)
func (*Server) PostLocal ¶
func (h *Server) PostLocal(ctx context.Context, arg chat1.PostLocalArg) (res chat1.PostLocalRes, err error)
PostLocal implements keybase.chatLocal.postLocal protocol.
func (*Server) PostLocalNonblock ¶
func (h *Server) PostLocalNonblock(ctx context.Context, arg chat1.PostLocalNonblockArg) (res chat1.PostLocalNonblockRes, err error)
func (*Server) PostMetadata ¶
func (h *Server) PostMetadata(ctx context.Context, arg chat1.PostMetadataArg) (chat1.PostLocalRes, error)
func (*Server) PostMetadataNonblock ¶
func (h *Server) PostMetadataNonblock(ctx context.Context, arg chat1.PostMetadataNonblockArg) (chat1.PostLocalNonblockRes, error)
func (*Server) PostTextNonblock ¶
func (h *Server) PostTextNonblock(ctx context.Context, arg chat1.PostTextNonblockArg) (chat1.PostLocalNonblockRes, error)
func (*Server) PreviewConversationByIDLocal ¶
func (h *Server) PreviewConversationByIDLocal(ctx context.Context, convID chat1.ConversationID) (res chat1.JoinLeaveConversationLocalRes, err error)
func (*Server) SetAppNotificationSettingsLocal ¶
func (h *Server) SetAppNotificationSettingsLocal(ctx context.Context, arg chat1.SetAppNotificationSettingsLocalArg) (res chat1.SetAppNotificationSettingsLocalRes, err error)
func (*Server) SetConversationStatusLocal ¶
func (h *Server) SetConversationStatusLocal(ctx context.Context, arg chat1.SetConversationStatusLocalArg) (res chat1.SetConversationStatusLocalRes, err error)
func (*Server) SetGlobalAppNotificationSettingsLocal ¶
func (*Server) UnboxMobilePushNotification ¶
func (*Server) UpdateTyping ¶
type ServerConnection ¶
type SignDecrypter ¶
type SignDecrypter struct{}
func NewSignDecrypter ¶
func NewSignDecrypter() *SignDecrypter
func (*SignDecrypter) DecryptWithNonce ¶
func (s *SignDecrypter) DecryptWithNonce(r io.Reader, nonce signencrypt.Nonce, encKey, verifyKey []byte) (plaintext io.Reader)
type SignEncrypter ¶
type SignEncrypter struct {
// contains filtered or unexported fields
}
func NewSignEncrypter ¶
func NewSignEncrypter() *SignEncrypter
func (*SignEncrypter) EncryptKey ¶
func (s *SignEncrypter) EncryptKey() []byte
func (*SignEncrypter) EncryptResume ¶
func (s *SignEncrypter) EncryptResume(r io.Reader, nonce signencrypt.Nonce, encKey signencrypt.SecretboxKey, signKey signencrypt.SignKey, verifyKey signencrypt.VerifyKey) (io.Reader, error)
EncryptResume is used to create a SignEncrypter to resume an interrupted attachment upload. It is *very* important that the keys passed in are not used to encrypt different plaintext than their original usage.
func (*SignEncrypter) EncryptWithNonce ¶
func (s *SignEncrypter) EncryptWithNonce(r io.Reader, nonce signencrypt.Nonce) (io.Reader, error)
func (*SignEncrypter) EncryptedLen ¶
func (s *SignEncrypter) EncryptedLen(size int) int
func (*SignEncrypter) SignKey ¶
func (s *SignEncrypter) SignKey() []byte
func (*SignEncrypter) VerifyKey ¶
func (s *SignEncrypter) VerifyKey() []byte
type StashKey ¶
type StashKey struct {
PlaintextHash []byte
ConversationID chat1.ConversationID
UserID keybase1.UID
}
func NewStashKey ¶
type Syncer ¶
type Syncer struct {
globals.Contextified
utils.DebugLabeler
sync.Mutex
// contains filtered or unexported fields
}
func (*Syncer) Connected ¶
func (s *Syncer) Connected(ctx context.Context, cli chat1.RemoteInterface, uid gregor1.UID, syncRes *chat1.SyncChatRes) (err error)
func (*Syncer) Disconnected ¶
func (*Syncer) RegisterOfflinable ¶
func (s *Syncer) RegisterOfflinable(offlinable types.Offlinable)
func (*Syncer) SendChatStaleNotifications ¶
type TeamsNameInfoSource ¶
type TeamsNameInfoSource struct {
globals.Contextified
utils.DebugLabeler
}
func NewTeamsNameInfoSource ¶
func NewTeamsNameInfoSource(g *globals.Context) *TeamsNameInfoSource
type TransientUnboxingError ¶
type TransientUnboxingError struct {
// contains filtered or unexported fields
}
func (TransientUnboxingError) Error ¶
func (e TransientUnboxingError) Error() string
func (TransientUnboxingError) ExportType ¶
func (e TransientUnboxingError) ExportType() chat1.MessageUnboxedErrorType
func (TransientUnboxingError) Inner ¶
func (e TransientUnboxingError) Inner() error
func (TransientUnboxingError) IsPermanent ¶
func (e TransientUnboxingError) IsPermanent() bool
type TypingMonitor ¶
type TypingMonitor struct {
globals.Contextified
sync.Mutex
utils.DebugLabeler
// contains filtered or unexported fields
}
func NewTypingMonitor ¶
func NewTypingMonitor(g *globals.Context) *TypingMonitor
func (*TypingMonitor) SetClock ¶
func (t *TypingMonitor) SetClock(clock clockwork.Clock)
func (*TypingMonitor) SetTimeout ¶
func (t *TypingMonitor) SetTimeout(timeout time.Duration)
func (*TypingMonitor) Update ¶
func (t *TypingMonitor) Update(ctx context.Context, typer chat1.TyperInfo, convID chat1.ConversationID, typing bool)
type UISource ¶
type UISource interface {
GetChatUI(sessionID int) libkb.ChatUI
GetStreamUICli() *keybase1.StreamUiClient
}
type UnboxingError ¶
type UnboxingError interface {
Error() string
Inner() error
IsPermanent() bool
ExportType() chat1.MessageUnboxedErrorType
}
func NewPermanentUnboxingError ¶
func NewPermanentUnboxingError(inner error) UnboxingError
func NewTransientUnboxingError ¶
func NewTransientUnboxingError(inner error) UnboxingError
type UploadTask ¶
type UploadTask struct {
S3Params chat1.S3Params
Filename string
FileSize int
Plaintext ReadResetter
S3Signer s3.Signer
ConversationID chat1.ConversationID
UserID keybase1.UID
Progress ProgressReporter
// contains filtered or unexported fields
}
func (*UploadTask) Nonce ¶
func (u *UploadTask) Nonce() signencrypt.Nonce
type VersionError ¶
func NewBodyVersionError ¶
func NewBodyVersionError(version chat1.BodyPlaintextVersion, defaultBody chat1.BodyPlaintextUnsupported) VersionError
func NewHeaderVersionError ¶
func NewHeaderVersionError(version chat1.HeaderPlaintextVersion, defaultHeader chat1.HeaderPlaintextUnsupported) VersionError
func NewMessageBoxedVersionError ¶
func NewMessageBoxedVersionError(version chat1.MessageBoxedVersion) VersionError
func (VersionError) Error ¶
func (e VersionError) Error() string
func (VersionError) ExportType ¶
func (e VersionError) ExportType() chat1.MessageUnboxedErrorType
Source Files
¶
- active.go
- attachment.go
- attachment_asset.go
- attachment_crypt.go
- attachment_preview.go
- attachment_progress.go
- attachment_s3.go
- attachment_stash.go
- boxer.go
- context.go
- convloader.go
- convsource.go
- errors.go
- helper.go
- identify.go
- identify_ui.go
- inboxsource.go
- keyfinder.go
- prev.go
- push.go
- remoteclient.go
- retry.go
- sender.go
- server.go
- sourceofflinable.go
- supersedes.go
- sync.go
- teamchannelsource.go
- teams.go
- tlf.go
- typingmonitor.go