types

package
v2.13.1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2019 License: BSD-3-Clause, BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ActionNewConversation            = "newConversation"
	ActionNewMessage                 = "newMessage"
	ActionReadMessage                = "readMessage"
	ActionSetStatus                  = "setStatus"
	ActionSetAppNotificationSettings = "setAppNotificationSettings"
	ActionTeamType                   = "teamType"
	ActionExpunge                    = "expunge"

	PushActivity         = "chat.activity"
	PushTyping           = "chat.typing"
	PushMembershipUpdate = "chat.membershipUpdate"
	PushTLFFinalize      = "chat.tlffinalize"
	PushTLFResolve       = "chat.tlfresolve"
	PushTeamChannels     = "chat.teamchannels"
	PushKBFSUpgrade      = "chat.kbfsupgrade"
	PushConvRetention    = "chat.convretention"
	PushTeamRetention    = "chat.teamretention"
	PushConvSettings     = "chat.convsettings"
	PushSubteamRename    = "chat.subteamrename"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivityNotifier

type ActivityNotifier interface {
	Activity(ctx context.Context, uid gregor1.UID, topicType chat1.TopicType, activity *chat1.ChatActivity,
		source chat1.ChatActivitySource)
	TypingUpdate(ctx context.Context, updates []chat1.ConvTypingUpdate)
	JoinedConversation(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
		topicType chat1.TopicType, conv *chat1.InboxUIItem)
	LeftConversation(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
		topicType chat1.TopicType)
	ResetConversation(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
		topicType chat1.TopicType)
	KBFSToImpteamUpgrade(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
		topicType chat1.TopicType)
	SetConvRetention(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
		topicType chat1.TopicType, conv *chat1.InboxUIItem)
	SetTeamRetention(ctx context.Context, uid gregor1.UID, teamID keybase1.TeamID,
		topicType chat1.TopicType, convs []chat1.InboxUIItem)
	SetConvSettings(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
		topicType chat1.TopicType, conv *chat1.InboxUIItem)
	SubteamRename(ctx context.Context, uid gregor1.UID, convIDs []chat1.ConversationID,
		topicType chat1.TopicType, convs []chat1.InboxUIItem)

	InboxSyncStarted(ctx context.Context, uid gregor1.UID)
	InboxSynced(ctx context.Context, uid gregor1.UID, topicType chat1.TopicType, syncRes chat1.ChatSyncResult)
	InboxStale(ctx context.Context, uid gregor1.UID)
	ThreadsStale(ctx context.Context, uid gregor1.UID, updates []chat1.ConversationStaleUpdate)

	TLFFinalize(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID, topicType chat1.TopicType,
		finalizeInfo chat1.ConversationFinalizeInfo, conv *chat1.InboxUIItem)
	TLFResolve(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID, topicType chat1.TopicType,
		resolveInfo chat1.ConversationResolveInfo)

	AttachmentUploadStart(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
		outboxID chat1.OutboxID)
	AttachmentUploadProgress(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
		outboxID chat1.OutboxID, bytesComplete, bytesTotal int64)

	PromptUnfurl(ctx context.Context, uid gregor1.UID,
		convID chat1.ConversationID, msgID chat1.MessageID, domain string)
}

type AllCryptKeys added in v1.0.42

type AllCryptKeys map[chat1.ConversationMembersType][]CryptKey

func NewAllCryptKeys added in v1.0.42

func NewAllCryptKeys() AllCryptKeys

type AppState added in v1.0.27

type AppState interface {
	State() keybase1.AppState
	NextUpdate() chan keybase1.AppState
}

type AsyncInboxResult

type AsyncInboxResult struct {
	Conv      chat1.Conversation
	ConvLocal chat1.ConversationLocal
	InboxRes  *Inbox // set if we are returning the whole inbox
}

type AttachmentFetcher added in v1.0.48

type AttachmentFetcher interface {
	DeleteAssets(ctx context.Context, convID chat1.ConversationID, assets []chat1.Asset,
		ri func() chat1.RemoteInterface, signer s3.Signer) error
	FetchAttachment(ctx context.Context, w io.Writer, convID chat1.ConversationID, asset chat1.Asset,
		ri func() chat1.RemoteInterface, signer s3.Signer, progress ProgressReporter) error
	StreamAttachment(ctx context.Context, convID chat1.ConversationID, asset chat1.Asset,
		ri func() chat1.RemoteInterface, signer s3.Signer) (io.ReadSeeker, error)
	PutUploadedAsset(ctx context.Context, filename string, asset chat1.Asset) error
	IsAssetLocal(ctx context.Context, asset chat1.Asset) (bool, error)
}

type AttachmentURLSrv added in v1.0.48

type AttachmentURLSrv interface {
	GetURL(ctx context.Context, convID chat1.ConversationID, msgID chat1.MessageID,
		preview bool) string
	GetPendingPreviewURL(ctx context.Context, outboxID chat1.OutboxID) string
	GetUnfurlAssetURL(ctx context.Context, convID chat1.ConversationID, asset chat1.Asset) string
	GetAttachmentFetcher() AttachmentFetcher
}

type AttachmentUploadResult

type AttachmentUploadResult struct {
	Error    *string
	Object   chat1.Asset
	Preview  *chat1.Asset
	Metadata []byte
}

type AttachmentUploader

type AttachmentUploader interface {
	Register(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
		outboxID chat1.OutboxID, title, filename string, metadata []byte,
		callerPreview *chat1.MakePreviewRes) (AttachmentUploaderResultCb, error)
	Status(ctx context.Context, outboxID chat1.OutboxID) (AttachmentUploaderTaskStatus, AttachmentUploadResult, error)
	Retry(ctx context.Context, outboxID chat1.OutboxID) (AttachmentUploaderResultCb, error)
	Cancel(ctx context.Context, outboxID chat1.OutboxID) error
	Complete(ctx context.Context, outboxID chat1.OutboxID)
	GetUploadTempFile(ctx context.Context, outboxID chat1.OutboxID, filename string) (string, error)
}

type AttachmentUploaderResultCb

type AttachmentUploaderResultCb interface {
	Wait() chan AttachmentUploadResult
}

type AttachmentUploaderTaskStatus

type AttachmentUploaderTaskStatus int
const (
	AttachmentUploaderTaskStatusUploading AttachmentUploaderTaskStatus = iota
	AttachmentUploaderTaskStatusSuccess
	AttachmentUploaderTaskStatusFailed
)

type BoxerEncryptionInfo

type BoxerEncryptionInfo struct {
	Key                   CryptKey
	SigningKeyPair        libkb.NaclSigningKeyPair
	EphemeralSeed         *keybase1.TeamEk
	PairwiseMACRecipients []keybase1.KID
	Version               chat1.MessageBoxedVersion
}

type ConvLoader added in v1.0.27

type ConvLoader interface {
	Resumable
	Suspendable

	Queue(ctx context.Context, job ConvLoaderJob) error
}

type ConvLoaderJob added in v1.0.48

type ConvLoaderJob struct {
	ConvID       chat1.ConversationID
	Query        *chat1.GetThreadQuery
	Pagination   *chat1.Pagination
	Priority     ConvLoaderPriority
	PostLoadHook func(context.Context, chat1.ThreadView, ConvLoaderJob)
}

func NewConvLoaderJob added in v1.0.48

func NewConvLoaderJob(convID chat1.ConversationID, query *chat1.GetThreadQuery,
	pagination *chat1.Pagination, priority ConvLoaderPriority,
	postLoadHook func(context.Context, chat1.ThreadView, ConvLoaderJob)) ConvLoaderJob

func (ConvLoaderJob) HigherPriorityThan added in v1.0.48

func (j ConvLoaderJob) HigherPriorityThan(j2 ConvLoaderJob) bool

func (ConvLoaderJob) String added in v1.0.48

func (j ConvLoaderJob) String() string

type ConvLoaderPriority added in v1.0.48

type ConvLoaderPriority int
var (
	ConvLoaderPriorityHighest ConvLoaderPriority = 10
	ConvLoaderPriorityHigh    ConvLoaderPriority = 7
	ConvLoaderPriorityMedium  ConvLoaderPriority = 5
	ConvLoaderPriorityLow     ConvLoaderPriority = 3
	ConvLoaderPriorityLowest  ConvLoaderPriority
)

func (ConvLoaderPriority) HigherThan added in v1.0.48

func (c ConvLoaderPriority) HigherThan(c2 ConvLoaderPriority) bool

type ConversationBackedStorage

type ConversationBackedStorage interface {
	Put(ctx context.Context, uid gregor1.UID, name string, data interface{}) error
	Get(ctx context.Context, uid gregor1.UID, name string, res interface{}) (bool, error)
}

type ConversationLocalizerTyp

type ConversationLocalizerTyp int
const (
	ConversationLocalizerBlocking ConversationLocalizerTyp = iota
	ConversationLocalizerNonblocking
)

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, reason chat1.GetThreadReason,
		query *chat1.GetThreadQuery, pagination *chat1.Pagination) (chat1.ThreadView, 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,
		reason *chat1.GetThreadReason) ([]chat1.MessageUnboxed, error)
	GetMessagesWithRemotes(ctx context.Context, conv chat1.Conversation, uid gregor1.UID,
		msgs []chat1.MessageBoxed) ([]chat1.MessageUnboxed, error)
	MarkAsRead(ctx context.Context, convID chat1.ConversationID, uid gregor1.UID, msgID chat1.MessageID) 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) bool
	EphemeralPurge(ctx context.Context, convID chat1.ConversationID, uid gregor1.UID,
		purgeInfo *chat1.EphemeralPurgeInfo) (*chat1.EphemeralPurgeInfo, []chat1.MessageUnboxed, error)

	SetRemoteInterface(func() chat1.RemoteInterface)
	DeleteAssets(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID, assets []chat1.Asset)
}

type CryptKey added in v1.0.27

type CryptKey interface {
	Material() keybase1.Bytes32
	Generation() int
}

type DummyAttachmentFetcher

type DummyAttachmentFetcher struct{}

func (DummyAttachmentFetcher) DeleteAssets

func (d DummyAttachmentFetcher) DeleteAssets(ctx context.Context,
	convID chat1.ConversationID, assets []chat1.Asset, ri func() chat1.RemoteInterface, signer s3.Signer) (err error)

func (DummyAttachmentFetcher) FetchAttachment

func (d DummyAttachmentFetcher) FetchAttachment(ctx context.Context, w io.Writer,
	convID chat1.ConversationID, asset chat1.Asset, r func() chat1.RemoteInterface, signer s3.Signer,
	progress ProgressReporter) error

func (DummyAttachmentFetcher) IsAssetLocal

func (d DummyAttachmentFetcher) IsAssetLocal(ctx context.Context, asset chat1.Asset) (bool, error)

func (DummyAttachmentFetcher) PutUploadedAsset

func (d DummyAttachmentFetcher) PutUploadedAsset(ctx context.Context, filename string, asset chat1.Asset) error

func (DummyAttachmentFetcher) StreamAttachment

func (d DummyAttachmentFetcher) StreamAttachment(ctx context.Context, convID chat1.ConversationID,
	asset chat1.Asset, ri func() chat1.RemoteInterface, signer s3.Signer) (io.ReadSeeker, error)

type DummyAttachmentHTTPSrv

type DummyAttachmentHTTPSrv struct{}

func (DummyAttachmentHTTPSrv) GetAttachmentFetcher

func (d DummyAttachmentHTTPSrv) GetAttachmentFetcher() AttachmentFetcher

func (DummyAttachmentHTTPSrv) GetPendingPreviewURL

func (d DummyAttachmentHTTPSrv) GetPendingPreviewURL(ctx context.Context, outboxID chat1.OutboxID) string

func (DummyAttachmentHTTPSrv) GetURL

func (d DummyAttachmentHTTPSrv) GetURL(ctx context.Context, convID chat1.ConversationID, msgID chat1.MessageID,
	preview bool) string

func (DummyAttachmentHTTPSrv) GetUnfurlAssetURL

func (d DummyAttachmentHTTPSrv) GetUnfurlAssetURL(ctx context.Context, convID chat1.ConversationID,
	asset chat1.Asset) string

type DummyEphemeralPurger

type DummyEphemeralPurger struct{}

func (DummyEphemeralPurger) Queue

func (DummyEphemeralPurger) Start

func (d DummyEphemeralPurger) Start(ctx context.Context, uid gregor1.UID)

func (DummyEphemeralPurger) Stop

func (d DummyEphemeralPurger) Stop(ctx context.Context) chan struct{}

type DummyIndexer

type DummyIndexer struct{}

func (DummyIndexer) Add

func (DummyIndexer) IndexInbox

func (DummyIndexer) Remove

func (DummyIndexer) Search

func (DummyIndexer) Start

func (d DummyIndexer) Start(ctx context.Context, uid gregor1.UID)

func (DummyIndexer) Stop

func (d DummyIndexer) Stop(ctx context.Context) chan struct{}

type DummyNativeVideoHelper

type DummyNativeVideoHelper struct{}

func (DummyNativeVideoHelper) ThumbnailAndDuration

func (d DummyNativeVideoHelper) ThumbnailAndDuration(ctx context.Context, filename string) ([]byte, int, error)

type DummyStellarLoader

type DummyStellarLoader struct{}

func (DummyStellarLoader) LoadPayment

func (d DummyStellarLoader) LoadPayment(ctx context.Context, convID chat1.ConversationID, msgID chat1.MessageID, senderUsername string, paymentID stellar1.PaymentID) *chat1.UIPaymentInfo

func (DummyStellarLoader) LoadRequest

func (d DummyStellarLoader) LoadRequest(ctx context.Context, convID chat1.ConversationID, msgID chat1.MessageID, senderUsername string, requestID stellar1.KeybaseRequestID) *chat1.UIRequestInfo

type DummyStellarSender

type DummyStellarSender struct{}

func (DummyStellarSender) DecorateWithPayments

func (d DummyStellarSender) DecorateWithPayments(ctx context.Context, body string,
	payments []chat1.TextPayment) string

func (DummyStellarSender) DescribePayments

func (d DummyStellarSender) DescribePayments(ctx context.Context, uid gregor1.UID,
	convID chat1.ConversationID, payments []ParsedStellarPayment) (res chat1.UIChatPaymentSummary, toSend []ParsedStellarPayment, err error)

func (DummyStellarSender) ParsePayments

func (d DummyStellarSender) ParsePayments(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
	body string) []ParsedStellarPayment

func (DummyStellarSender) SendPayments

func (d DummyStellarSender) SendPayments(ctx context.Context, convID chat1.ConversationID, payments []ParsedStellarPayment) ([]chat1.TextPayment, error)

type DummyUnfurler

type DummyUnfurler struct{}

func (DummyUnfurler) Complete

func (d DummyUnfurler) Complete(ctx context.Context, outboxID chat1.OutboxID)

func (DummyUnfurler) GetSettings

func (d DummyUnfurler) GetSettings(ctx context.Context, uid gregor1.UID) (res chat1.UnfurlSettings, err error)

func (DummyUnfurler) Prefetch

func (d DummyUnfurler) Prefetch(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID, msgText string) int

func (DummyUnfurler) Retry

func (d DummyUnfurler) Retry(ctx context.Context, outboxID chat1.OutboxID)

func (DummyUnfurler) SetMode

func (d DummyUnfurler) SetMode(ctx context.Context, uid gregor1.UID, mode chat1.UnfurlMode) error

func (DummyUnfurler) SetSettings

func (d DummyUnfurler) SetSettings(ctx context.Context, uid gregor1.UID, settings chat1.UnfurlSettings) error

func (DummyUnfurler) Status

func (DummyUnfurler) UnfurlAndSend

func (d DummyUnfurler) UnfurlAndSend(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
	msg chat1.MessageUnboxed)

func (DummyUnfurler) WhitelistAdd

func (d DummyUnfurler) WhitelistAdd(ctx context.Context, uid gregor1.UID, domain string) error

func (DummyUnfurler) WhitelistAddExemption

func (d DummyUnfurler) WhitelistAddExemption(ctx context.Context, uid gregor1.UID,
	exemption WhitelistExemption)

func (DummyUnfurler) WhitelistRemove

func (d DummyUnfurler) WhitelistRemove(ctx context.Context, uid gregor1.UID, domain string) error

type EphemeralPurger

type EphemeralPurger interface {
	Resumable

	Queue(ctx context.Context, purgeInfo chat1.EphemeralPurgeInfo) error
}

type FetchRetrier added in v1.0.22

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 added in v1.0.42

type IdentifyNotifier interface {
	Reset()
	ResetOnGUIConnect()
	Send(ctx context.Context, update keybase1.CanonicalTLFNameAndIDWithBreaks)
}

type Inbox added in v1.0.33

type Inbox struct {
	Version         chat1.InboxVers
	ConvsUnverified []RemoteConversation
	Convs           []chat1.ConversationLocal
	Pagination      *chat1.Pagination
}

type InboxSource

type InboxSource interface {
	Offlinable
	Resumable
	Suspendable

	Clear(ctx context.Context, uid gregor1.UID) error
	Read(ctx context.Context, uid gregor1.UID, localizeTyp ConversationLocalizerTyp, useLocalData bool,
		maxLocalize *int, query *chat1.GetInboxLocalQuery, p *chat1.Pagination) (Inbox, chan AsyncInboxResult, error)
	ReadUnverified(ctx context.Context, uid gregor1.UID, useLocalData bool,
		query *chat1.GetInboxQuery, p *chat1.Pagination) (Inbox, error)
	Localize(ctx context.Context, uid gregor1.UID, convs []RemoteConversation,
		localizeTyp ConversationLocalizerTyp) ([]chat1.ConversationLocal, chan AsyncInboxResult, error)

	NewConversation(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers,
		conv chat1.Conversation) error
	IsMember(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID) (bool, 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)
	SetConvSettings(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, convID chat1.ConversationID,
		convSettings *chat1.ConversationSettings) (*chat1.ConversationLocal, error)
	SubteamRename(ctx context.Context, uid gregor1.UID, vers chat1.InboxVers, convIDs []chat1.ConversationID) ([]chat1.ConversationLocal, error)

	GetInboxQueryLocalToRemote(ctx context.Context,
		lquery *chat1.GetInboxLocalQuery) (*chat1.GetInboxQuery, NameInfo, error)

	SetRemoteInterface(func() chat1.RemoteInterface)
}

type Indexer

type Indexer interface {
	Resumable

	Search(ctx context.Context, uid gregor1.UID, query string, opts chat1.SearchOpts,
		hitUICh chan chat1.ChatSearchInboxHit, indexUICh chan chat1.ChatSearchIndexStatus) (*chat1.ChatSearchInboxResults, error)
	// Add/update the index with the given messages
	Add(ctx context.Context, convID chat1.ConversationID, uid gregor1.UID, msg []chat1.MessageUnboxed) error
	// Remove the given messages from the index
	Remove(ctx context.Context, convID chat1.ConversationID, uid gregor1.UID, msg []chat1.MessageUnboxed) error
	// For devel/testing
	IndexInbox(ctx context.Context, uid gregor1.UID) (map[string]chat1.ProfileSearchConvStats, error)
}

type InternalError

type InternalError interface {
	// verbose error info for debugging but not user display
	InternalError() string
}

type MembershipUpdateRes added in v1.0.27

type MembershipUpdateRes struct {
	UserJoinedConvs    []chat1.ConversationLocal
	UserRemovedConvs   []chat1.ConversationMember
	UserResetConvs     []chat1.ConversationMember
	OthersJoinedConvs  []chat1.ConversationMember
	OthersRemovedConvs []chat1.ConversationMember
	OthersResetConvs   []chat1.ConversationMember
}

func (MembershipUpdateRes) AllOtherUsers

func (m MembershipUpdateRes) AllOtherUsers() (res []gregor1.UID)

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)
	ActiveDeliveries(ctx context.Context) ([]chat1.ConversationID, error)
	NextFailure() (chan []chat1.OutboxRecord, func())
}

type NameInfo added in v1.0.27

type NameInfo struct {
	ID               chat1.TLFID
	CanonicalName    string
	IdentifyFailures []keybase1.TLFIdentifyFailure
}

func NewNameInfo added in v1.0.41

func NewNameInfo() *NameInfo

type NameInfoSource added in v1.0.27

type NameInfoSource interface {
	LookupID(ctx context.Context, name string, public bool) (NameInfo, error)
	LookupName(ctx context.Context, tlfID chat1.TLFID, public bool) (NameInfo, error)
	AllCryptKeys(ctx context.Context, name string, public bool) (AllCryptKeys, error)
	EncryptionKey(ctx context.Context, tlfName string, tlfID chat1.TLFID,
		membersType chat1.ConversationMembersType, public bool) (CryptKey, NameInfo, error)
	DecryptionKey(ctx context.Context, tlfName string, tlfID chat1.TLFID,
		membersType chat1.ConversationMembersType, public bool,
		keyGeneration int, kbfsEncrypted bool) (CryptKey, 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, contentCtime *gregor1.Time) (keybase1.TeamEk, error)
	ShouldPairwiseMAC(ctx context.Context, tlfName string, tlfID chat1.TLFID,
		membersType chat1.ConversationMembersType, public bool) (bool, []keybase1.KID, error)
}

type NativeVideoHelper

type NativeVideoHelper interface {
	ThumbnailAndDuration(ctx context.Context, filename string) ([]byte, int, error)
}

type Offlinable

type Offlinable interface {
	IsOffline(ctx context.Context) bool
	Connected(ctx context.Context)
	Disconnected(ctx context.Context)
}

type OobmHandler

type OobmHandler interface {
	HandleOobm(context.Context, gregor.OutOfBandMessage) (bool, error)
}

type ParsedStellarPayment

type ParsedStellarPayment struct {
	Username libkb.NormalizedUsername
	Full     string
	Amount   string
	Currency string
}

func (ParsedStellarPayment) ToMini

type ProgressReporter added in v1.0.48

type ProgressReporter func(bytesCompleted, bytesTotal int64)

type PushHandler added in v1.0.27

type RateLimitedResult

type RateLimitedResult interface {
	GetRateLimit() []chat1.RateLimit
	SetRateLimits(rl []chat1.RateLimit)
}

type RegexpSearcher

type RegexpSearcher interface {
	Search(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
		re *regexp.Regexp, uiCh chan chat1.ChatSearchHit, opts chat1.SearchOpts) ([]chat1.ChatSearchHit, error)
}

type RemoteConversation added in v1.0.33

type RemoteConversation struct {
	Conv          chat1.Conversation          `codec:"c"`
	LocalMetadata *RemoteConversationMetadata `codec:"l"`
}

func (RemoteConversation) GetConvID added in v1.0.33

func (rc RemoteConversation) GetConvID() chat1.ConversationID

func (RemoteConversation) GetMtime added in v1.0.33

func (rc RemoteConversation) GetMtime() gregor1.Time

func (RemoteConversation) GetName

func (rc RemoteConversation) GetName() string

func (RemoteConversation) GetVersion

func (rc RemoteConversation) GetVersion() chat1.ConversationVers

type RemoteConversationMetadata added in v1.0.33

type RemoteConversationMetadata struct {
	Name              string   `codec:"n"`
	TopicName         string   `codec:"t"`
	Snippet           string   `codec:"s"`
	SnippetDecoration string   `codec:"d"`
	Headline          string   `codec:"h"`
	WriterNames       []string `codec:"w"`
	ResetParticipants []string `codec:"r"`
}

type Resumable added in v1.0.22

type Resumable interface {
	Start(ctx context.Context, uid gregor1.UID)
	Stop(ctx context.Context) chan struct{}
}

type RetryDescription added in v1.0.27

type RetryDescription interface {
	Fix(ctx context.Context, uid gregor1.UID) error
	SendStale(ctx context.Context, uid gregor1.UID)
	String() string
	RekeyFixable(ctx context.Context, tlfID chat1.TLFID) bool
}

type Sender added in v1.0.27

type SenderPrepareResult

type SenderPrepareResult struct {
	Boxed               chat1.MessageBoxed
	EncryptionInfo      BoxerEncryptionInfo
	PendingAssetDeletes []chat1.Asset
	AtMentions          []gregor1.UID
	ChannelMention      chat1.ChannelMention
	TopicNameState      *chat1.TopicNameState
}

type ServerCacheVersions

type ServerCacheVersions interface {
	Set(ctx context.Context, vers chat1.ServerCacheVers) error
	MatchBodies(ctx context.Context, vers int) (int, error)
	MatchInbox(ctx context.Context, vers int) (int, error)
	Fetch(ctx context.Context) (chat1.ServerCacheVers, error)
}

type StellarLoader

type StellarLoader interface {
	LoadPayment(ctx context.Context, convID chat1.ConversationID, msgID chat1.MessageID, senderUsername string, paymentID stellar1.PaymentID) *chat1.UIPaymentInfo
	LoadRequest(ctx context.Context, convID chat1.ConversationID, msgID chat1.MessageID, senderUsername string, requestID stellar1.KeybaseRequestID) *chat1.UIRequestInfo
}

type StellarSender

type StellarSender interface {
	ParsePayments(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
		body string) []ParsedStellarPayment
	DescribePayments(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
		payments []ParsedStellarPayment) (chat1.UIChatPaymentSummary, []ParsedStellarPayment, error)
	DecorateWithPayments(ctx context.Context, body string, payments []chat1.TextPayment) string
	SendPayments(ctx context.Context, convID chat1.ConversationID, payments []ParsedStellarPayment) ([]chat1.TextPayment, error)
}

type Suspendable

type Suspendable interface {
	Suspend(ctx context.Context) bool
	Resume(ctx context.Context) bool
}

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 added in v1.0.34

type TeamChannelSource interface {
	GetChannelsFull(context.Context, gregor1.UID, chat1.TLFID, chat1.TopicType) ([]chat1.ConversationLocal, error)
	GetChannelsTopicName(context.Context, gregor1.UID, chat1.TLFID, chat1.TopicType) ([]chat1.ChannelNameMention, error)
	GetChannelTopicName(context.Context, gregor1.UID, chat1.TLFID, chat1.TopicType, chat1.ConversationID) (string, error)
}

type UPAKFinder added in v1.0.42

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 added in v1.0.34

type UnboxConversationInfo interface {
	GetConvID() chat1.ConversationID
	GetMembersType() chat1.ConversationMembersType
	GetFinalizeInfo() *chat1.ConversationFinalizeInfo
	GetExpunge() *chat1.Expunge
	GetMaxDeletedUpTo() chat1.MessageID
	IsPublic() bool
}

type UnboxingError

type UnboxingError interface {
	InternalError
	Error() string
	Inner() error
	IsPermanent() bool
	ExportType() chat1.MessageUnboxedErrorType
	VersionKind() chat1.VersionKind
	VersionNumber() int
	IsCritical() bool
}

type Unfurler

type Unfurler interface {
	UnfurlAndSend(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
		msg chat1.MessageUnboxed)
	Prefetch(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID, msgText string) int
	Status(ctx context.Context, outboxID chat1.OutboxID) (UnfurlerTaskStatus, *chat1.UnfurlResult, error)
	Retry(ctx context.Context, outboxID chat1.OutboxID)
	Complete(ctx context.Context, outboxID chat1.OutboxID)

	GetSettings(ctx context.Context, uid gregor1.UID) (chat1.UnfurlSettings, error)
	SetSettings(ctx context.Context, uid gregor1.UID, settings chat1.UnfurlSettings) error
	WhitelistAdd(ctx context.Context, uid gregor1.UID, domain string) error
	WhitelistRemove(ctx context.Context, uid gregor1.UID, domain string) error
	WhitelistAddExemption(ctx context.Context, uid gregor1.UID, exemption WhitelistExemption)
	SetMode(ctx context.Context, uid gregor1.UID, mode chat1.UnfurlMode) error
}

type UnfurlerTaskStatus

type UnfurlerTaskStatus int
const (
	UnfurlerTaskStatusUnfurling UnfurlerTaskStatus = iota
	UnfurlerTaskStatusSuccess
	UnfurlerTaskStatusFailed
	UnfurlerTaskStatusPermFailed
)

type WhitelistExemption

type WhitelistExemption interface {
	Use() bool
	Matches(convID chat1.ConversationID, msgID chat1.MessageID, domain string) bool
	Domain() string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL