utils

package
v4.5.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2019 License: BSD-3-Clause, BSD-3-Clause Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ReaderSep is the string that separates readers from writers in a
	// TLF name.
	ReaderSep = "#"

	// TlfHandleExtensionSep is the string that separates the folder
	// participants from an extension suffix in the TLF name.
	TlfHandleExtensionSep = " "

	// PublicUIDName is the name given to keybase1.PublicUID.  This string
	// should correspond to an illegal or reserved Keybase user name.
	PublicUIDName = "_public"
)
View Source
const (
	ChatTopicIDLen    = 16
	ChatTopicIDSuffix = 0x20
)
View Source
const ServiceDecorationPrefix = `(?:^|[\s([/{:;.,!?"'])`

Start at the beginng of the line, space, or some hand picked artisanal characters

Variables

View Source
var ErrConvLockTabDeadlock = errors.New("timeout reading thread")
View Source
var ErrGetUnverifiedConvNotFound = errors.New("GetUnverifiedConv: conversation not found")
View Source
var ErrGetVerifiedConvNotFound = errors.New("GetVerifiedConv: conversation not found")

Functions

func AddUserToTLFName

func AddUserToTLFName(g *globals.Context, tlfName string, vis keybase1.TLFVisibility,
	membersType chat1.ConversationMembersType) string

func AggRateLimits

func AggRateLimits(rlimits []chat1.RateLimit) (res []chat1.RateLimit)

func AggRateLimitsP

func AggRateLimitsP(rlimits []*chat1.RateLimit) (res []chat1.RateLimit)

AggRateLimitsP takes a list of rate limit responses and dedups them to the last one received of each category

func AllChatConversationStatuses added in v1.0.19

func AllChatConversationStatuses() (res []chat1.ConversationStatus)

func AssertLoggedInUID

func AssertLoggedInUID(ctx context.Context, g *globals.Context) (uid gregor1.UID, err error)

func AssetsForMessage

func AssetsForMessage(g *globals.Context, msgBody chat1.MessageBody) (assets []chat1.Asset)

AssetsForMessage gathers all assets on a message

func AttachContactNames

func AttachContactNames(mctx libkb.MetaContext, participants []chat1.ConversationLocalParticipant)

AttachContactNames retrieves display names for SBS phones/emails that are in the phonebook. ConversationLocalParticipant structures are modified in place in `participants` passed in argument.

func Collar

func Collar(lower int, ideal int, upper int) int

upper bounds takes higher priority

func CreateHiddenPlaceholder

func CreateHiddenPlaceholder(msgID chat1.MessageID) chat1.MessageUnboxed

func CreateTopicNameState added in v1.0.27

func CreateTopicNameState(cmp chat1.ConversationIDMessageIDPairs) (chat1.TopicNameState, error)

func DecodeBase64 added in v1.0.29

func DecodeBase64(enc []byte) ([]byte, error)

func DecodePagination added in v1.0.29

func DecodePagination(p *chat1.UIPagination) (res *chat1.Pagination, err error)

func DecorateBody

func DecorateBody(ctx context.Context, body string, offset, length int, decoration interface{}) (res string, added int)

func DecorateWithKBFSPath

func DecorateWithKBFSPath(
	ctx context.Context, body string, paths []chat1.KBFSPath) (
	res string)
func DecorateWithLinks(ctx context.Context, body string) string

func DecorateWithMentions

func DecorateWithMentions(ctx context.Context, body string, atMentions []string,
	maybeMentions []chat1.MaybeMention, chanMention chat1.ChannelMention,
	channelNameMentions []chat1.ChannelNameMention) string

func DedupStringLists

func DedupStringLists(lists ...[]string) (res []string)

func EphemeralLifetimeFromConv

func EphemeralLifetimeFromConv(ctx context.Context, g *globals.Context, conv chat1.ConversationLocal) (res *gregor1.DurationSec, err error)

func EscapeForDecorate

func EscapeForDecorate(ctx context.Context, body string) string

func EscapeShrugs

func EscapeShrugs(ctx context.Context, body string) string

func FilterByType

func FilterByType(msgs []chat1.MessageUnboxed, query *chat1.GetThreadQuery, includeAllErrors bool) (res []chat1.MessageUnboxed)

FilterByType filters messages based on a query. If includeAllErrors then MessageUnboxedError are all returned. Otherwise, they are filtered based on type. Messages whose type cannot be determined are considered errors.

func FilterExploded added in v1.0.48

func FilterExploded(conv types.UnboxConversationInfo, msgs []chat1.MessageUnboxed, now time.Time) (res []chat1.MessageUnboxed)

Filter messages that are both exploded that are no longer shown in the GUI (as ash lines)

func ForceReloadUPAKsForUIDs

func ForceReloadUPAKsForUIDs(ctx context.Context, g *globals.Context, uids []keybase1.UID) error

func FormatConversationName

func FormatConversationName(info chat1.ConversationInfoLocal, myUsername string) string

func GetConvMtime added in v1.0.28

func GetConvMtime(conv chat1.Conversation) gregor1.Time

func GetConvMtimeLocal added in v1.0.28

func GetConvMtimeLocal(conv chat1.ConversationLocal) gregor1.Time

func GetConvSnippet added in v1.0.28

func GetConvSnippet(conv chat1.ConversationLocal, currentUsername string) (snippet, decoration string)

func GetDesktopNotificationSnippet

func GetDesktopNotificationSnippet(conv *chat1.ConversationLocal, currentUsername string,
	fromMsg *chat1.MessageUnboxed, plaintextDesktopDisabled bool) string

We don't want to display the contents of an exploding message in notifications

func GetGregorConn

func GetGregorConn(ctx context.Context, g *globals.Context, log DebugLabeler,
	handler func(nist *libkb.NIST) rpc.ConnectionHandler) (conn *rpc.Connection, token gregor1.SessionToken, err error)

func GetMsgSnippet added in v1.0.33

func GetMsgSnippet(msg chat1.MessageUnboxed, conv chat1.ConversationLocal, currentUsername string) (snippet, decoration string)

func GetMsgSnippetBody

func GetMsgSnippetBody(msg chat1.MessageUnboxed) (snippet string)

func GetMsgSummaryByType added in v1.0.40

func GetMsgSummaryByType(msgs []chat1.MessageSummary, typ chat1.MessageType) (chat1.MessageSummary, error)

func GetPaymentAtMentions

func GetPaymentAtMentions(ctx context.Context, upak libkb.UPAKLoader, payments []chat1.TextPayment,
	l *DebugLabeler) (atMentions []chat1.KnownUserMention)

func GetQueryRe

func GetQueryRe(query string) (*regexp.Regexp, error)

GetQueryRe returns a regex to match the query string on message text. This is used for result highlighting.

func GetReaction

func GetReaction(msg chat1.MessageUnboxed) (string, error)

func GetSupersedes added in v1.0.19

func GetSupersedes(msg chat1.MessageUnboxed) ([]chat1.MessageID, error)

GetSupersedes must be called with a valid msg

func GetTextAtMentionedItems

func GetTextAtMentionedItems(ctx context.Context, g *globals.Context, uid gregor1.UID,
	convID chat1.ConversationID, msg chat1.MessageText,
	getConvMembs func() ([]chat1.ConversationLocalParticipant, error),
	debug *DebugLabeler) (atRes []chat1.KnownUserMention, maybeRes []chat1.MaybeMention, chanRes chat1.ChannelMention)

func GetUnverifiedConv added in v1.0.19

func GetUnverifiedConv(ctx context.Context, g *globals.Context, uid gregor1.UID,
	convID chat1.ConversationID, dataSource types.InboxSourceDataSourceTyp) (res types.RemoteConversation, err error)

func GetVerifiedConv

func GetVerifiedConv(ctx context.Context, g *globals.Context, uid gregor1.UID,
	convID chat1.ConversationID, dataSource types.InboxSourceDataSourceTyp) (res chat1.ConversationLocal, err error)

func IsCollapsibleMessageType

func IsCollapsibleMessageType(messageType chat1.MessageType) bool

func IsConvEmpty added in v1.0.21

func IsConvEmpty(conv chat1.Conversation) bool

func IsDeleteableByDeleteMessageType

func IsDeleteableByDeleteMessageType(messageType chat1.MessageType) bool

func IsEditableByEditMessageType

func IsEditableByEditMessageType(messageType chat1.MessageType) bool

func IsMapUnfurl

func IsMapUnfurl(msg chat1.MessageUnboxed) bool

func IsNotifiableChatMessageType added in v1.0.34

func IsNotifiableChatMessageType(messageType chat1.MessageType, atMentions []gregor1.UID,
	chanMention chat1.ChannelMention) bool

func IsPermanentErr

func IsPermanentErr(err error) bool

func IsVisibleChatMessageType added in v1.0.19

func IsVisibleChatMessageType(messageType chat1.MessageType) bool

func MessageIDControlToPagination

func MessageIDControlToPagination(ctx context.Context, logger DebugLabeler, control *chat1.MessageIDControl,
	conv *types.RemoteConversation) (res *chat1.Pagination)

func NewChatTopicID added in v1.0.19

func NewChatTopicID() (id []byte, err error)

func NormalizeAssertionOrName

func NormalizeAssertionOrName(mctx libkb.MetaContext, s string) (string, error)

TODO: this function can likely be replaced with a call to AssertionParseAndOnly when CORE-2967 and CORE-2968 are fixed.

func NormalizeNamesInTLF

func NormalizeNamesInTLF(mctx libkb.MetaContext, writerNames, readerNames []string,
	extensionSuffix string) (string, error)

normalizeNamesInTLF takes a split TLF name and, without doing any resolutions or identify calls, normalizes all elements of the name. It then returns the normalized name.

func NotificationInfoSet added in v1.0.27

func NotificationInfoSet(settings *chat1.ConversationNotificationInfo,
	apptype keybase1.DeviceType,
	kind chat1.NotificationKind, enabled bool)

func ParseAtMentionedItems

func ParseAtMentionedItems(ctx context.Context, g *globals.Context, body string,
	knownMentions []chat1.KnownUserMention, getConvMembs func() ([]chat1.ConversationLocalParticipant, error)) (atRes []chat1.KnownUserMention, maybeRes []chat1.MaybeMention, chanRes chat1.ChannelMention)

func ParseAtMentionsNames added in v1.0.27

func ParseAtMentionsNames(ctx context.Context, body string) (res []string)

func ParseChannelNameMentions added in v1.0.34

func ParseChannelNameMentions(ctx context.Context, body string, uid gregor1.UID, teamID chat1.TLFID,
	ts types.TeamChannelSource) (res []chat1.ChannelNameMention)

func ParseDurationExtended

func ParseDurationExtended(s string) (d time.Duration, err error)

parseDurationExtended is like time.ParseDuration, but adds "d" unit. "1d" is one day, defined as 24*time.Hour. Only whole days are supported for "d" unit, but it can be followed by smaller units, e.g., "1d1h".

func ParseKBFSPaths

func ParseKBFSPaths(ctx context.Context, body string) (paths []chat1.KBFSPath)

func ParseTimeFromRFC3339OrDurationFromPast

func ParseTimeFromRFC3339OrDurationFromPast(g *globals.Context, s string) (t time.Time, err error)

func PickLatestMessageSummary

func PickLatestMessageSummary(conv MessageSummaryContainer, typs []chat1.MessageType) (res chat1.MessageSummary, err error)

func PluckConvIDs added in v1.0.27

func PluckConvIDs(convs []chat1.Conversation) (res []chat1.ConversationID)

func PluckConvIDsLocal added in v1.0.27

func PluckConvIDsLocal(convs []chat1.ConversationLocal) (res []chat1.ConversationID)

func PluckConvIDsRC

func PluckConvIDsRC(convs []types.RemoteConversation) (res []chat1.ConversationID)

func PluckConvs added in v1.0.33

func PluckConvs(rcs []types.RemoteConversation) (res []chat1.Conversation)

func PluckMUMessageIDs

func PluckMUMessageIDs(msgs []chat1.MessageUnboxed) (res []chat1.MessageID)

func PluckMessageIDs added in v1.0.21

func PluckMessageIDs(msgs []chat1.MessageSummary) []chat1.MessageID

func PluckUIMessageIDs added in v1.0.48

func PluckUIMessageIDs(msgs []chat1.UIMessage) (res []chat1.MessageID)

func PresentBytes

func PresentBytes(bytes int64) string

func PresentChannelNameMentions

func PresentChannelNameMentions(ctx context.Context, crs []chat1.ChannelNameMention) (res []chat1.UIChannelNameMention)

func PresentConversationErrorLocal added in v1.0.46

func PresentConversationErrorLocal(ctx context.Context, g *globals.Context, rawConv chat1.ConversationErrorLocal) (res chat1.InboxUIItemError)

func PresentConversationLocal added in v1.0.28

func PresentConversationLocal(ctx context.Context, g *globals.Context, uid gregor1.UID,
	rawConv chat1.ConversationLocal) (res chat1.InboxUIItem)

func PresentConversationLocals added in v1.0.29

func PresentConversationLocals(ctx context.Context, g *globals.Context, uid gregor1.UID,
	convs []chat1.ConversationLocal) (res []chat1.InboxUIItem)

func PresentDecoratedTextBody

func PresentDecoratedTextBody(ctx context.Context, g *globals.Context, msg chat1.MessageUnboxedValid) *string

func PresentMessageUnboxed added in v1.0.29

func PresentMessageUnboxed(ctx context.Context, g *globals.Context, rawMsg chat1.MessageUnboxed,
	uid gregor1.UID, convID chat1.ConversationID) (res chat1.UIMessage)

func PresentMessagesUnboxed

func PresentMessagesUnboxed(ctx context.Context, g *globals.Context, msgs []chat1.MessageUnboxed,
	uid gregor1.UID, convID chat1.ConversationID) (res []chat1.UIMessage)

func PresentPagination added in v1.0.29

func PresentPagination(p *chat1.Pagination) (res *chat1.UIPagination)

func PresentRemoteConversation added in v1.0.33

func PresentRemoteConversation(ctx context.Context, g *globals.Context, rc types.RemoteConversation) (res chat1.UnverifiedInboxUIItem)

func PresentRemoteConversationAsSearchHit

func PresentRemoteConversationAsSearchHit(conv types.RemoteConversation, username string) chat1.UIChatSearchConvHit

func PresentRemoteConversations added in v1.0.34

func PresentRemoteConversations(ctx context.Context, g *globals.Context, rcs []types.RemoteConversation) (res []chat1.UnverifiedInboxUIItem)

func PresentRemoteConversationsAsSearchHits

func PresentRemoteConversationsAsSearchHits(convs []types.RemoteConversation, username string) (res []chat1.UIChatSearchConvHit)

func PresentThreadView added in v1.0.34

func PresentThreadView(ctx context.Context, g *globals.Context, uid gregor1.UID, tv chat1.ThreadView,
	convID chat1.ConversationID) (res chat1.UIMessages)

func RemoteConvs added in v1.0.33

func RemoteConvs(convs []chat1.Conversation) (res []types.RemoteConversation)

func RemoveUnfurl

func RemoveUnfurl(mvalid *chat1.MessageUnboxedValid, unfurlMessageID chat1.MessageID)

func ReorderParticipants

func ReorderParticipants(mctx libkb.MetaContext, g libkb.UIDMapperContext, umapper libkb.UIDMapper,
	tlfname string, activeList []gregor1.UID) (writerNames []chat1.ConversationLocalParticipant, err error)

ReorderParticipants based on the order in activeList. Only allows usernames from tlfname in the output. This never fails, worse comes to worst it just returns the split of tlfname.

func ReplaceQuotedSubstrings

func ReplaceQuotedSubstrings(xs string, skipAngleQuotes bool) string

func SanitizeTopicName added in v1.0.27

func SanitizeTopicName(topicName string) string

func SearchableRemoteConversationName

func SearchableRemoteConversationName(conv types.RemoteConversation, username string) string

func SetUnfurl

func SetUnfurl(mvalid *chat1.MessageUnboxedValid, unfurlMessageID chat1.MessageID,
	unfurl chat1.UnfurlResult)

func SplitAndNormalizeTLFName

func SplitAndNormalizeTLFName(mctx libkb.MetaContext, name string, public bool) (
	writerNames, readerNames []string,
	extensionSuffix string, err error)

func SplitTLFName added in v1.0.34

func SplitTLFName(tlfName string) []string

func SuspendComponent

func SuspendComponent(ctx context.Context, g *globals.Context, suspendable types.Suspendable) func()

SuspendComponent will suspend a Suspendable type until the return function is called. This allows a succinct call like defer SuspendComponent(ctx, g, g.ConvLoader)() in RPC handlers wishing to lock out the conv loader.

func SuspendComponents

func SuspendComponents(ctx context.Context, g *globals.Context, suspendables []types.Suspendable) func()

func SystemMessageMentions added in v1.0.34

func SystemMessageMentions(ctx context.Context, body chat1.MessageSystem, upak SystemMessageUIDSource) (atMentions []gregor1.UID, chanMention chat1.ChannelMention)

func UsernamePackageToParticipant added in v1.0.34

func UsernamePackageToParticipant(p libkb.UsernamePackage) chat1.ConversationLocalParticipant

func VisibleChatConversationStatuses added in v1.0.19

func VisibleChatConversationStatuses() (res []chat1.ConversationStatus)

Which convs show in the inbox.

Types

type BadTLFNameError

type BadTLFNameError struct {
	Name string
}

BadTLFNameError indicates a top-level folder name that has an incorrect format.

func (BadTLFNameError) Error

func (e BadTLFNameError) Error() string

Error implements the error interface for BadTLFNameError.

type ByConvID added in v1.0.27

type ByConvID []chat1.ConversationID

func (ByConvID) Len added in v1.0.27

func (c ByConvID) Len() int

func (ByConvID) Less added in v1.0.27

func (c ByConvID) Less(i, j int) bool

func (ByConvID) Swap added in v1.0.27

func (c ByConvID) Swap(i, j int)

type ByMsgID

type ByMsgID []chat1.MessageID

func (ByMsgID) Len

func (m ByMsgID) Len() int

func (ByMsgID) Less

func (m ByMsgID) Less(i, j int) bool

func (ByMsgID) Swap

func (m ByMsgID) Swap(i, j int)

type ByMsgSummaryCtime added in v1.0.28

type ByMsgSummaryCtime []chat1.MessageSummary

func (ByMsgSummaryCtime) Len added in v1.0.28

func (c ByMsgSummaryCtime) Len() int

func (ByMsgSummaryCtime) Less added in v1.0.28

func (c ByMsgSummaryCtime) Less(i, j int) bool

func (ByMsgSummaryCtime) Swap added in v1.0.28

func (c ByMsgSummaryCtime) Swap(i, j int)

type ByMsgUnboxedCtime added in v1.0.28

type ByMsgUnboxedCtime []chat1.MessageUnboxed

func (ByMsgUnboxedCtime) Len added in v1.0.28

func (c ByMsgUnboxedCtime) Len() int

func (ByMsgUnboxedCtime) Less added in v1.0.28

func (c ByMsgUnboxedCtime) Less(i, j int) bool

func (ByMsgUnboxedCtime) Swap added in v1.0.28

func (c ByMsgUnboxedCtime) Swap(i, j int)

type ByMsgUnboxedMsgID added in v1.0.42

type ByMsgUnboxedMsgID []chat1.MessageUnboxed

func (ByMsgUnboxedMsgID) Len added in v1.0.42

func (c ByMsgUnboxedMsgID) Len() int

func (ByMsgUnboxedMsgID) Less added in v1.0.42

func (c ByMsgUnboxedMsgID) Less(i, j int) bool

func (ByMsgUnboxedMsgID) Swap added in v1.0.42

func (c ByMsgUnboxedMsgID) Swap(i, j int)

type Collapses

type Collapses struct {
	globals.Contextified
	DebugLabeler
	// contains filtered or unexported fields
}

func NewCollapses

func NewCollapses(g *globals.Context) *Collapses

func (*Collapses) IsCollapsed

func (c *Collapses) IsCollapsed(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
	msgID chat1.MessageID, msgType chat1.MessageType) bool

func (*Collapses) ToggleRange

func (c *Collapses) ToggleRange(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
	msgID chat1.MessageID, collapsed bool) error

func (*Collapses) ToggleSingle

func (c *Collapses) ToggleSingle(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID,
	msgID chat1.MessageID, collapsed bool) error

type ConvByConvID added in v1.0.27

type ConvByConvID []chat1.Conversation

func (ConvByConvID) Len added in v1.0.27

func (c ConvByConvID) Len() int

func (ConvByConvID) Less added in v1.0.27

func (c ConvByConvID) Less(i, j int) bool

func (ConvByConvID) Swap added in v1.0.27

func (c ConvByConvID) Swap(i, j int)

type ConvLocalByConvID added in v1.0.27

type ConvLocalByConvID []chat1.ConversationLocal

func (ConvLocalByConvID) Len added in v1.0.27

func (c ConvLocalByConvID) Len() int

func (ConvLocalByConvID) Less added in v1.0.27

func (c ConvLocalByConvID) Less(i, j int) bool

func (ConvLocalByConvID) Swap added in v1.0.27

func (c ConvLocalByConvID) Swap(i, j int)

type ConvLocalByTopicName added in v1.0.27

type ConvLocalByTopicName []chat1.ConversationLocal

func (ConvLocalByTopicName) Len added in v1.0.27

func (c ConvLocalByTopicName) Len() int

func (ConvLocalByTopicName) Less added in v1.0.27

func (c ConvLocalByTopicName) Less(i, j int) bool

func (ConvLocalByTopicName) Swap added in v1.0.27

func (c ConvLocalByTopicName) Swap(i, j int)

type ConversationLockTab

type ConversationLockTab struct {
	globals.Contextified
	sync.Mutex
	DebugLabeler
	// contains filtered or unexported fields
}

func NewConversationLockTab

func NewConversationLockTab(g *globals.Context) *ConversationLockTab

func (*ConversationLockTab) Acquire

func (c *ConversationLockTab) Acquire(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID) (blocked bool, err error)

Acquire obtains a per user per conversation lock on a per trace basis. That is, the lock is a shared lock for the current chat trace, and serves to synchronize large chat operations. If there is no chat trace, this is a no-op.

func (*ConversationLockTab) NumLocks

func (c *ConversationLockTab) NumLocks() int

func (*ConversationLockTab) Release

func (c *ConversationLockTab) Release(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID) (released bool)

func (*ConversationLockTab) SetBlockCb

func (c *ConversationLockTab) SetBlockCb(ch *chan struct{})

func (*ConversationLockTab) SetMaxAcquireRetries

func (c *ConversationLockTab) SetMaxAcquireRetries(n int)

type ConversationMemberStatusBehavior added in v1.0.40

type ConversationMemberStatusBehavior struct {
	// Whether to show the conv in the inbox
	ShowInInbox bool
	// Whether to show desktop notifications
	DesktopNotifications bool
	// Whether to send push notifications
	PushNotifications bool
	// Whether to show as part of badging
	ShowBadges bool
}

ConversationMemberStatusBehavior describes how a ConversationMemberStatus behaves

func GetConversationMemberStatusBehavior added in v1.0.40

func GetConversationMemberStatusBehavior(s chat1.ConversationMemberStatus) ConversationMemberStatusBehavior

type ConversationStatusBehavior added in v1.0.19

type ConversationStatusBehavior struct {
	// Whether to show the conv in the inbox
	ShowInInbox bool
	// Whether sending to this conv sets it back to UNFILED
	SendingRemovesStatus bool
	// Whether any incoming activity sets it back to UNFILED
	ActivityRemovesStatus bool
	// Whether to show desktop notifications
	DesktopNotifications bool
	// Whether to send push notifications
	PushNotifications bool
	// Whether to show as part of badging
	ShowBadges bool
}

ConversationStatusBehavior describes how a ConversationStatus behaves

func GetConversationStatusBehavior added in v1.0.19

func GetConversationStatusBehavior(s chat1.ConversationStatus) ConversationStatusBehavior

GetConversationStatusBehavior gives information about what is allowed for a conversation status. When changing these, be sure to update gregor's postMessage as well

type DebugLabeler added in v1.0.19

type DebugLabeler struct {
	// contains filtered or unexported fields
}

func NewDebugLabeler added in v1.0.19

func NewDebugLabeler(log logger.Logger, label string, verbose bool) DebugLabeler

func (DebugLabeler) Debug added in v1.0.19

func (d DebugLabeler) Debug(ctx context.Context, msg string, args ...interface{})

func (DebugLabeler) GetLog

func (d DebugLabeler) GetLog() logger.Logger

func (DebugLabeler) Trace added in v1.0.19

func (d DebugLabeler) Trace(ctx context.Context, f func() error, format string, args ...interface{}) func()

type DummyChatNotifications

type DummyChatNotifications struct{}

func (DummyChatNotifications) ChatAttachmentUploadProgress

func (DummyChatNotifications) ChatAttachmentUploadStart

func (DummyChatNotifications) ChatIdentifyUpdate

func (DummyChatNotifications) ChatInboxStale

func (DummyChatNotifications) ChatInboxSyncStarted

func (d DummyChatNotifications) ChatInboxSyncStarted(context.Context, keybase1.UID) error

func (DummyChatNotifications) ChatInboxSynced

func (DummyChatNotifications) ChatJoinedConversation

func (DummyChatNotifications) ChatKBFSToImpteamUpgrade

func (DummyChatNotifications) ChatLeftConversation

func (DummyChatNotifications) ChatPaymentInfo

func (DummyChatNotifications) ChatPromptUnfurl

func (DummyChatNotifications) ChatRequestInfo

func (DummyChatNotifications) ChatResetConversation

func (DummyChatNotifications) ChatSetConvRetention

func (DummyChatNotifications) ChatSetConvSettings

func (DummyChatNotifications) ChatSetTeamRetention

func (DummyChatNotifications) ChatSubteamRename

func (DummyChatNotifications) ChatTLFFinalize

func (DummyChatNotifications) ChatTLFResolve

func (DummyChatNotifications) ChatThreadsStale

func (DummyChatNotifications) ChatTypingUpdate

func (DummyChatNotifications) NewChatActivity

type DummyChatUI

type DummyChatUI struct{}

func (DummyChatUI) ChatAttachmentDownloadDone

func (r DummyChatUI) ChatAttachmentDownloadDone(ctx context.Context, sessionID int) error

func (DummyChatUI) ChatAttachmentDownloadProgress

func (r DummyChatUI) ChatAttachmentDownloadProgress(ctx context.Context,
	arg chat1.ChatAttachmentDownloadProgressArg) error

func (DummyChatUI) ChatAttachmentDownloadStart

func (r DummyChatUI) ChatAttachmentDownloadStart(ctx context.Context, sessionID int) error

func (DummyChatUI) ChatBotCommandsUpdateStatus

func (r DummyChatUI) ChatBotCommandsUpdateStatus(context.Context, chat1.ChatBotCommandsUpdateStatusArg) error

func (DummyChatUI) ChatClearWatch

func (DummyChatUI) ChatCoinFlipStatus

func (r DummyChatUI) ChatCoinFlipStatus(ctx context.Context, arg chat1.ChatCoinFlipStatusArg) error

func (DummyChatUI) ChatCommandMarkdown

func (r DummyChatUI) ChatCommandMarkdown(ctx context.Context, arg chat1.ChatCommandMarkdownArg) error

func (DummyChatUI) ChatCommandStatus

func (DummyChatUI) ChatConfirmChannelDelete

func (r DummyChatUI) ChatConfirmChannelDelete(ctx context.Context, arg chat1.ChatConfirmChannelDeleteArg) (bool, error)

func (DummyChatUI) ChatGiphySearchResults

func (r DummyChatUI) ChatGiphySearchResults(ctx context.Context, arg chat1.ChatGiphySearchResultsArg) error

func (DummyChatUI) ChatGiphyToggleResultWindow

func (r DummyChatUI) ChatGiphyToggleResultWindow(ctx context.Context,
	arg chat1.ChatGiphyToggleResultWindowArg) error

func (DummyChatUI) ChatInboxConversation

func (r DummyChatUI) ChatInboxConversation(ctx context.Context, arg chat1.ChatInboxConversationArg) error

func (DummyChatUI) ChatInboxFailed

func (r DummyChatUI) ChatInboxFailed(ctx context.Context, arg chat1.ChatInboxFailedArg) error

func (DummyChatUI) ChatInboxUnverified

func (r DummyChatUI) ChatInboxUnverified(ctx context.Context, arg chat1.ChatInboxUnverifiedArg) error

func (DummyChatUI) ChatLoadGalleryHit

func (r DummyChatUI) ChatLoadGalleryHit(ctx context.Context, arg chat1.ChatLoadGalleryHitArg) error

func (DummyChatUI) ChatMaybeMentionUpdate

func (r DummyChatUI) ChatMaybeMentionUpdate(ctx context.Context, arg chat1.ChatMaybeMentionUpdateArg) error

func (DummyChatUI) ChatSearchConvHits

func (r DummyChatUI) ChatSearchConvHits(ctx context.Context, arg chat1.ChatSearchConvHitsArg) error

func (DummyChatUI) ChatSearchDone

func (r DummyChatUI) ChatSearchDone(ctx context.Context, arg chat1.ChatSearchDoneArg) error

func (DummyChatUI) ChatSearchHit

func (r DummyChatUI) ChatSearchHit(ctx context.Context, arg chat1.ChatSearchHitArg) error

func (DummyChatUI) ChatSearchInboxDone

func (r DummyChatUI) ChatSearchInboxDone(ctx context.Context, arg chat1.ChatSearchInboxDoneArg) error

func (DummyChatUI) ChatSearchInboxHit

func (r DummyChatUI) ChatSearchInboxHit(ctx context.Context, arg chat1.ChatSearchInboxHitArg) error

func (DummyChatUI) ChatSearchInboxStart

func (r DummyChatUI) ChatSearchInboxStart(ctx context.Context, sessionID int) error

func (DummyChatUI) ChatSearchIndexStatus

func (r DummyChatUI) ChatSearchIndexStatus(ctx context.Context, arg chat1.ChatSearchIndexStatusArg) error

func (DummyChatUI) ChatShowManageChannels

func (r DummyChatUI) ChatShowManageChannels(ctx context.Context, arg chat1.ChatShowManageChannelsArg) error

func (DummyChatUI) ChatStellarDataConfirm

func (r DummyChatUI) ChatStellarDataConfirm(ctx context.Context, arg chat1.ChatStellarDataConfirmArg) (bool, error)

func (DummyChatUI) ChatStellarDataError

func (r DummyChatUI) ChatStellarDataError(ctx context.Context, arg chat1.ChatStellarDataErrorArg) (bool, error)

func (DummyChatUI) ChatStellarDone

func (r DummyChatUI) ChatStellarDone(ctx context.Context, arg chat1.ChatStellarDoneArg) error

func (DummyChatUI) ChatStellarShowConfirm

func (r DummyChatUI) ChatStellarShowConfirm(ctx context.Context, sessionID int) error

func (DummyChatUI) ChatThreadCached

func (r DummyChatUI) ChatThreadCached(ctx context.Context, arg chat1.ChatThreadCachedArg) error

func (DummyChatUI) ChatThreadFull

func (r DummyChatUI) ChatThreadFull(ctx context.Context, arg chat1.ChatThreadFullArg) error

func (DummyChatUI) ChatThreadStatus

func (r DummyChatUI) ChatThreadStatus(ctx context.Context, arg chat1.ChatThreadStatusArg) error

func (DummyChatUI) TriggerContactSync

func (r DummyChatUI) TriggerContactSync(context.Context, int) error

type MessageSummaryContainer

type MessageSummaryContainer interface {
	GetMaxMessage(typ chat1.MessageType) (chat1.MessageSummary, error)
}

type NoSuchNameError

type NoSuchNameError struct {
	Name string
}

NoSuchNameError indicates that the user tried to access a subdirectory entry that doesn't exist.

func (NoSuchNameError) Error

func (e NoSuchNameError) Error() string

Error implements the error interface for NoSuchNameError

type NoSuchUserError

type NoSuchUserError struct {
	Input string
}

NoSuchUserError indicates that the given user couldn't be resolved.

func (NoSuchUserError) Error

func (e NoSuchUserError) Error() string

Error implements the error interface for NoSuchUserError

func (NoSuchUserError) ToStatus

func (e NoSuchUserError) ToStatus() keybase1.Status

ToStatus implements the keybase1.ToStatusAble interface for NoSuchUserError

type RemoteConvByConvID added in v1.0.33

type RemoteConvByConvID []types.RemoteConversation

func (RemoteConvByConvID) Len added in v1.0.33

func (c RemoteConvByConvID) Len() int

func (RemoteConvByConvID) Less added in v1.0.33

func (c RemoteConvByConvID) Less(i, j int) bool

func (RemoteConvByConvID) Swap added in v1.0.33

func (c RemoteConvByConvID) Swap(i, j int)

type SystemMessageUIDSource added in v1.0.34

type SystemMessageUIDSource interface {
	LookupUID(ctx context.Context, un libkb.NormalizedUsername) (keybase1.UID, error)
}

type TlfNameNotCanonical

type TlfNameNotCanonical struct {
	Name, NameToTry string
}

TlfNameNotCanonical indicates that a name isn't a canonical, and that another (not necessarily canonical) name should be tried.

func (TlfNameNotCanonical) Error

func (e TlfNameNotCanonical) Error() string

Jump to

Keyboard shortcuts

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