id
int32
0
167k
repo
stringlengths
5
54
path
stringlengths
4
155
func_name
stringlengths
1
118
original_string
stringlengths
52
85.5k
language
stringclasses
1 value
code
stringlengths
52
85.5k
code_tokens
listlengths
21
1.41k
docstring
stringlengths
6
2.61k
docstring_tokens
listlengths
3
215
sha
stringlengths
40
40
url
stringlengths
85
252
160,500
keybase/client
go/kbfs/data/dirty_bcache.go
ShouldForceSync
func (d *DirtyBlockCacheStandard) ShouldForceSync(_ tlf.ID) bool { d.lock.RLock() defer d.lock.RUnlock() // TODO: Fill up to likely block boundaries? return d.waitBufBytes >= d.syncBufferCap }
go
func (d *DirtyBlockCacheStandard) ShouldForceSync(_ tlf.ID) bool { d.lock.RLock() defer d.lock.RUnlock() // TODO: Fill up to likely block boundaries? return d.waitBufBytes >= d.syncBufferCap }
[ "func", "(", "d", "*", "DirtyBlockCacheStandard", ")", "ShouldForceSync", "(", "_", "tlf", ".", "ID", ")", "bool", "{", "d", ".", "lock", ".", "RLock", "(", ")", "\n", "defer", "d", ".", "lock", ".", "RUnlock", "(", ")", "\n", "// TODO: Fill up to like...
// ShouldForceSync implements the DirtyBlockCache interface for // DirtyBlockCacheStandard.
[ "ShouldForceSync", "implements", "the", "DirtyBlockCache", "interface", "for", "DirtyBlockCacheStandard", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/data/dirty_bcache.go#L644-L649
160,501
keybase/client
go/kbfs/data/dirty_bcache.go
Size
func (d *DirtyBlockCacheStandard) Size() int { d.lock.RLock() defer d.lock.RUnlock() return len(d.cache) }
go
func (d *DirtyBlockCacheStandard) Size() int { d.lock.RLock() defer d.lock.RUnlock() return len(d.cache) }
[ "func", "(", "d", "*", "DirtyBlockCacheStandard", ")", "Size", "(", ")", "int", "{", "d", ".", "lock", ".", "RLock", "(", ")", "\n", "defer", "d", ".", "lock", ".", "RUnlock", "(", ")", "\n", "return", "len", "(", "d", ".", "cache", ")", "\n", ...
// Size returns the number of blocks currently in the cache.
[ "Size", "returns", "the", "number", "of", "blocks", "currently", "in", "the", "cache", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/data/dirty_bcache.go#L652-L656
160,502
keybase/client
go/kbfs/data/dirty_bcache.go
Shutdown
func (d *DirtyBlockCacheStandard) Shutdown() error { func() { d.shutdownLock.Lock() defer d.shutdownLock.Unlock() d.isShutdown = true close(d.shutdownChan) }() d.reqWg.Wait() close(d.requestsChan) d.lock.Lock() defer d.lock.Unlock() // Clear out the remaining requests for req := range d.requestsChan { ...
go
func (d *DirtyBlockCacheStandard) Shutdown() error { func() { d.shutdownLock.Lock() defer d.shutdownLock.Unlock() d.isShutdown = true close(d.shutdownChan) }() d.reqWg.Wait() close(d.requestsChan) d.lock.Lock() defer d.lock.Unlock() // Clear out the remaining requests for req := range d.requestsChan { ...
[ "func", "(", "d", "*", "DirtyBlockCacheStandard", ")", "Shutdown", "(", ")", "error", "{", "func", "(", ")", "{", "d", ".", "shutdownLock", ".", "Lock", "(", ")", "\n", "defer", "d", ".", "shutdownLock", ".", "Unlock", "(", ")", "\n", "d", ".", "is...
// Shutdown implements the DirtyBlockCache interface for // DirtyBlockCacheStandard.
[ "Shutdown", "implements", "the", "DirtyBlockCache", "interface", "for", "DirtyBlockCacheStandard", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/data/dirty_bcache.go#L660-L682
160,503
keybase/client
go/client/cmd_update.go
NewCmdUpdate
func NewCmdUpdate(cl *libcmdline.CommandLine, g *libkb.GlobalContext) cli.Command { return cli.Command{ Name: "update", Usage: "The updater", ArgumentHelp: "[arguments...]", HideHelp: true, Subcommands: []cli.Command{ newCmdUpdateCheck(cl, g), // Deprecated newCmdUpdateCheckInUse(cl,...
go
func NewCmdUpdate(cl *libcmdline.CommandLine, g *libkb.GlobalContext) cli.Command { return cli.Command{ Name: "update", Usage: "The updater", ArgumentHelp: "[arguments...]", HideHelp: true, Subcommands: []cli.Command{ newCmdUpdateCheck(cl, g), // Deprecated newCmdUpdateCheckInUse(cl,...
[ "func", "NewCmdUpdate", "(", "cl", "*", "libcmdline", ".", "CommandLine", ",", "g", "*", "libkb", ".", "GlobalContext", ")", "cli", ".", "Command", "{", "return", "cli", ".", "Command", "{", "Name", ":", "\"", "\"", ",", "Usage", ":", "\"", "\"", ","...
// NewCmdUpdate are commands for supporting the updater
[ "NewCmdUpdate", "are", "commands", "for", "supporting", "the", "updater" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/client/cmd_update.go#L19-L31
160,504
keybase/client
go/client/cmd_update.go
newCmdUpdateCheckInUse
func newCmdUpdateCheckInUse(cl *libcmdline.CommandLine, g *libkb.GlobalContext) cli.Command { return cli.Command{ Name: "check-in-use", ArgumentHelp: "", Usage: "Check if we are in use (safe for restart)", Action: func(c *cli.Context) { cl.SetLogForward(libcmdline.LogForwardNone) cl.SetFor...
go
func newCmdUpdateCheckInUse(cl *libcmdline.CommandLine, g *libkb.GlobalContext) cli.Command { return cli.Command{ Name: "check-in-use", ArgumentHelp: "", Usage: "Check if we are in use (safe for restart)", Action: func(c *cli.Context) { cl.SetLogForward(libcmdline.LogForwardNone) cl.SetFor...
[ "func", "newCmdUpdateCheckInUse", "(", "cl", "*", "libcmdline", ".", "CommandLine", ",", "g", "*", "libkb", ".", "GlobalContext", ")", "cli", ".", "Command", "{", "return", "cli", ".", "Command", "{", "Name", ":", "\"", "\"", ",", "ArgumentHelp", ":", "\...
// newCmdUpdateCheckInUse is called by updater to see if Keybase is currently in use
[ "newCmdUpdateCheckInUse", "is", "called", "by", "updater", "to", "see", "if", "Keybase", "is", "currently", "in", "use" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/client/cmd_update.go#L60-L71
160,505
keybase/client
go/client/cmd_simplefs_ps.go
NewCmdSimpleFSPs
func NewCmdSimpleFSPs(cl *libcmdline.CommandLine, g *libkb.GlobalContext) cli.Command { return cli.Command{ Name: "ps", Usage: "list running operations", Action: func(c *cli.Context) { cl.ChooseCommand(&CmdSimpleFSPs{Contextified: libkb.NewContextified(g)}, "ps", c) cl.SetNoStandalone() }, } }
go
func NewCmdSimpleFSPs(cl *libcmdline.CommandLine, g *libkb.GlobalContext) cli.Command { return cli.Command{ Name: "ps", Usage: "list running operations", Action: func(c *cli.Context) { cl.ChooseCommand(&CmdSimpleFSPs{Contextified: libkb.NewContextified(g)}, "ps", c) cl.SetNoStandalone() }, } }
[ "func", "NewCmdSimpleFSPs", "(", "cl", "*", "libcmdline", ".", "CommandLine", ",", "g", "*", "libkb", ".", "GlobalContext", ")", "cli", ".", "Command", "{", "return", "cli", ".", "Command", "{", "Name", ":", "\"", "\"", ",", "Usage", ":", "\"", "\"", ...
// NewCmdSimpleFSPs creates a new cli.Command.
[ "NewCmdSimpleFSPs", "creates", "a", "new", "cli", ".", "Command", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/client/cmd_simplefs_ps.go#L25-L34
160,506
keybase/client
go/kbfs/libkbfs/folder_block_manager.go
archiveUnrefBlocksNoWait
func (fbm *folderBlockManager) archiveUnrefBlocksNoWait(md ReadOnlyRootMetadata) { // Don't archive for unmerged revisions, because conflict // resolution might undo some of the unreferences. if md.MergedStatus() != kbfsmd.Merged { return } if err := isArchivableMDOrError(md); err != nil { panic(err) } fbm...
go
func (fbm *folderBlockManager) archiveUnrefBlocksNoWait(md ReadOnlyRootMetadata) { // Don't archive for unmerged revisions, because conflict // resolution might undo some of the unreferences. if md.MergedStatus() != kbfsmd.Merged { return } if err := isArchivableMDOrError(md); err != nil { panic(err) } fbm...
[ "func", "(", "fbm", "*", "folderBlockManager", ")", "archiveUnrefBlocksNoWait", "(", "md", "ReadOnlyRootMetadata", ")", "{", "// Don't archive for unmerged revisions, because conflict", "// resolution might undo some of the unreferences.", "if", "md", ".", "MergedStatus", "(", ...
// archiveUnrefBlocksNoWait enqueues the MD for archiving without // blocking. By the time it returns, the archive group has been // incremented so future waits will block on this archive. This // method is for internal use within folderBlockManager only.
[ "archiveUnrefBlocksNoWait", "enqueues", "the", "MD", "for", "archiving", "without", "blocking", ".", "By", "the", "time", "it", "returns", "the", "archive", "group", "has", "been", "incremented", "so", "future", "waits", "will", "block", "on", "this", "archive",...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_block_manager.go#L400-L422
160,507
keybase/client
go/kbfs/libkbfs/folder_block_manager.go
doChunkedDowngrades
func (fbm *folderBlockManager) doChunkedDowngrades(ctx context.Context, tlfID tlf.ID, ptrs []data.BlockPointer, archive bool) ( []kbfsblock.ID, error) { fbm.log.CDebugf(ctx, "Downgrading %d pointers (archive=%t)", len(ptrs), archive) bops := fbm.config.BlockOps() // Round up to find the number of chunks. numCh...
go
func (fbm *folderBlockManager) doChunkedDowngrades(ctx context.Context, tlfID tlf.ID, ptrs []data.BlockPointer, archive bool) ( []kbfsblock.ID, error) { fbm.log.CDebugf(ctx, "Downgrading %d pointers (archive=%t)", len(ptrs), archive) bops := fbm.config.BlockOps() // Round up to find the number of chunks. numCh...
[ "func", "(", "fbm", "*", "folderBlockManager", ")", "doChunkedDowngrades", "(", "ctx", "context", ".", "Context", ",", "tlfID", "tlf", ".", "ID", ",", "ptrs", "[", "]", "data", ".", "BlockPointer", ",", "archive", "bool", ")", "(", "[", "]", "kbfsblock",...
// doChunkedDowngrades sends batched archive or delete messages to the // block server for the given block pointers. For deletes, it returns // a list of block IDs that no longer have any references.
[ "doChunkedDowngrades", "sends", "batched", "archive", "or", "delete", "messages", "to", "the", "block", "server", "for", "the", "given", "block", "pointers", ".", "For", "deletes", "it", "returns", "a", "list", "of", "block", "IDs", "that", "no", "longer", "...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_block_manager.go#L454-L533
160,508
keybase/client
go/kbfs/libkbfs/folder_block_manager.go
deleteBlockRefs
func (fbm *folderBlockManager) deleteBlockRefs(ctx context.Context, tlfID tlf.ID, ptrs []data.BlockPointer) ([]kbfsblock.ID, error) { return fbm.doChunkedDowngrades(ctx, tlfID, ptrs, false) }
go
func (fbm *folderBlockManager) deleteBlockRefs(ctx context.Context, tlfID tlf.ID, ptrs []data.BlockPointer) ([]kbfsblock.ID, error) { return fbm.doChunkedDowngrades(ctx, tlfID, ptrs, false) }
[ "func", "(", "fbm", "*", "folderBlockManager", ")", "deleteBlockRefs", "(", "ctx", "context", ".", "Context", ",", "tlfID", "tlf", ".", "ID", ",", "ptrs", "[", "]", "data", ".", "BlockPointer", ")", "(", "[", "]", "kbfsblock", ".", "ID", ",", "error", ...
// deleteBlockRefs sends batched delete messages to the block server // for the given block pointers. It returns a list of block IDs that // no longer have any references.
[ "deleteBlockRefs", "sends", "batched", "delete", "messages", "to", "the", "block", "server", "for", "the", "given", "block", "pointers", ".", "It", "returns", "a", "list", "of", "block", "IDs", "that", "no", "longer", "have", "any", "references", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_block_manager.go#L538-L541
160,509
keybase/client
go/kbfs/libkbfs/folder_block_manager.go
getUnrefPointersFromMD
func (fbm *folderBlockManager) getUnrefPointersFromMD( rmd ReadOnlyRootMetadata, includeGC bool, iter *unrefIterator) ( ptrs []data.BlockPointer, nextIter *unrefIterator) { currPtr := 0 complete := true nextPtr := 0 if iter != nil { nextPtr = iter.nextPtr } ptrMap := make(map[data.BlockPointer]bool) max := f...
go
func (fbm *folderBlockManager) getUnrefPointersFromMD( rmd ReadOnlyRootMetadata, includeGC bool, iter *unrefIterator) ( ptrs []data.BlockPointer, nextIter *unrefIterator) { currPtr := 0 complete := true nextPtr := 0 if iter != nil { nextPtr = iter.nextPtr } ptrMap := make(map[data.BlockPointer]bool) max := f...
[ "func", "(", "fbm", "*", "folderBlockManager", ")", "getUnrefPointersFromMD", "(", "rmd", "ReadOnlyRootMetadata", ",", "includeGC", "bool", ",", "iter", "*", "unrefIterator", ")", "(", "ptrs", "[", "]", "data", ".", "BlockPointer", ",", "nextIter", "*", "unref...
// getUnrefPointersFromMD returns a slice of BlockPointers that were // unreferenced by the given `rmd`. If there are too many pointers to // process, given the current mode, then it will return a partial // list, plus a non-nil `iter` parameter that can be passed into a // subsequent call to get the next set of unref...
[ "getUnrefPointersFromMD", "returns", "a", "slice", "of", "BlockPointers", "that", "were", "unreferenced", "by", "the", "given", "rmd", ".", "If", "there", "are", "too", "many", "pointers", "to", "process", "given", "the", "current", "mode", "then", "it", "will...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_block_manager.go#L706-L770
160,510
keybase/client
go/kbfs/libkbfs/folder_block_manager.go
getMostRecentGCRevision
func (fbm *folderBlockManager) getMostRecentGCRevision( ctx context.Context, head ReadOnlyRootMetadata) ( lastGCRev kbfsmd.Revision, err error) { if head.data.LastGCRevision >= kbfsmd.RevisionInitial { fbm.log.CDebugf(ctx, "Found last gc revision %d in "+ "head MD revision %d", head.data.LastGCRevision, head...
go
func (fbm *folderBlockManager) getMostRecentGCRevision( ctx context.Context, head ReadOnlyRootMetadata) ( lastGCRev kbfsmd.Revision, err error) { if head.data.LastGCRevision >= kbfsmd.RevisionInitial { fbm.log.CDebugf(ctx, "Found last gc revision %d in "+ "head MD revision %d", head.data.LastGCRevision, head...
[ "func", "(", "fbm", "*", "folderBlockManager", ")", "getMostRecentGCRevision", "(", "ctx", "context", ".", "Context", ",", "head", "ReadOnlyRootMetadata", ")", "(", "lastGCRev", "kbfsmd", ".", "Revision", ",", "err", "error", ")", "{", "if", "head", ".", "da...
// getMostRecentGCRevision returns the latest revision that was // scrubbed by the previous gc op.
[ "getMostRecentGCRevision", "returns", "the", "latest", "revision", "that", "was", "scrubbed", "by", "the", "previous", "gc", "op", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_block_manager.go#L877-L931
160,511
keybase/client
go/kbfs/libkbfs/folder_block_manager.go
getUnreferencedBlocks
func (fbm *folderBlockManager) getUnreferencedBlocks( ctx context.Context, earliestRev, mostRecentRev kbfsmd.Revision) ( ptrs []data.BlockPointer, lastRev kbfsmd.Revision, complete bool, err error) { fbm.log.CDebugf(ctx, "Getting unreferenced blocks between revisions "+ "%d and %d", earliestRev, mostRecentRev) d...
go
func (fbm *folderBlockManager) getUnreferencedBlocks( ctx context.Context, earliestRev, mostRecentRev kbfsmd.Revision) ( ptrs []data.BlockPointer, lastRev kbfsmd.Revision, complete bool, err error) { fbm.log.CDebugf(ctx, "Getting unreferenced blocks between revisions "+ "%d and %d", earliestRev, mostRecentRev) d...
[ "func", "(", "fbm", "*", "folderBlockManager", ")", "getUnreferencedBlocks", "(", "ctx", "context", ".", "Context", ",", "earliestRev", ",", "mostRecentRev", "kbfsmd", ".", "Revision", ")", "(", "ptrs", "[", "]", "data", ".", "BlockPointer", ",", "lastRev", ...
// getUnrefBlocks returns a slice containing all the block pointers // that were unreferenced after the earliestRev, up to and including // those in latestRev. If the number of pointers is too large, it // will shorten the range of the revisions being reclaimed, and return // the latest revision represented in the ret...
[ "getUnrefBlocks", "returns", "a", "slice", "containing", "all", "the", "block", "pointers", "that", "were", "unreferenced", "after", "the", "earliestRev", "up", "to", "and", "including", "those", "in", "latestRev", ".", "If", "the", "number", "of", "pointers", ...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_block_manager.go#L938-L1015
160,512
keybase/client
go/kbfs/libkey/key_ops.go
GetTLFCryptKeyServerHalf
func (k *KeyOpsStandard) GetTLFCryptKeyServerHalf( ctx context.Context, serverHalfID kbfscrypto.TLFCryptKeyServerHalfID, key kbfscrypto.CryptPublicKey) (kbfscrypto.TLFCryptKeyServerHalf, error) { // get the key half from the server serverHalf, err := k.config.KeyServer().GetTLFCryptKeyServerHalf( ctx, serverHalfI...
go
func (k *KeyOpsStandard) GetTLFCryptKeyServerHalf( ctx context.Context, serverHalfID kbfscrypto.TLFCryptKeyServerHalfID, key kbfscrypto.CryptPublicKey) (kbfscrypto.TLFCryptKeyServerHalf, error) { // get the key half from the server serverHalf, err := k.config.KeyServer().GetTLFCryptKeyServerHalf( ctx, serverHalfI...
[ "func", "(", "k", "*", "KeyOpsStandard", ")", "GetTLFCryptKeyServerHalf", "(", "ctx", "context", ".", "Context", ",", "serverHalfID", "kbfscrypto", ".", "TLFCryptKeyServerHalfID", ",", "key", "kbfscrypto", ".", "CryptPublicKey", ")", "(", "kbfscrypto", ".", "TLFCr...
// GetTLFCryptKeyServerHalf is an implementation of the KeyOps interface.
[ "GetTLFCryptKeyServerHalf", "is", "an", "implementation", "of", "the", "KeyOps", "interface", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkey/key_ops.go#L38-L60
160,513
keybase/client
go/kbfs/libkey/key_ops.go
PutTLFCryptKeyServerHalves
func (k *KeyOpsStandard) PutTLFCryptKeyServerHalves( ctx context.Context, keyServerHalves kbfsmd.UserDeviceKeyServerHalves) error { // upload the keys return k.config.KeyServer().PutTLFCryptKeyServerHalves(ctx, keyServerHalves) }
go
func (k *KeyOpsStandard) PutTLFCryptKeyServerHalves( ctx context.Context, keyServerHalves kbfsmd.UserDeviceKeyServerHalves) error { // upload the keys return k.config.KeyServer().PutTLFCryptKeyServerHalves(ctx, keyServerHalves) }
[ "func", "(", "k", "*", "KeyOpsStandard", ")", "PutTLFCryptKeyServerHalves", "(", "ctx", "context", ".", "Context", ",", "keyServerHalves", "kbfsmd", ".", "UserDeviceKeyServerHalves", ")", "error", "{", "// upload the keys", "return", "k", ".", "config", ".", "KeyS...
// PutTLFCryptKeyServerHalves is an implementation of the KeyOps interface.
[ "PutTLFCryptKeyServerHalves", "is", "an", "implementation", "of", "the", "KeyOps", "interface", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkey/key_ops.go#L63-L68
160,514
keybase/client
go/kbfs/libkey/key_ops.go
DeleteTLFCryptKeyServerHalf
func (k *KeyOpsStandard) DeleteTLFCryptKeyServerHalf( ctx context.Context, uid keybase1.UID, key kbfscrypto.CryptPublicKey, serverHalfID kbfscrypto.TLFCryptKeyServerHalfID) error { return k.config.KeyServer().DeleteTLFCryptKeyServerHalf( ctx, uid, key, serverHalfID) }
go
func (k *KeyOpsStandard) DeleteTLFCryptKeyServerHalf( ctx context.Context, uid keybase1.UID, key kbfscrypto.CryptPublicKey, serverHalfID kbfscrypto.TLFCryptKeyServerHalfID) error { return k.config.KeyServer().DeleteTLFCryptKeyServerHalf( ctx, uid, key, serverHalfID) }
[ "func", "(", "k", "*", "KeyOpsStandard", ")", "DeleteTLFCryptKeyServerHalf", "(", "ctx", "context", ".", "Context", ",", "uid", "keybase1", ".", "UID", ",", "key", "kbfscrypto", ".", "CryptPublicKey", ",", "serverHalfID", "kbfscrypto", ".", "TLFCryptKeyServerHalfI...
// DeleteTLFCryptKeyServerHalf is an implementation of the KeyOps interface.
[ "DeleteTLFCryptKeyServerHalf", "is", "an", "implementation", "of", "the", "KeyOps", "interface", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkey/key_ops.go#L71-L76
160,515
keybase/client
go/libkb/full_self_cacher.go
WithSelfForcePoll
func (m *CachedFullSelf) WithSelfForcePoll(ctx context.Context, f func(u *User) error) error { arg := NewLoadUserArg(m.G()).WithPublicKeyOptional().WithSelf(true).WithNetContext(ctx).WithForcePoll(true) return m.WithUser(arg, f) }
go
func (m *CachedFullSelf) WithSelfForcePoll(ctx context.Context, f func(u *User) error) error { arg := NewLoadUserArg(m.G()).WithPublicKeyOptional().WithSelf(true).WithNetContext(ctx).WithForcePoll(true) return m.WithUser(arg, f) }
[ "func", "(", "m", "*", "CachedFullSelf", ")", "WithSelfForcePoll", "(", "ctx", "context", ".", "Context", ",", "f", "func", "(", "u", "*", "User", ")", "error", ")", "error", "{", "arg", ":=", "NewLoadUserArg", "(", "m", ".", "G", "(", ")", ")", "....
// WithSelfForcePoll is like WithSelf but forces a poll. I.e., it will always go to the server for // a merkle check, regardless of when the existing self was cached.
[ "WithSelfForcePoll", "is", "like", "WithSelf", "but", "forces", "a", "poll", ".", "I", ".", "e", ".", "it", "will", "always", "go", "to", "the", "server", "for", "a", "merkle", "check", "regardless", "of", "when", "the", "existing", "self", "was", "cache...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/full_self_cacher.go#L103-L106
160,516
keybase/client
go/libkb/full_self_cacher.go
WithUser
func (m *CachedFullSelf) WithUser(arg LoadUserArg, f func(u *User) error) (err error) { ctx := arg.GetNetContext() ctx = WithLogTag(ctx, "SELF") arg = arg.WithNetContext(ctx) m.G().Log.CDebugf(ctx, "+ CachedFullSelf#WithUser(%+v)", arg) m.Lock() defer func() { m.G().Log.CDebugf(ctx, "- CachedFullSelf#WithUser...
go
func (m *CachedFullSelf) WithUser(arg LoadUserArg, f func(u *User) error) (err error) { ctx := arg.GetNetContext() ctx = WithLogTag(ctx, "SELF") arg = arg.WithNetContext(ctx) m.G().Log.CDebugf(ctx, "+ CachedFullSelf#WithUser(%+v)", arg) m.Lock() defer func() { m.G().Log.CDebugf(ctx, "- CachedFullSelf#WithUser...
[ "func", "(", "m", "*", "CachedFullSelf", ")", "WithUser", "(", "arg", "LoadUserArg", ",", "f", "func", "(", "u", "*", "User", ")", "error", ")", "(", "err", "error", ")", "{", "ctx", ":=", "arg", ".", "GetNetContext", "(", ")", "\n", "ctx", "=", ...
// WithUser loads any old user. If it happens to be the self user, then it behaves // as in WithSelf. Otherwise, it will just load the user, and throw it out when done. // WithUser supports other so that code doesn't need to change if we're doing the // operation for the user or someone else.
[ "WithUser", "loads", "any", "old", "user", ".", "If", "it", "happens", "to", "be", "the", "self", "user", "then", "it", "behaves", "as", "in", "WithSelf", ".", "Otherwise", "it", "will", "just", "load", "the", "user", "and", "throw", "it", "out", "when...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/full_self_cacher.go#L153-L202
160,517
keybase/client
go/libkb/full_self_cacher.go
HandleUserChanged
func (m *CachedFullSelf) HandleUserChanged(u keybase1.UID) error { m.Lock() defer m.Unlock() if m.me != nil && m.me.GetUID().Equal(u) { m.G().Log.Debug("| CachedFullSelf#HandleUserChanged: Invalidating me for UID=%s", u) m.me = nil } else { m.G().Log.Debug("| CachedFullSelf#HandleUserChanged: Ignoring cache b...
go
func (m *CachedFullSelf) HandleUserChanged(u keybase1.UID) error { m.Lock() defer m.Unlock() if m.me != nil && m.me.GetUID().Equal(u) { m.G().Log.Debug("| CachedFullSelf#HandleUserChanged: Invalidating me for UID=%s", u) m.me = nil } else { m.G().Log.Debug("| CachedFullSelf#HandleUserChanged: Ignoring cache b...
[ "func", "(", "m", "*", "CachedFullSelf", ")", "HandleUserChanged", "(", "u", "keybase1", ".", "UID", ")", "error", "{", "m", ".", "Lock", "(", ")", "\n", "defer", "m", ".", "Unlock", "(", ")", "\n", "if", "m", ".", "me", "!=", "nil", "&&", "m", ...
// HandleUserChanged clears the cached self user if it's the UID of the self user.
[ "HandleUserChanged", "clears", "the", "cached", "self", "user", "if", "it", "s", "the", "UID", "of", "the", "self", "user", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/full_self_cacher.go#L251-L261
160,518
keybase/client
go/libkb/full_self_cacher.go
OnLogin
func (m *CachedFullSelf) OnLogin(mctx MetaContext) error { m.Lock() defer m.Unlock() if m.me != nil && !m.me.GetUID().Equal(m.G().GetMyUID()) { m.me = nil } return nil }
go
func (m *CachedFullSelf) OnLogin(mctx MetaContext) error { m.Lock() defer m.Unlock() if m.me != nil && !m.me.GetUID().Equal(m.G().GetMyUID()) { m.me = nil } return nil }
[ "func", "(", "m", "*", "CachedFullSelf", ")", "OnLogin", "(", "mctx", "MetaContext", ")", "error", "{", "m", ".", "Lock", "(", ")", "\n", "defer", "m", ".", "Unlock", "(", ")", "\n", "if", "m", ".", "me", "!=", "nil", "&&", "!", "m", ".", "me",...
// OnLogin clears the cached self user if it differs from what's already cached.
[ "OnLogin", "clears", "the", "cached", "self", "user", "if", "it", "differs", "from", "what", "s", "already", "cached", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/full_self_cacher.go#L264-L271
160,519
keybase/client
go/kbfs/libfs/fs_notifications.go
QueueNotification
func (f *FSNotifications) QueueNotification(fn func()) { f.notificationMutex.RLock() defer f.notificationMutex.RUnlock() if f.notifications == nil { f.log.Warning("Ignoring notification, no available channel") return } f.notificationGroup.Add(1) f.notifications.In() <- fn }
go
func (f *FSNotifications) QueueNotification(fn func()) { f.notificationMutex.RLock() defer f.notificationMutex.RUnlock() if f.notifications == nil { f.log.Warning("Ignoring notification, no available channel") return } f.notificationGroup.Add(1) f.notifications.In() <- fn }
[ "func", "(", "f", "*", "FSNotifications", ")", "QueueNotification", "(", "fn", "func", "(", ")", ")", "{", "f", ".", "notificationMutex", ".", "RLock", "(", ")", "\n", "defer", "f", ".", "notificationMutex", ".", "RUnlock", "(", ")", "\n", "if", "f", ...
// QueueNotification queues a notification, which must be // goroutine-safe.
[ "QueueNotification", "queues", "a", "notification", "which", "must", "be", "goroutine", "-", "safe", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libfs/fs_notifications.go#L73-L82
160,520
keybase/client
go/kbfs/libfs/fs_notifications.go
LaunchProcessor
func (f *FSNotifications) LaunchProcessor(ctx context.Context) { f.notificationMutex.Lock() defer f.notificationMutex.Unlock() f.log.CDebugf(ctx, "Launching notifications channel") // The notifications channel needs to have "infinite" capacity, // because otherwise we risk a deadlock between libkbfs and // libfs...
go
func (f *FSNotifications) LaunchProcessor(ctx context.Context) { f.notificationMutex.Lock() defer f.notificationMutex.Unlock() f.log.CDebugf(ctx, "Launching notifications channel") // The notifications channel needs to have "infinite" capacity, // because otherwise we risk a deadlock between libkbfs and // libfs...
[ "func", "(", "f", "*", "FSNotifications", ")", "LaunchProcessor", "(", "ctx", "context", ".", "Context", ")", "{", "f", ".", "notificationMutex", ".", "Lock", "(", ")", "\n", "defer", "f", ".", "notificationMutex", ".", "Unlock", "(", ")", "\n\n", "f", ...
// LaunchProcessor launches the notification processor.
[ "LaunchProcessor", "launches", "the", "notification", "processor", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libfs/fs_notifications.go#L85-L104
160,521
keybase/client
go/phonenumbers/user.go
VerifyPhoneNumber
func VerifyPhoneNumber(mctx libkb.MetaContext, phoneNumber keybase1.PhoneNumber, code string) error { payload := make(libkb.JSONPayload) payload["phone_number"] = phoneNumber payload["verification_code"] = code arg := libkb.APIArg{ Endpoint: "user/phone_number_verify", JSONPayload: payload, SessionType: l...
go
func VerifyPhoneNumber(mctx libkb.MetaContext, phoneNumber keybase1.PhoneNumber, code string) error { payload := make(libkb.JSONPayload) payload["phone_number"] = phoneNumber payload["verification_code"] = code arg := libkb.APIArg{ Endpoint: "user/phone_number_verify", JSONPayload: payload, SessionType: l...
[ "func", "VerifyPhoneNumber", "(", "mctx", "libkb", ".", "MetaContext", ",", "phoneNumber", "keybase1", ".", "PhoneNumber", ",", "code", "string", ")", "error", "{", "payload", ":=", "make", "(", "libkb", ".", "JSONPayload", ")", "\n", "payload", "[", "\"", ...
// VerifyPhoneNumber calls API to verify previously added phone number using // verification code.
[ "VerifyPhoneNumber", "calls", "API", "to", "verify", "previously", "added", "phone", "number", "using", "verification", "code", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/phonenumbers/user.go#L29-L42
160,522
keybase/client
go/phonenumbers/user.go
GetPhoneNumbers
func GetPhoneNumbers(mctx libkb.MetaContext) ([]keybase1.UserPhoneNumber, error) { arg := libkb.APIArg{ Endpoint: "user/phone_numbers", SessionType: libkb.APISessionTypeREQUIRED, } var resp phoneNumbersResponse err := mctx.G().API.GetDecode(mctx, arg, &resp) if err != nil { return nil, err } return resp...
go
func GetPhoneNumbers(mctx libkb.MetaContext) ([]keybase1.UserPhoneNumber, error) { arg := libkb.APIArg{ Endpoint: "user/phone_numbers", SessionType: libkb.APISessionTypeREQUIRED, } var resp phoneNumbersResponse err := mctx.G().API.GetDecode(mctx, arg, &resp) if err != nil { return nil, err } return resp...
[ "func", "GetPhoneNumbers", "(", "mctx", "libkb", ".", "MetaContext", ")", "(", "[", "]", "keybase1", ".", "UserPhoneNumber", ",", "error", ")", "{", "arg", ":=", "libkb", ".", "APIArg", "{", "Endpoint", ":", "\"", "\"", ",", "SessionType", ":", "libkb", ...
// GetPhoneNumbers calls API to fetch list of phone numbers attached to // currently logged user.
[ "GetPhoneNumbers", "calls", "API", "to", "fetch", "list", "of", "phone", "numbers", "attached", "to", "currently", "logged", "user", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/phonenumbers/user.go#L51-L62
160,523
keybase/client
go/protocol/keybase1/paperprovision.go
PaperProvision
func (c PaperprovisionClient) PaperProvision(ctx context.Context, __arg PaperProvisionArg) (err error) { err = c.Cli.Call(ctx, "keybase.1.paperprovision.paperProvision", []interface{}{__arg}, nil) return }
go
func (c PaperprovisionClient) PaperProvision(ctx context.Context, __arg PaperProvisionArg) (err error) { err = c.Cli.Call(ctx, "keybase.1.paperprovision.paperProvision", []interface{}{__arg}, nil) return }
[ "func", "(", "c", "PaperprovisionClient", ")", "PaperProvision", "(", "ctx", "context", ".", "Context", ",", "__arg", "PaperProvisionArg", ")", "(", "err", "error", ")", "{", "err", "=", "c", ".", "Cli", ".", "Call", "(", "ctx", ",", "\"", "\"", ",", ...
// Performs paper provision. // If the current device isn't provisioned, this function will // provision it.
[ "Performs", "paper", "provision", ".", "If", "the", "current", "device", "isn", "t", "provisioned", "this", "function", "will", "provision", "it", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/keybase1/paperprovision.go#L55-L58
160,524
keybase/client
go/install/libnativeinstaller/app.go
AppBundleForPath
func AppBundleForPath() (string, error) { path, err := utils.BinPath() if err != nil { return "", err } if path == "" { return "", errors.New("Could not get executable name") } paths := strings.SplitN(path, ".app", 2) // If no match, return "" if len(paths) <= 1 { return "", fmt.Errorf("Unable to resolve ...
go
func AppBundleForPath() (string, error) { path, err := utils.BinPath() if err != nil { return "", err } if path == "" { return "", errors.New("Could not get executable name") } paths := strings.SplitN(path, ".app", 2) // If no match, return "" if len(paths) <= 1 { return "", fmt.Errorf("Unable to resolve ...
[ "func", "AppBundleForPath", "(", ")", "(", "string", ",", "error", ")", "{", "path", ",", "err", ":=", "utils", ".", "BinPath", "(", ")", "\n", "if", "err", "!=", "nil", "{", "return", "\"", "\"", ",", "err", "\n", "}", "\n", "if", "path", "==", ...
// AppBundleForPath returns path to app bundle
[ "AppBundleForPath", "returns", "path", "to", "app", "bundle" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/install/libnativeinstaller/app.go#L38-L58
160,525
keybase/client
go/kbfs/libkbfs/reporter_kbpki.go
NewReporterKBPKI
func NewReporterKBPKI(config Config, maxErrors, bufSize int) *ReporterKBPKI { log := config.MakeLogger("") r := &ReporterKBPKI{ ReporterSimple: NewReporterSimple(config.Clock(), maxErrors), config: config, log: log, vlog: config.MakeVLogger(log)...
go
func NewReporterKBPKI(config Config, maxErrors, bufSize int) *ReporterKBPKI { log := config.MakeLogger("") r := &ReporterKBPKI{ ReporterSimple: NewReporterSimple(config.Clock(), maxErrors), config: config, log: log, vlog: config.MakeVLogger(log)...
[ "func", "NewReporterKBPKI", "(", "config", "Config", ",", "maxErrors", ",", "bufSize", "int", ")", "*", "ReporterKBPKI", "{", "log", ":=", "config", ".", "MakeLogger", "(", "\"", "\"", ")", "\n", "r", ":=", "&", "ReporterKBPKI", "{", "ReporterSimple", ":",...
// NewReporterKBPKI creates a new ReporterKBPKI.
[ "NewReporterKBPKI", "creates", "a", "new", "ReporterKBPKI", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/reporter_kbpki.go#L99-L117
160,526
keybase/client
go/kbfs/libkbfs/reporter_kbpki.go
NotifyOverallSyncStatus
func (r *ReporterKBPKI) NotifyOverallSyncStatus( ctx context.Context, status keybase1.FolderSyncStatus) { select { case r.notifyOverallSyncBuffer <- status: default: // If this represents a "complete" status, we can't drop it. // Instead launch a goroutine to make sure it gets sent // eventually. if status....
go
func (r *ReporterKBPKI) NotifyOverallSyncStatus( ctx context.Context, status keybase1.FolderSyncStatus) { select { case r.notifyOverallSyncBuffer <- status: default: // If this represents a "complete" status, we can't drop it. // Instead launch a goroutine to make sure it gets sent // eventually. if status....
[ "func", "(", "r", "*", "ReporterKBPKI", ")", "NotifyOverallSyncStatus", "(", "ctx", "context", ".", "Context", ",", "status", "keybase1", ".", "FolderSyncStatus", ")", "{", "select", "{", "case", "r", ".", "notifyOverallSyncBuffer", "<-", "status", ":", "defau...
// NotifyOverallSyncStatus implements the Reporter interface for ReporterKBPKI.
[ "NotifyOverallSyncStatus", "implements", "the", "Reporter", "interface", "for", "ReporterKBPKI", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/reporter_kbpki.go#L284-L306
160,527
keybase/client
go/kbfs/libkbfs/reporter_kbpki.go
Shutdown
func (r *ReporterKBPKI) Shutdown() { r.canceler() close(r.shutdownCh) close(r.notifyBuffer) close(r.onlineStatusBuffer) close(r.notifySyncBuffer) close(r.notifyOverallSyncBuffer) }
go
func (r *ReporterKBPKI) Shutdown() { r.canceler() close(r.shutdownCh) close(r.notifyBuffer) close(r.onlineStatusBuffer) close(r.notifySyncBuffer) close(r.notifyOverallSyncBuffer) }
[ "func", "(", "r", "*", "ReporterKBPKI", ")", "Shutdown", "(", ")", "{", "r", ".", "canceler", "(", ")", "\n", "close", "(", "r", ".", "shutdownCh", ")", "\n", "close", "(", "r", ".", "notifyBuffer", ")", "\n", "close", "(", "r", ".", "onlineStatusB...
// Shutdown implements the Reporter interface for ReporterKBPKI.
[ "Shutdown", "implements", "the", "Reporter", "interface", "for", "ReporterKBPKI", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/reporter_kbpki.go#L309-L316
160,528
keybase/client
go/kbfs/libkbfs/reporter_kbpki.go
send
func (r *ReporterKBPKI) send(ctx context.Context) { sendTicker := time.NewTicker(reporterSendInterval) defer sendTicker.Stop() for { select { case notification, ok := <-r.notifyBuffer: if !ok { return } nt := notification.NotificationType st := notification.StatusCode // Only these notificati...
go
func (r *ReporterKBPKI) send(ctx context.Context) { sendTicker := time.NewTicker(reporterSendInterval) defer sendTicker.Stop() for { select { case notification, ok := <-r.notifyBuffer: if !ok { return } nt := notification.NotificationType st := notification.StatusCode // Only these notificati...
[ "func", "(", "r", "*", "ReporterKBPKI", ")", "send", "(", "ctx", "context", ".", "Context", ")", "{", "sendTicker", ":=", "time", ".", "NewTicker", "(", "reporterSendInterval", ")", "\n", "defer", "sendTicker", ".", "Stop", "(", ")", "\n\n", "for", "{", ...
// send takes notifications out of notifyBuffer, notifyPathBuffer, and // notifySyncBuffer and sends them to the keybase daemon.
[ "send", "takes", "notifications", "out", "of", "notifyBuffer", "notifyPathBuffer", "and", "notifySyncBuffer", "and", "sends", "them", "to", "the", "keybase", "daemon", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/reporter_kbpki.go#L322-L400
160,529
keybase/client
go/kbfs/libkbfs/reporter_kbpki.go
writeNotification
func writeNotification(file data.Path, finish bool) *keybase1.FSNotification { n := baseNotification(file, finish) if file.Tlf.Type() == tlf.Public { n.NotificationType = keybase1.FSNotificationType_SIGNING } else { n.NotificationType = keybase1.FSNotificationType_ENCRYPTING } return n }
go
func writeNotification(file data.Path, finish bool) *keybase1.FSNotification { n := baseNotification(file, finish) if file.Tlf.Type() == tlf.Public { n.NotificationType = keybase1.FSNotificationType_SIGNING } else { n.NotificationType = keybase1.FSNotificationType_ENCRYPTING } return n }
[ "func", "writeNotification", "(", "file", "data", ".", "Path", ",", "finish", "bool", ")", "*", "keybase1", ".", "FSNotification", "{", "n", ":=", "baseNotification", "(", "file", ",", "finish", ")", "\n", "if", "file", ".", "Tlf", ".", "Type", "(", ")...
// writeNotification creates FSNotifications from paths for file // write events.
[ "writeNotification", "creates", "FSNotifications", "from", "paths", "for", "file", "write", "events", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/reporter_kbpki.go#L404-L412
160,530
keybase/client
go/kbfs/libkbfs/reporter_kbpki.go
readNotification
func readNotification(file data.Path, finish bool) *keybase1.FSNotification { n := baseNotification(file, finish) if file.Tlf.Type() == tlf.Public { n.NotificationType = keybase1.FSNotificationType_VERIFYING } else { n.NotificationType = keybase1.FSNotificationType_DECRYPTING } return n }
go
func readNotification(file data.Path, finish bool) *keybase1.FSNotification { n := baseNotification(file, finish) if file.Tlf.Type() == tlf.Public { n.NotificationType = keybase1.FSNotificationType_VERIFYING } else { n.NotificationType = keybase1.FSNotificationType_DECRYPTING } return n }
[ "func", "readNotification", "(", "file", "data", ".", "Path", ",", "finish", "bool", ")", "*", "keybase1", ".", "FSNotification", "{", "n", ":=", "baseNotification", "(", "file", ",", "finish", ")", "\n", "if", "file", ".", "Tlf", ".", "Type", "(", ")"...
// readNotification creates FSNotifications from paths for file // read events.
[ "readNotification", "creates", "FSNotifications", "from", "paths", "for", "file", "read", "events", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/reporter_kbpki.go#L416-L424
160,531
keybase/client
go/kbfs/libkbfs/reporter_kbpki.go
rekeyNotification
func rekeyNotification(ctx context.Context, config Config, handle *tlfhandle.Handle, finish bool) *keybase1.FSNotification { code := keybase1.FSStatusCode_START if finish { code = keybase1.FSStatusCode_FINISH } return &keybase1.FSNotification{ FolderType: handle.Type().FolderType(), Filename: s...
go
func rekeyNotification(ctx context.Context, config Config, handle *tlfhandle.Handle, finish bool) *keybase1.FSNotification { code := keybase1.FSStatusCode_START if finish { code = keybase1.FSStatusCode_FINISH } return &keybase1.FSNotification{ FolderType: handle.Type().FolderType(), Filename: s...
[ "func", "rekeyNotification", "(", "ctx", "context", ".", "Context", ",", "config", "Config", ",", "handle", "*", "tlfhandle", ".", "Handle", ",", "finish", "bool", ")", "*", "keybase1", ".", "FSNotification", "{", "code", ":=", "keybase1", ".", "FSStatusCode...
// rekeyNotification creates FSNotifications from TlfHandles for rekey // events.
[ "rekeyNotification", "creates", "FSNotifications", "from", "TlfHandles", "for", "rekey", "events", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/reporter_kbpki.go#L428-L440
160,532
keybase/client
go/kbfs/libkbfs/reporter_kbpki.go
fileCreateNotification
func fileCreateNotification(file data.Path, writer keybase1.UID, localTime time.Time) *keybase1.FSNotification { n := baseFileEditNotification(file, writer, localTime) n.NotificationType = keybase1.FSNotificationType_FILE_CREATED return n }
go
func fileCreateNotification(file data.Path, writer keybase1.UID, localTime time.Time) *keybase1.FSNotification { n := baseFileEditNotification(file, writer, localTime) n.NotificationType = keybase1.FSNotificationType_FILE_CREATED return n }
[ "func", "fileCreateNotification", "(", "file", "data", ".", "Path", ",", "writer", "keybase1", ".", "UID", ",", "localTime", "time", ".", "Time", ")", "*", "keybase1", ".", "FSNotification", "{", "n", ":=", "baseFileEditNotification", "(", "file", ",", "writ...
// fileCreateNotification creates FSNotifications from paths for file // create events.
[ "fileCreateNotification", "creates", "FSNotifications", "from", "paths", "for", "file", "create", "events", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/reporter_kbpki.go#L452-L457
160,533
keybase/client
go/kbfs/libkbfs/reporter_kbpki.go
fileModifyNotification
func fileModifyNotification(file data.Path, writer keybase1.UID, localTime time.Time) *keybase1.FSNotification { n := baseFileEditNotification(file, writer, localTime) n.NotificationType = keybase1.FSNotificationType_FILE_MODIFIED return n }
go
func fileModifyNotification(file data.Path, writer keybase1.UID, localTime time.Time) *keybase1.FSNotification { n := baseFileEditNotification(file, writer, localTime) n.NotificationType = keybase1.FSNotificationType_FILE_MODIFIED return n }
[ "func", "fileModifyNotification", "(", "file", "data", ".", "Path", ",", "writer", "keybase1", ".", "UID", ",", "localTime", "time", ".", "Time", ")", "*", "keybase1", ".", "FSNotification", "{", "n", ":=", "baseFileEditNotification", "(", "file", ",", "writ...
// fileModifyNotification creates FSNotifications from paths for file // modification events.
[ "fileModifyNotification", "creates", "FSNotifications", "from", "paths", "for", "file", "modification", "events", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/reporter_kbpki.go#L461-L466
160,534
keybase/client
go/kbfs/libkbfs/reporter_kbpki.go
fileDeleteNotification
func fileDeleteNotification(file data.Path, writer keybase1.UID, localTime time.Time) *keybase1.FSNotification { n := baseFileEditNotification(file, writer, localTime) n.NotificationType = keybase1.FSNotificationType_FILE_DELETED return n }
go
func fileDeleteNotification(file data.Path, writer keybase1.UID, localTime time.Time) *keybase1.FSNotification { n := baseFileEditNotification(file, writer, localTime) n.NotificationType = keybase1.FSNotificationType_FILE_DELETED return n }
[ "func", "fileDeleteNotification", "(", "file", "data", ".", "Path", ",", "writer", "keybase1", ".", "UID", ",", "localTime", "time", ".", "Time", ")", "*", "keybase1", ".", "FSNotification", "{", "n", ":=", "baseFileEditNotification", "(", "file", ",", "writ...
// fileDeleteNotification creates FSNotifications from paths for file // delete events.
[ "fileDeleteNotification", "creates", "FSNotifications", "from", "paths", "for", "file", "delete", "events", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/reporter_kbpki.go#L470-L475
160,535
keybase/client
go/kbfs/libkbfs/reporter_kbpki.go
fileRenameNotification
func fileRenameNotification(oldFile data.Path, newFile data.Path, writer keybase1.UID, localTime time.Time) *keybase1.FSNotification { n := baseFileEditNotification(newFile, writer, localTime) n.NotificationType = keybase1.FSNotificationType_FILE_RENAMED n.Params = map[string]string{errorParamRenameOldFilename: old...
go
func fileRenameNotification(oldFile data.Path, newFile data.Path, writer keybase1.UID, localTime time.Time) *keybase1.FSNotification { n := baseFileEditNotification(newFile, writer, localTime) n.NotificationType = keybase1.FSNotificationType_FILE_RENAMED n.Params = map[string]string{errorParamRenameOldFilename: old...
[ "func", "fileRenameNotification", "(", "oldFile", "data", ".", "Path", ",", "newFile", "data", ".", "Path", ",", "writer", "keybase1", ".", "UID", ",", "localTime", "time", ".", "Time", ")", "*", "keybase1", ".", "FSNotification", "{", "n", ":=", "baseFile...
// fileRenameNotification creates FSNotifications from paths for file // rename events.
[ "fileRenameNotification", "creates", "FSNotifications", "from", "paths", "for", "file", "rename", "events", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/reporter_kbpki.go#L479-L485
160,536
keybase/client
go/kbfs/libkbfs/reporter_kbpki.go
connectionNotification
func connectionNotification(status keybase1.FSStatusCode) *keybase1.FSNotification { // TODO finish placeholder return &keybase1.FSNotification{ NotificationType: keybase1.FSNotificationType_CONNECTION, StatusCode: status, } }
go
func connectionNotification(status keybase1.FSStatusCode) *keybase1.FSNotification { // TODO finish placeholder return &keybase1.FSNotification{ NotificationType: keybase1.FSNotificationType_CONNECTION, StatusCode: status, } }
[ "func", "connectionNotification", "(", "status", "keybase1", ".", "FSStatusCode", ")", "*", "keybase1", ".", "FSNotification", "{", "// TODO finish placeholder", "return", "&", "keybase1", ".", "FSNotification", "{", "NotificationType", ":", "keybase1", ".", "FSNotifi...
// connectionNotification creates FSNotifications based on whether // or not KBFS is online.
[ "connectionNotification", "creates", "FSNotifications", "based", "on", "whether", "or", "not", "KBFS", "is", "online", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/reporter_kbpki.go#L489-L495
160,537
keybase/client
go/kbfs/libkbfs/reporter_kbpki.go
baseNotification
func baseNotification(file data.Path, finish bool) *keybase1.FSNotification { code := keybase1.FSStatusCode_START if finish { code = keybase1.FSStatusCode_FINISH } return &keybase1.FSNotification{ Filename: file.CanonicalPathString(), StatusCode: code, } }
go
func baseNotification(file data.Path, finish bool) *keybase1.FSNotification { code := keybase1.FSStatusCode_START if finish { code = keybase1.FSStatusCode_FINISH } return &keybase1.FSNotification{ Filename: file.CanonicalPathString(), StatusCode: code, } }
[ "func", "baseNotification", "(", "file", "data", ".", "Path", ",", "finish", "bool", ")", "*", "keybase1", ".", "FSNotification", "{", "code", ":=", "keybase1", ".", "FSStatusCode_START", "\n", "if", "finish", "{", "code", "=", "keybase1", ".", "FSStatusCode...
// baseNotification creates a basic FSNotification without a // NotificationType from a path.
[ "baseNotification", "creates", "a", "basic", "FSNotification", "without", "a", "NotificationType", "from", "a", "path", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/reporter_kbpki.go#L499-L509
160,538
keybase/client
go/kbfs/libkbfs/reporter_kbpki.go
errorNotification
func errorNotification(err error, errType keybase1.FSErrorType, tlfName tlf.CanonicalName, t tlf.Type, mode ErrorModeType, filename string, params map[string]string) *keybase1.FSNotification { if tlfName != "" { params[errorParamTlf] = string(tlfName) } var nType keybase1.FSNotificationType switch mode { case ...
go
func errorNotification(err error, errType keybase1.FSErrorType, tlfName tlf.CanonicalName, t tlf.Type, mode ErrorModeType, filename string, params map[string]string) *keybase1.FSNotification { if tlfName != "" { params[errorParamTlf] = string(tlfName) } var nType keybase1.FSNotificationType switch mode { case ...
[ "func", "errorNotification", "(", "err", "error", ",", "errType", "keybase1", ".", "FSErrorType", ",", "tlfName", "tlf", ".", "CanonicalName", ",", "t", "tlf", ".", "Type", ",", "mode", "ErrorModeType", ",", "filename", "string", ",", "params", "map", "[", ...
// errorNotification creates FSNotifications for errors.
[ "errorNotification", "creates", "FSNotifications", "for", "errors", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/reporter_kbpki.go#L512-L546
160,539
keybase/client
go/chat/keyfinder.go
NewKeyFinder
func NewKeyFinder(g *globals.Context) types.KeyFinder { return &KeyFinderImpl{ Contextified: globals.NewContextified(g), DebugLabeler: utils.NewDebugLabeler(g.GetLog(), "KeyFinder", false), keys: make(map[string]*types.NameInfo), decKeys: make(map[string]types.CryptKey), encKeys: make(map[s...
go
func NewKeyFinder(g *globals.Context) types.KeyFinder { return &KeyFinderImpl{ Contextified: globals.NewContextified(g), DebugLabeler: utils.NewDebugLabeler(g.GetLog(), "KeyFinder", false), keys: make(map[string]*types.NameInfo), decKeys: make(map[string]types.CryptKey), encKeys: make(map[s...
[ "func", "NewKeyFinder", "(", "g", "*", "globals", ".", "Context", ")", "types", ".", "KeyFinder", "{", "return", "&", "KeyFinderImpl", "{", "Contextified", ":", "globals", ".", "NewContextified", "(", "g", ")", ",", "DebugLabeler", ":", "utils", ".", "NewD...
// NewKeyFinder creates a KeyFinder.
[ "NewKeyFinder", "creates", "a", "KeyFinder", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/chat/keyfinder.go#L34-L42
160,540
keybase/client
go/chat/keyfinder.go
FindForEncryption
func (k *KeyFinderImpl) FindForEncryption(ctx context.Context, tlfName string, tlfID chat1.TLFID, membersType chat1.ConversationMembersType, public bool) (res types.CryptKey, ni types.NameInfo, err error) { ckey := k.encCacheKey(tlfName, tlfID, membersType, public) existing, ok := k.lookupEncKey(ckey) if ok { re...
go
func (k *KeyFinderImpl) FindForEncryption(ctx context.Context, tlfName string, tlfID chat1.TLFID, membersType chat1.ConversationMembersType, public bool) (res types.CryptKey, ni types.NameInfo, err error) { ckey := k.encCacheKey(tlfName, tlfID, membersType, public) existing, ok := k.lookupEncKey(ckey) if ok { re...
[ "func", "(", "k", "*", "KeyFinderImpl", ")", "FindForEncryption", "(", "ctx", "context", ".", "Context", ",", "tlfName", "string", ",", "tlfID", "chat1", ".", "TLFID", ",", "membersType", "chat1", ".", "ConversationMembersType", ",", "public", "bool", ")", "...
// FindForEncryption finds keys up-to-date enough for encrypting. // Ignores tlfName or teamID based on membersType.
[ "FindForEncryption", "finds", "keys", "up", "-", "to", "-", "date", "enough", "for", "encrypting", ".", "Ignores", "tlfName", "or", "teamID", "based", "on", "membersType", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/chat/keyfinder.go#L110-L129
160,541
keybase/client
go/chat/keyfinder.go
FindForDecryption
func (k *KeyFinderImpl) FindForDecryption(ctx context.Context, tlfName string, tlfID chat1.TLFID, membersType chat1.ConversationMembersType, public bool, keyGeneration int, kbfsEncrypted bool) (res types.CryptKey, err error) { ckey := k.decCacheKey(tlfName, tlfID, membersType, keyGeneration, public, kbfsEncrypted) ...
go
func (k *KeyFinderImpl) FindForDecryption(ctx context.Context, tlfName string, tlfID chat1.TLFID, membersType chat1.ConversationMembersType, public bool, keyGeneration int, kbfsEncrypted bool) (res types.CryptKey, err error) { ckey := k.decCacheKey(tlfName, tlfID, membersType, keyGeneration, public, kbfsEncrypted) ...
[ "func", "(", "k", "*", "KeyFinderImpl", ")", "FindForDecryption", "(", "ctx", "context", ".", "Context", ",", "tlfName", "string", ",", "tlfID", "chat1", ".", "TLFID", ",", "membersType", "chat1", ".", "ConversationMembersType", ",", "public", "bool", ",", "...
// FindForDecryption ignores tlfName or teamID based on membersType.
[ "FindForDecryption", "ignores", "tlfName", "or", "teamID", "based", "on", "membersType", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/chat/keyfinder.go#L132-L148
160,542
keybase/client
go/chat/signencrypt/seeker.go
getChunksFromCache
func (r *decodingReadSeeker) getChunksFromCache(chunks []chunkSpec) (res []byte, ok bool) { for _, c := range chunks { if pt, ok := r.chunks.Get(c.index); ok { res = append(res, pt.([]byte)...) r.Debug(r.ctx, "getChunksFromCache: added: index: %d len: %v", c.index, len(pt.([]byte))) } else { r.Debug(r.ctx...
go
func (r *decodingReadSeeker) getChunksFromCache(chunks []chunkSpec) (res []byte, ok bool) { for _, c := range chunks { if pt, ok := r.chunks.Get(c.index); ok { res = append(res, pt.([]byte)...) r.Debug(r.ctx, "getChunksFromCache: added: index: %d len: %v", c.index, len(pt.([]byte))) } else { r.Debug(r.ctx...
[ "func", "(", "r", "*", "decodingReadSeeker", ")", "getChunksFromCache", "(", "chunks", "[", "]", "chunkSpec", ")", "(", "res", "[", "]", "byte", ",", "ok", "bool", ")", "{", "for", "_", ",", "c", ":=", "range", "chunks", "{", "if", "pt", ",", "ok",...
// getChunksFromCache returns the plaintext bytes for a set of chunks iff we have each chunk // in our cache
[ "getChunksFromCache", "returns", "the", "plaintext", "bytes", "for", "a", "set", "of", "chunks", "iff", "we", "have", "each", "chunk", "in", "our", "cache" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/chat/signencrypt/seeker.go#L51-L62
160,543
keybase/client
go/chat/signencrypt/seeker.go
getReadaheadFactor
func (r *decodingReadSeeker) getReadaheadFactor() int64 { mb := int64(1 << 20) switch { case r.size >= 1000*mb: return 16 case r.size >= 500*mb: return 8 default: return 4 } }
go
func (r *decodingReadSeeker) getReadaheadFactor() int64 { mb := int64(1 << 20) switch { case r.size >= 1000*mb: return 16 case r.size >= 500*mb: return 8 default: return 4 } }
[ "func", "(", "r", "*", "decodingReadSeeker", ")", "getReadaheadFactor", "(", ")", "int64", "{", "mb", ":=", "int64", "(", "1", "<<", "20", ")", "\n", "switch", "{", "case", "r", ".", "size", ">=", "1000", "*", "mb", ":", "return", "16", "\n", "case...
// getReadaheadFactor gives the number of chunks we should read at minimum from the source. For larger // files we try to read more so we don't make too many underlying requests.
[ "getReadaheadFactor", "gives", "the", "number", "of", "chunks", "we", "should", "read", "at", "minimum", "from", "the", "source", ".", "For", "larger", "files", "we", "try", "to", "read", "more", "so", "we", "don", "t", "make", "too", "many", "underlying",...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/chat/signencrypt/seeker.go#L116-L126
160,544
keybase/client
go/ephemeral/device_ek_storage.go
ekLogf
func (s *DeviceEKStorage) ekLogf(mctx libkb.MetaContext, format string, args ...interface{}) { mctx.Debug(format, args...) if s.logger != nil { s.logger.Printf(format, args...) } }
go
func (s *DeviceEKStorage) ekLogf(mctx libkb.MetaContext, format string, args ...interface{}) { mctx.Debug(format, args...) if s.logger != nil { s.logger.Printf(format, args...) } }
[ "func", "(", "s", "*", "DeviceEKStorage", ")", "ekLogf", "(", "mctx", "libkb", ".", "MetaContext", ",", "format", "string", ",", "args", "...", "interface", "{", "}", ")", "{", "mctx", ".", "Debug", "(", "format", ",", "args", "...", ")", "\n", "if",...
// Log sensitive deletion actions to a separate log file so we don't lose the // logs during normal rotation.
[ "Log", "sensitive", "deletion", "actions", "to", "a", "separate", "log", "file", "so", "we", "don", "t", "lose", "the", "logs", "during", "normal", "rotation", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/ephemeral/device_ek_storage.go#L116-L121
160,545
keybase/client
go/ephemeral/device_ek_storage.go
keyToEldestSeqno
func (s *DeviceEKStorage) keyToEldestSeqno(mctx libkb.MetaContext, key string) keybase1.Seqno { if !strings.HasPrefix(key, deviceEKPrefix) { return -1 } parts := strings.Split(key, "-") if len(parts) != 4 { return -1 } // Make sure this key is for our current user and not a different one. username := mctx.Ac...
go
func (s *DeviceEKStorage) keyToEldestSeqno(mctx libkb.MetaContext, key string) keybase1.Seqno { if !strings.HasPrefix(key, deviceEKPrefix) { return -1 } parts := strings.Split(key, "-") if len(parts) != 4 { return -1 } // Make sure this key is for our current user and not a different one. username := mctx.Ac...
[ "func", "(", "s", "*", "DeviceEKStorage", ")", "keyToEldestSeqno", "(", "mctx", "libkb", ".", "MetaContext", ",", "key", "string", ")", "keybase1", ".", "Seqno", "{", "if", "!", "strings", ".", "HasPrefix", "(", "key", ",", "deviceEKPrefix", ")", "{", "r...
// keyToEldestSeqno parses out the `eldestSeqno` from a key of the form // deviceEKPrefix-username-eldestSeqno-generation.ek. If we have a key for a // eldestSeqno that is not our current, we purge it since we don't want the // ephemeral key to stick around if we've reset. If we are unable to parse out // the value, th...
[ "keyToEldestSeqno", "parses", "out", "the", "eldestSeqno", "from", "a", "key", "of", "the", "form", "deviceEKPrefix", "-", "username", "-", "eldestSeqno", "-", "generation", ".", "ek", ".", "If", "we", "have", "a", "key", "for", "a", "eldestSeqno", "that", ...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/ephemeral/device_ek_storage.go#L156-L174
160,546
keybase/client
go/ephemeral/device_ek_storage.go
keyToGeneration
func (s *DeviceEKStorage) keyToGeneration(mctx libkb.MetaContext, key string) keybase1.EkGeneration { prefix, err := s.keyPrefix(mctx) if err != nil { mctx.Debug("keyToGeneration: unable to get keyPrefix: %v", err) return -1 } if !strings.HasPrefix(key, prefix) || !strings.HasSuffix(key, deviceEKSuffix) { mct...
go
func (s *DeviceEKStorage) keyToGeneration(mctx libkb.MetaContext, key string) keybase1.EkGeneration { prefix, err := s.keyPrefix(mctx) if err != nil { mctx.Debug("keyToGeneration: unable to get keyPrefix: %v", err) return -1 } if !strings.HasPrefix(key, prefix) || !strings.HasSuffix(key, deviceEKSuffix) { mct...
[ "func", "(", "s", "*", "DeviceEKStorage", ")", "keyToGeneration", "(", "mctx", "libkb", ".", "MetaContext", ",", "key", "string", ")", "keybase1", ".", "EkGeneration", "{", "prefix", ",", "err", ":=", "s", ".", "keyPrefix", "(", "mctx", ")", "\n", "if", ...
// keyToEldestSeqno parses out the `generation` from a key of the form // deviceEKPrefix-username-eldestSeqno-generation.ek. Unparseable keys return a // generation of -1 and should be ignored.
[ "keyToEldestSeqno", "parses", "out", "the", "generation", "from", "a", "key", "of", "the", "form", "deviceEKPrefix", "-", "username", "-", "eldestSeqno", "-", "generation", ".", "ek", ".", "Unparseable", "keys", "return", "a", "generation", "of", "-", "1", "...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/ephemeral/device_ek_storage.go#L179-L202
160,547
keybase/client
go/ephemeral/device_ek_storage.go
ListAllForUser
func (s *DeviceEKStorage) ListAllForUser(mctx libkb.MetaContext) (all []string, err error) { defer mctx.TraceTimed("DeviceEKStorage#ListAllForUser", func() error { return err })() s.Lock() defer s.Unlock() return s.listAllForUser(mctx, mctx.ActiveDevice().Username(mctx)) }
go
func (s *DeviceEKStorage) ListAllForUser(mctx libkb.MetaContext) (all []string, err error) { defer mctx.TraceTimed("DeviceEKStorage#ListAllForUser", func() error { return err })() s.Lock() defer s.Unlock() return s.listAllForUser(mctx, mctx.ActiveDevice().Username(mctx)) }
[ "func", "(", "s", "*", "DeviceEKStorage", ")", "ListAllForUser", "(", "mctx", "libkb", ".", "MetaContext", ")", "(", "all", "[", "]", "string", ",", "err", "error", ")", "{", "defer", "mctx", ".", "TraceTimed", "(", "\"", "\"", ",", "func", "(", ")",...
// ListAllForUser lists the internal storage name of deviceEKs of the logged in // user. This is used for logsend purposes to debug ek state.
[ "ListAllForUser", "lists", "the", "internal", "storage", "name", "of", "deviceEKs", "of", "the", "logged", "in", "user", ".", "This", "is", "used", "for", "logsend", "purposes", "to", "debug", "ek", "state", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/ephemeral/device_ek_storage.go#L410-L417
160,548
keybase/client
go/kbfs/libfs/util.go
RecursiveDelete
func RecursiveDelete( ctx context.Context, fs billy.Filesystem, fi os.FileInfo) error { select { case <-ctx.Done(): return ctx.Err() default: } if !fi.IsDir() { // Delete regular files and symlinks directly. return fs.Remove(fi.Name()) } subdirFS, err := fs.Chroot(fi.Name()) if err != nil { return er...
go
func RecursiveDelete( ctx context.Context, fs billy.Filesystem, fi os.FileInfo) error { select { case <-ctx.Done(): return ctx.Err() default: } if !fi.IsDir() { // Delete regular files and symlinks directly. return fs.Remove(fi.Name()) } subdirFS, err := fs.Chroot(fi.Name()) if err != nil { return er...
[ "func", "RecursiveDelete", "(", "ctx", "context", ".", "Context", ",", "fs", "billy", ".", "Filesystem", ",", "fi", "os", ".", "FileInfo", ")", "error", "{", "select", "{", "case", "<-", "ctx", ".", "Done", "(", ")", ":", "return", "ctx", ".", "Err",...
// RecursiveDelete deletes the given entry from the given filesystem. // If it's a directory, first all the items in the directory are // deleted recursively.
[ "RecursiveDelete", "deletes", "the", "given", "entry", "from", "the", "given", "filesystem", ".", "If", "it", "s", "a", "directory", "first", "all", "the", "items", "in", "the", "directory", "are", "deleted", "recursively", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libfs/util.go#L17-L50
160,549
keybase/client
go/kbnm/main.go
process
func process(h *handler, in nativemessaging.JSONDecoder, out nativemessaging.JSONEncoder) error { var resp Response var req Request // If input fails to parse, we can't guarantee future inputs will // get into a parseable state so we abort after sending an error // response. abortErr := in.Decode(&req) var err...
go
func process(h *handler, in nativemessaging.JSONDecoder, out nativemessaging.JSONEncoder) error { var resp Response var req Request // If input fails to parse, we can't guarantee future inputs will // get into a parseable state so we abort after sending an error // response. abortErr := in.Decode(&req) var err...
[ "func", "process", "(", "h", "*", "handler", ",", "in", "nativemessaging", ".", "JSONDecoder", ",", "out", "nativemessaging", ".", "JSONEncoder", ")", "error", "{", "var", "resp", "Response", "\n", "var", "req", "Request", "\n\n", "// If input fails to parse, we...
// process consumes a single message
[ "process", "consumes", "a", "single", "message" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbnm/main.go#L41-L75
160,550
keybase/client
go/kbfs/libgit/init.go
Params
func Params(kbCtx libkbfs.Context, storageRoot string, paramsBase *libkbfs.InitParams) ( params libkbfs.InitParams, tempDir string, err error) { tempDir, err = ioutil.TempDir(storageRoot, libkbfs.GitStorageRootPrefix) if err != nil { return libkbfs.InitParams{}, "", err } if paramsBase != nil { params = *par...
go
func Params(kbCtx libkbfs.Context, storageRoot string, paramsBase *libkbfs.InitParams) ( params libkbfs.InitParams, tempDir string, err error) { tempDir, err = ioutil.TempDir(storageRoot, libkbfs.GitStorageRootPrefix) if err != nil { return libkbfs.InitParams{}, "", err } if paramsBase != nil { params = *par...
[ "func", "Params", "(", "kbCtx", "libkbfs", ".", "Context", ",", "storageRoot", "string", ",", "paramsBase", "*", "libkbfs", ".", "InitParams", ")", "(", "params", "libkbfs", ".", "InitParams", ",", "tempDir", "string", ",", "err", "error", ")", "{", "tempD...
// Params returns a set of default parameters for git-related // operations, along with a temp directory that should be cleaned // after the git work is complete.
[ "Params", "returns", "a", "set", "of", "default", "parameters", "for", "git", "-", "related", "operations", "along", "with", "a", "temp", "directory", "that", "should", "be", "cleaned", "after", "the", "git", "work", "is", "complete", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libgit/init.go#L38-L75
160,551
keybase/client
go/kbfs/libgit/init.go
Init
func Init(ctx context.Context, gitKBFSParams libkbfs.InitParams, kbCtx libkbfs.Context, keybaseServiceCn libkbfs.KeybaseServiceCn, defaultLogPath string, vlogLevel string) ( context.Context, libkbfs.Config, error) { log, err := libkbfs.InitLogWithPrefix( gitKBFSParams, kbCtx, "git", defaultLogPath) if err != nil...
go
func Init(ctx context.Context, gitKBFSParams libkbfs.InitParams, kbCtx libkbfs.Context, keybaseServiceCn libkbfs.KeybaseServiceCn, defaultLogPath string, vlogLevel string) ( context.Context, libkbfs.Config, error) { log, err := libkbfs.InitLogWithPrefix( gitKBFSParams, kbCtx, "git", defaultLogPath) if err != nil...
[ "func", "Init", "(", "ctx", "context", ".", "Context", ",", "gitKBFSParams", "libkbfs", ".", "InitParams", ",", "kbCtx", "libkbfs", ".", "Context", ",", "keybaseServiceCn", "libkbfs", ".", "KeybaseServiceCn", ",", "defaultLogPath", "string", ",", "vlogLevel", "s...
// Init initializes a context and a libkbfs.Config for git operations. // The config should be shutdown when it is done being used.
[ "Init", "initializes", "a", "context", "and", "a", "libkbfs", ".", "Config", "for", "git", "operations", ".", "The", "config", "should", "be", "shutdown", "when", "it", "is", "done", "being", "used", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libgit/init.go#L79-L113
160,552
keybase/client
go/kbfs/libfs/profilelist.go
ProfileGet
func ProfileGet(name string) func(context.Context) ([]byte, time.Time, error) { p := pprof.Lookup(name) if p == nil { return nil } // See https://golang.org/pkg/runtime/pprof/#Profile.WriteTo // for the meaning of debug. debug := 1 if name == "goroutine" { debug = 2 } return profileRead(p, debug) }
go
func ProfileGet(name string) func(context.Context) ([]byte, time.Time, error) { p := pprof.Lookup(name) if p == nil { return nil } // See https://golang.org/pkg/runtime/pprof/#Profile.WriteTo // for the meaning of debug. debug := 1 if name == "goroutine" { debug = 2 } return profileRead(p, debug) }
[ "func", "ProfileGet", "(", "name", "string", ")", "func", "(", "context", ".", "Context", ")", "(", "[", "]", "byte", ",", "time", ".", "Time", ",", "error", ")", "{", "p", ":=", "pprof", ".", "Lookup", "(", "name", ")", "\n", "if", "p", "==", ...
// ProfileGet gets the relevant read function for the profile or nil if it doesn't exist.
[ "ProfileGet", "gets", "the", "relevant", "read", "function", "for", "the", "profile", "or", "nil", "if", "it", "doesn", "t", "exist", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libfs/profilelist.go#L21-L34
160,553
keybase/client
go/kbfs/libfs/profilelist.go
profileRead
func profileRead(p *pprof.Profile, debug int) func(context.Context) ([]byte, time.Time, error) { return func(_ context.Context) ([]byte, time.Time, error) { var b bytes.Buffer err := p.WriteTo(&b, debug) if err != nil { return nil, time.Time{}, err } return b.Bytes(), time.Now(), nil } }
go
func profileRead(p *pprof.Profile, debug int) func(context.Context) ([]byte, time.Time, error) { return func(_ context.Context) ([]byte, time.Time, error) { var b bytes.Buffer err := p.WriteTo(&b, debug) if err != nil { return nil, time.Time{}, err } return b.Bytes(), time.Now(), nil } }
[ "func", "profileRead", "(", "p", "*", "pprof", ".", "Profile", ",", "debug", "int", ")", "func", "(", "context", ".", "Context", ")", "(", "[", "]", "byte", ",", "time", ".", "Time", ",", "error", ")", "{", "return", "func", "(", "_", "context", ...
// profileRead reads from a Profile.
[ "profileRead", "reads", "from", "a", "Profile", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libfs/profilelist.go#L37-L47
160,554
keybase/client
go/chat/search/utils.go
tokenize
func tokenize(msgText string) tokenMap { if msgText == "" { return nil } // split the message text up on basic punctuation/spaces tokens := splitExpr.Split(msgText, -1) tokenMap := tokenMap{} for _, token := range tokens { if len(token) < MinTokenLength { continue } token = strings.ToLower(token) i...
go
func tokenize(msgText string) tokenMap { if msgText == "" { return nil } // split the message text up on basic punctuation/spaces tokens := splitExpr.Split(msgText, -1) tokenMap := tokenMap{} for _, token := range tokens { if len(token) < MinTokenLength { continue } token = strings.ToLower(token) i...
[ "func", "tokenize", "(", "msgText", "string", ")", "tokenMap", "{", "if", "msgText", "==", "\"", "\"", "{", "return", "nil", "\n", "}", "\n\n", "// split the message text up on basic punctuation/spaces", "tokens", ":=", "splitExpr", ".", "Split", "(", "msgText", ...
// getIndexTokens splits the content of the given message on whitespace and // special characters returning a map of tokens to aliases normalized to lowercase.
[ "getIndexTokens", "splits", "the", "content", "of", "the", "given", "message", "on", "whitespace", "and", "special", "characters", "returning", "a", "map", "of", "tokens", "to", "aliases", "normalized", "to", "lowercase", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/chat/search/utils.go#L62-L102
160,555
keybase/client
go/chat/search/utils.go
getUIMsgs
func getUIMsgs(ctx context.Context, g *globals.Context, convID chat1.ConversationID, uid gregor1.UID, msgs []chat1.MessageUnboxed) (uiMsgs []chat1.UIMessage) { for i := len(msgs) - 1; i >= 0; i-- { msg := msgs[i] uiMsg := utils.PresentMessageUnboxed(ctx, g, msg, uid, convID) uiMsgs = append(uiMsgs, uiMsg) } r...
go
func getUIMsgs(ctx context.Context, g *globals.Context, convID chat1.ConversationID, uid gregor1.UID, msgs []chat1.MessageUnboxed) (uiMsgs []chat1.UIMessage) { for i := len(msgs) - 1; i >= 0; i-- { msg := msgs[i] uiMsg := utils.PresentMessageUnboxed(ctx, g, msg, uid, convID) uiMsgs = append(uiMsgs, uiMsg) } r...
[ "func", "getUIMsgs", "(", "ctx", "context", ".", "Context", ",", "g", "*", "globals", ".", "Context", ",", "convID", "chat1", ".", "ConversationID", ",", "uid", "gregor1", ".", "UID", ",", "msgs", "[", "]", "chat1", ".", "MessageUnboxed", ")", "(", "ui...
// Order messages ascending by ID for presentation
[ "Order", "messages", "ascending", "by", "ID", "for", "presentation" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/chat/search/utils.go#L145-L153
160,556
keybase/client
go/git/errors.go
HumanizeGitErrors
func HumanizeGitErrors(ctx context.Context, g *libkb.GlobalContext, err error) error { switch e := err.(type) { case libkb.RepoAlreadyExistsError: g.Log.CDebugf(ctx, "replacing error: %v", err) return fmt.Errorf("A repo named %q already exists.", e.ExistingName) case libkb.InvalidRepoNameError: g.Log.CDebugf(c...
go
func HumanizeGitErrors(ctx context.Context, g *libkb.GlobalContext, err error) error { switch e := err.(type) { case libkb.RepoAlreadyExistsError: g.Log.CDebugf(ctx, "replacing error: %v", err) return fmt.Errorf("A repo named %q already exists.", e.ExistingName) case libkb.InvalidRepoNameError: g.Log.CDebugf(c...
[ "func", "HumanizeGitErrors", "(", "ctx", "context", ".", "Context", ",", "g", "*", "libkb", ".", "GlobalContext", ",", "err", "error", ")", "error", "{", "switch", "e", ":=", "err", ".", "(", "type", ")", "{", "case", "libkb", ".", "RepoAlreadyExistsErro...
// For errors that expect, replace them with nice strings for the user. The GUI // will show these directly.
[ "For", "errors", "that", "expect", "replace", "them", "with", "nice", "strings", "for", "the", "user", ".", "The", "GUI", "will", "show", "these", "directly", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/git/errors.go#L12-L23
160,557
keybase/client
go/libkb/passphrase_stream.go
Clone
func (ps *PassphraseStream) Clone() *PassphraseStream { if ps == nil { return nil } arr := make([]byte, len(ps.stream)) copy(arr, ps.stream) return &PassphraseStream{ stream: arr, gen: ps.gen, } }
go
func (ps *PassphraseStream) Clone() *PassphraseStream { if ps == nil { return nil } arr := make([]byte, len(ps.stream)) copy(arr, ps.stream) return &PassphraseStream{ stream: arr, gen: ps.gen, } }
[ "func", "(", "ps", "*", "PassphraseStream", ")", "Clone", "(", ")", "*", "PassphraseStream", "{", "if", "ps", "==", "nil", "{", "return", "nil", "\n", "}", "\n", "arr", ":=", "make", "(", "[", "]", "byte", ",", "len", "(", "ps", ".", "stream", ")...
// Clone a passphrase stream and return a copy.
[ "Clone", "a", "passphrase", "stream", "and", "return", "a", "copy", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/passphrase_stream.go#L136-L146
160,558
keybase/client
go/ephemeral/init.go
NewEphemeralStorageAndInstall
func NewEphemeralStorageAndInstall(mctx libkb.MetaContext) { mctx.G().SetDeviceEKStorage(NewDeviceEKStorage(mctx)) mctx.G().SetUserEKBoxStorage(NewUserEKBoxStorage()) mctx.G().SetTeamEKBoxStorage(NewTeamEKBoxStorage()) ekLib := NewEKLib(mctx) mctx.G().SetEKLib(ekLib) mctx.G().AddLoginHook(ekLib) mctx.G().AddLogo...
go
func NewEphemeralStorageAndInstall(mctx libkb.MetaContext) { mctx.G().SetDeviceEKStorage(NewDeviceEKStorage(mctx)) mctx.G().SetUserEKBoxStorage(NewUserEKBoxStorage()) mctx.G().SetTeamEKBoxStorage(NewTeamEKBoxStorage()) ekLib := NewEKLib(mctx) mctx.G().SetEKLib(ekLib) mctx.G().AddLoginHook(ekLib) mctx.G().AddLogo...
[ "func", "NewEphemeralStorageAndInstall", "(", "mctx", "libkb", ".", "MetaContext", ")", "{", "mctx", ".", "G", "(", ")", ".", "SetDeviceEKStorage", "(", "NewDeviceEKStorage", "(", "mctx", ")", ")", "\n", "mctx", ".", "G", "(", ")", ".", "SetUserEKBoxStorage"...
// Creates a ephemeral key storage and installs it into G.
[ "Creates", "a", "ephemeral", "key", "storage", "and", "installs", "it", "into", "G", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/ephemeral/init.go#L8-L22
160,559
keybase/client
go/kbfs/data/data_types.go
Ref
func (p BlockPointer) Ref() BlockRef { return BlockRef{ ID: p.ID, RefNonce: p.RefNonce, } }
go
func (p BlockPointer) Ref() BlockRef { return BlockRef{ ID: p.ID, RefNonce: p.RefNonce, } }
[ "func", "(", "p", "BlockPointer", ")", "Ref", "(", ")", "BlockRef", "{", "return", "BlockRef", "{", "ID", ":", "p", ".", "ID", ",", "RefNonce", ":", "p", ".", "RefNonce", ",", "}", "\n", "}" ]
// Ref returns the BlockRef equivalent of this pointer.
[ "Ref", "returns", "the", "BlockRef", "equivalent", "of", "this", "pointer", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/data/data_types.go#L209-L214
160,560
keybase/client
go/kbfs/data/data_types.go
EntryInfoFromFileInfo
func EntryInfoFromFileInfo(fi os.FileInfo) EntryInfo { t := File if fi.IsDir() { t = Dir } else if fi.Mode()&os.ModeSymlink != 0 { t = Sym } else if fi.Mode()&0100 != 0 { t = Exec } mtime := fi.ModTime().UnixNano() return EntryInfo{ Type: t, Size: uint64(fi.Size()), // TODO: deal with negatives? Mt...
go
func EntryInfoFromFileInfo(fi os.FileInfo) EntryInfo { t := File if fi.IsDir() { t = Dir } else if fi.Mode()&os.ModeSymlink != 0 { t = Sym } else if fi.Mode()&0100 != 0 { t = Exec } mtime := fi.ModTime().UnixNano() return EntryInfo{ Type: t, Size: uint64(fi.Size()), // TODO: deal with negatives? Mt...
[ "func", "EntryInfoFromFileInfo", "(", "fi", "os", ".", "FileInfo", ")", "EntryInfo", "{", "t", ":=", "File", "\n", "if", "fi", ".", "IsDir", "(", ")", "{", "t", "=", "Dir", "\n", "}", "else", "if", "fi", ".", "Mode", "(", ")", "&", "os", ".", "...
// EntryInfoFromFileInfo converts an `os.FileInfo` into an // `EntryInfo`, to the best of our ability to do so. The caller is // responsible for filling in `EntryInfo.SymPath`, if needed.
[ "EntryInfoFromFileInfo", "converts", "an", "os", ".", "FileInfo", "into", "an", "EntryInfo", "to", "the", "best", "of", "our", "ability", "to", "do", "so", ".", "The", "caller", "is", "responsible", "for", "filling", "in", "EntryInfo", ".", "SymPath", "if", ...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/data/data_types.go#L287-L304
160,561
keybase/client
go/kbfs/data/data_types.go
Eq
func (ei EntryInfo) Eq(other EntryInfo) bool { eq := ei.Type == other.Type && ei.Size == other.Size && ei.SymPath == other.SymPath && ei.Mtime == other.Mtime && ei.Ctime == other.Ctime && ei.TeamWriter == other.TeamWriter && len(ei.PrevRevisions) == len(other.PrevRevisions) if !eq { return false } for...
go
func (ei EntryInfo) Eq(other EntryInfo) bool { eq := ei.Type == other.Type && ei.Size == other.Size && ei.SymPath == other.SymPath && ei.Mtime == other.Mtime && ei.Ctime == other.Ctime && ei.TeamWriter == other.TeamWriter && len(ei.PrevRevisions) == len(other.PrevRevisions) if !eq { return false } for...
[ "func", "(", "ei", "EntryInfo", ")", "Eq", "(", "other", "EntryInfo", ")", "bool", "{", "eq", ":=", "ei", ".", "Type", "==", "other", ".", "Type", "&&", "ei", ".", "Size", "==", "other", ".", "Size", "&&", "ei", ".", "SymPath", "==", "other", "."...
// Eq returns true if `other` is equal to `ei`.
[ "Eq", "returns", "true", "if", "other", "is", "equal", "to", "ei", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/data/data_types.go#L307-L325
160,562
keybase/client
go/kbfs/data/data_types.go
MakeRevBranchName
func MakeRevBranchName(rev kbfsmd.Revision) BranchName { return BranchName(branchRevPrefix + strconv.FormatInt(int64(rev), 10)) }
go
func MakeRevBranchName(rev kbfsmd.Revision) BranchName { return BranchName(branchRevPrefix + strconv.FormatInt(int64(rev), 10)) }
[ "func", "MakeRevBranchName", "(", "rev", "kbfsmd", ".", "Revision", ")", "BranchName", "{", "return", "BranchName", "(", "branchRevPrefix", "+", "strconv", ".", "FormatInt", "(", "int64", "(", "rev", ")", ",", "10", ")", ")", "\n", "}" ]
// MakeRevBranchName returns a branch name specifying an archive // branch pinned to the given revision number.
[ "MakeRevBranchName", "returns", "a", "branch", "name", "specifying", "an", "archive", "branch", "pinned", "to", "the", "given", "revision", "number", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/data/data_types.go#L386-L388
160,563
keybase/client
go/kbfs/data/data_types.go
RevisionIfSpecified
func (bn BranchName) RevisionIfSpecified() (kbfsmd.Revision, bool) { if !bn.IsArchived() { return kbfsmd.RevisionUninitialized, false } i, err := strconv.ParseInt(string(bn[len(branchRevPrefix):]), 10, 64) if err != nil { return kbfsmd.RevisionUninitialized, false } return kbfsmd.Revision(i), true }
go
func (bn BranchName) RevisionIfSpecified() (kbfsmd.Revision, bool) { if !bn.IsArchived() { return kbfsmd.RevisionUninitialized, false } i, err := strconv.ParseInt(string(bn[len(branchRevPrefix):]), 10, 64) if err != nil { return kbfsmd.RevisionUninitialized, false } return kbfsmd.Revision(i), true }
[ "func", "(", "bn", "BranchName", ")", "RevisionIfSpecified", "(", ")", "(", "kbfsmd", ".", "Revision", ",", "bool", ")", "{", "if", "!", "bn", ".", "IsArchived", "(", ")", "{", "return", "kbfsmd", ".", "RevisionUninitialized", ",", "false", "\n", "}", ...
// RevisionIfSpecified returns a valid revision number and true if // `bn` is a revision branch.
[ "RevisionIfSpecified", "returns", "a", "valid", "revision", "number", "and", "true", "if", "bn", "is", "a", "revision", "branch", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/data/data_types.go#L397-L408
160,564
keybase/client
go/kbfs/kbfsmd/key_bundle_cache.go
GetTLFReaderKeyBundle
func (k *KeyBundleCacheStandard) GetTLFReaderKeyBundle( bundleID TLFReaderKeyBundleID) (*TLFReaderKeyBundleV3, error) { if entry, ok := k.cache.Get(bundleID); ok { if rkb, ok := entry.(TLFReaderKeyBundleV3); ok { return &rkb, nil } // Shouldn't be possible. return nil, errors.New("Invalid key bundle type")...
go
func (k *KeyBundleCacheStandard) GetTLFReaderKeyBundle( bundleID TLFReaderKeyBundleID) (*TLFReaderKeyBundleV3, error) { if entry, ok := k.cache.Get(bundleID); ok { if rkb, ok := entry.(TLFReaderKeyBundleV3); ok { return &rkb, nil } // Shouldn't be possible. return nil, errors.New("Invalid key bundle type")...
[ "func", "(", "k", "*", "KeyBundleCacheStandard", ")", "GetTLFReaderKeyBundle", "(", "bundleID", "TLFReaderKeyBundleID", ")", "(", "*", "TLFReaderKeyBundleV3", ",", "error", ")", "{", "if", "entry", ",", "ok", ":=", "k", ".", "cache", ".", "Get", "(", "bundle...
// GetTLFReaderKeyBundle implements the KeyBundleCache interface for KeyBundleCacheStandard.
[ "GetTLFReaderKeyBundle", "implements", "the", "KeyBundleCache", "interface", "for", "KeyBundleCacheStandard", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfsmd/key_bundle_cache.go#L47-L57
160,565
keybase/client
go/kbfs/kbfsmd/key_bundle_cache.go
GetTLFWriterKeyBundle
func (k *KeyBundleCacheStandard) GetTLFWriterKeyBundle( bundleID TLFWriterKeyBundleID) (*TLFWriterKeyBundleV3, error) { if entry, ok := k.cache.Get(bundleID); ok { if wkb, ok := entry.(TLFWriterKeyBundleV3); ok { return &wkb, nil } // Shouldn't be possible. return nil, errors.New("Invalid key bundle type")...
go
func (k *KeyBundleCacheStandard) GetTLFWriterKeyBundle( bundleID TLFWriterKeyBundleID) (*TLFWriterKeyBundleV3, error) { if entry, ok := k.cache.Get(bundleID); ok { if wkb, ok := entry.(TLFWriterKeyBundleV3); ok { return &wkb, nil } // Shouldn't be possible. return nil, errors.New("Invalid key bundle type")...
[ "func", "(", "k", "*", "KeyBundleCacheStandard", ")", "GetTLFWriterKeyBundle", "(", "bundleID", "TLFWriterKeyBundleID", ")", "(", "*", "TLFWriterKeyBundleV3", ",", "error", ")", "{", "if", "entry", ",", "ok", ":=", "k", ".", "cache", ".", "Get", "(", "bundle...
// GetTLFWriterKeyBundle implements the KeyBundleCache interface for KeyBundleCacheStandard.
[ "GetTLFWriterKeyBundle", "implements", "the", "KeyBundleCache", "interface", "for", "KeyBundleCacheStandard", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfsmd/key_bundle_cache.go#L60-L70
160,566
keybase/client
go/kbfs/kbfsmd/key_bundle_cache.go
PutTLFReaderKeyBundle
func (k *KeyBundleCacheStandard) PutTLFReaderKeyBundle( bundleID TLFReaderKeyBundleID, rkb TLFReaderKeyBundleV3) { k.cache.Add(bundleID, rkb) }
go
func (k *KeyBundleCacheStandard) PutTLFReaderKeyBundle( bundleID TLFReaderKeyBundleID, rkb TLFReaderKeyBundleV3) { k.cache.Add(bundleID, rkb) }
[ "func", "(", "k", "*", "KeyBundleCacheStandard", ")", "PutTLFReaderKeyBundle", "(", "bundleID", "TLFReaderKeyBundleID", ",", "rkb", "TLFReaderKeyBundleV3", ")", "{", "k", ".", "cache", ".", "Add", "(", "bundleID", ",", "rkb", ")", "\n", "}" ]
// PutTLFReaderKeyBundle implements the KeyBundleCache interface for KeyBundleCacheStandard.
[ "PutTLFReaderKeyBundle", "implements", "the", "KeyBundleCache", "interface", "for", "KeyBundleCacheStandard", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfsmd/key_bundle_cache.go#L73-L76
160,567
keybase/client
go/kbfs/kbfsmd/key_bundle_cache.go
PutTLFWriterKeyBundle
func (k *KeyBundleCacheStandard) PutTLFWriterKeyBundle( bundleID TLFWriterKeyBundleID, wkb TLFWriterKeyBundleV3) { k.cache.Add(bundleID, wkb) }
go
func (k *KeyBundleCacheStandard) PutTLFWriterKeyBundle( bundleID TLFWriterKeyBundleID, wkb TLFWriterKeyBundleV3) { k.cache.Add(bundleID, wkb) }
[ "func", "(", "k", "*", "KeyBundleCacheStandard", ")", "PutTLFWriterKeyBundle", "(", "bundleID", "TLFWriterKeyBundleID", ",", "wkb", "TLFWriterKeyBundleV3", ")", "{", "k", ".", "cache", ".", "Add", "(", "bundleID", ",", "wkb", ")", "\n", "}" ]
// PutTLFWriterKeyBundle implements the KeyBundleCache interface for KeyBundleCacheStandard.
[ "PutTLFWriterKeyBundle", "implements", "the", "KeyBundleCache", "interface", "for", "KeyBundleCacheStandard", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfsmd/key_bundle_cache.go#L79-L82
160,568
keybase/client
go/kbfs/kbfscodec/codec.go
Update
func Update(c Codec, dstPtr interface{}, src interface{}) error { buf, err := c.Encode(src) if err != nil { return err } err = c.Decode(buf, dstPtr) if err != nil { return err } return nil }
go
func Update(c Codec, dstPtr interface{}, src interface{}) error { buf, err := c.Encode(src) if err != nil { return err } err = c.Decode(buf, dstPtr) if err != nil { return err } return nil }
[ "func", "Update", "(", "c", "Codec", ",", "dstPtr", "interface", "{", "}", ",", "src", "interface", "{", "}", ")", "error", "{", "buf", ",", "err", ":=", "c", ".", "Encode", "(", "src", ")", "\n", "if", "err", "!=", "nil", "{", "return", "err", ...
// Update encodes src into a byte string, and then decode it into the // object pointed to by dstPtr.
[ "Update", "encodes", "src", "into", "a", "byte", "string", "and", "then", "decode", "it", "into", "the", "object", "pointed", "to", "by", "dstPtr", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfscodec/codec.go#L67-L77
160,569
keybase/client
go/kbfs/kbfscodec/codec.go
SerializeToFile
func SerializeToFile(c Codec, obj interface{}, path string) error { err := ioutil.MkdirAll(filepath.Dir(path), 0700) if err != nil { return err } buf, err := c.Encode(obj) if err != nil { return err } return ioutil.WriteSerializedFile(path, buf, 0600) }
go
func SerializeToFile(c Codec, obj interface{}, path string) error { err := ioutil.MkdirAll(filepath.Dir(path), 0700) if err != nil { return err } buf, err := c.Encode(obj) if err != nil { return err } return ioutil.WriteSerializedFile(path, buf, 0600) }
[ "func", "SerializeToFile", "(", "c", "Codec", ",", "obj", "interface", "{", "}", ",", "path", "string", ")", "error", "{", "err", ":=", "ioutil", ".", "MkdirAll", "(", "filepath", ".", "Dir", "(", "path", ")", ",", "0700", ")", "\n", "if", "err", "...
// SerializeToFile serializes the given object and writes it to the // given file, making its parent directory first if necessary.
[ "SerializeToFile", "serializes", "the", "given", "object", "and", "writes", "it", "to", "the", "given", "file", "making", "its", "parent", "directory", "first", "if", "necessary", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfscodec/codec.go#L81-L93
160,570
keybase/client
go/kbfs/kbfscodec/codec.go
SerializeToFileIfNotExist
func SerializeToFileIfNotExist(c Codec, obj interface{}, path string) error { _, err := ioutil.Stat(path) if ioutil.IsExist(err) { return nil } else if ioutil.IsNotExist(err) { // Continue. } else if err != nil { return err } return SerializeToFile(c, obj, path) }
go
func SerializeToFileIfNotExist(c Codec, obj interface{}, path string) error { _, err := ioutil.Stat(path) if ioutil.IsExist(err) { return nil } else if ioutil.IsNotExist(err) { // Continue. } else if err != nil { return err } return SerializeToFile(c, obj, path) }
[ "func", "SerializeToFileIfNotExist", "(", "c", "Codec", ",", "obj", "interface", "{", "}", ",", "path", "string", ")", "error", "{", "_", ",", "err", ":=", "ioutil", ".", "Stat", "(", "path", ")", "\n", "if", "ioutil", ".", "IsExist", "(", "err", ")"...
// SerializeToFileIfNotExist is like SerializeToFile, but does nothing // if the file already exists.
[ "SerializeToFileIfNotExist", "is", "like", "SerializeToFile", "but", "does", "nothing", "if", "the", "file", "already", "exists", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfscodec/codec.go#L97-L108
160,571
keybase/client
go/chat/flipmanager.go
LoadFlip
func (m *FlipManager) LoadFlip(ctx context.Context, uid gregor1.UID, hostConvID chat1.ConversationID, hostMsgID chat1.MessageID, flipConvID chat1.ConversationID, gameID chat1.FlipGameID) { defer m.Trace(ctx, func() error { return nil }, "LoadFlip")() stored, ok := m.games.Get(gameID.String()) if ok { switch store...
go
func (m *FlipManager) LoadFlip(ctx context.Context, uid gregor1.UID, hostConvID chat1.ConversationID, hostMsgID chat1.MessageID, flipConvID chat1.ConversationID, gameID chat1.FlipGameID) { defer m.Trace(ctx, func() error { return nil }, "LoadFlip")() stored, ok := m.games.Get(gameID.String()) if ok { switch store...
[ "func", "(", "m", "*", "FlipManager", ")", "LoadFlip", "(", "ctx", "context", ".", "Context", ",", "uid", "gregor1", ".", "UID", ",", "hostConvID", "chat1", ".", "ConversationID", ",", "hostMsgID", "chat1", ".", "MessageID", ",", "flipConvID", "chat1", "."...
// LoadFlip implements the types.CoinFlipManager interface
[ "LoadFlip", "implements", "the", "types", ".", "CoinFlipManager", "interface" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/chat/flipmanager.go#L1380-L1407
160,572
keybase/client
go/chat/flipmanager.go
CLogf
func (m *FlipManager) CLogf(ctx context.Context, fmt string, args ...interface{}) { m.Debug(ctx, fmt, args...) }
go
func (m *FlipManager) CLogf(ctx context.Context, fmt string, args ...interface{}) { m.Debug(ctx, fmt, args...) }
[ "func", "(", "m", "*", "FlipManager", ")", "CLogf", "(", "ctx", "context", ".", "Context", ",", "fmt", "string", ",", "args", "...", "interface", "{", "}", ")", "{", "m", ".", "Debug", "(", "ctx", ",", "fmt", ",", "args", "...", ")", "\n", "}" ]
// CLogf implements the flip.DealersHelper interface
[ "CLogf", "implements", "the", "flip", ".", "DealersHelper", "interface" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/chat/flipmanager.go#L1423-L1425
160,573
keybase/client
go/chat/flipmanager.go
ServerTime
func (m *FlipManager) ServerTime(ctx context.Context) (res time.Time, err error) { ctx = globals.ChatCtx(ctx, m.G(), keybase1.TLFIdentifyBehavior_CHAT_SKIP, nil, nil) defer m.Trace(ctx, func() error { return err }, "ServerTime")() if m.testingServerClock != nil { return m.testingServerClock.Now(), nil } sres, er...
go
func (m *FlipManager) ServerTime(ctx context.Context) (res time.Time, err error) { ctx = globals.ChatCtx(ctx, m.G(), keybase1.TLFIdentifyBehavior_CHAT_SKIP, nil, nil) defer m.Trace(ctx, func() error { return err }, "ServerTime")() if m.testingServerClock != nil { return m.testingServerClock.Now(), nil } sres, er...
[ "func", "(", "m", "*", "FlipManager", ")", "ServerTime", "(", "ctx", "context", ".", "Context", ")", "(", "res", "time", ".", "Time", ",", "err", "error", ")", "{", "ctx", "=", "globals", ".", "ChatCtx", "(", "ctx", ",", "m", ".", "G", "(", ")", ...
// ServerTime implements the flip.DealersHelper interface
[ "ServerTime", "implements", "the", "flip", ".", "DealersHelper", "interface" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/chat/flipmanager.go#L1433-L1444
160,574
keybase/client
go/chat/flipmanager.go
SendChat
func (m *FlipManager) SendChat(ctx context.Context, convID chat1.ConversationID, gameID chat1.FlipGameID, msg flip.GameMessageEncoded) (err error) { ctx = globals.ChatCtx(ctx, m.G(), keybase1.TLFIdentifyBehavior_CHAT_SKIP, nil, nil) defer m.Trace(ctx, func() error { return err }, "SendChat: convID: %s", convID)() u...
go
func (m *FlipManager) SendChat(ctx context.Context, convID chat1.ConversationID, gameID chat1.FlipGameID, msg flip.GameMessageEncoded) (err error) { ctx = globals.ChatCtx(ctx, m.G(), keybase1.TLFIdentifyBehavior_CHAT_SKIP, nil, nil) defer m.Trace(ctx, func() error { return err }, "SendChat: convID: %s", convID)() u...
[ "func", "(", "m", "*", "FlipManager", ")", "SendChat", "(", "ctx", "context", ".", "Context", ",", "convID", "chat1", ".", "ConversationID", ",", "gameID", "chat1", ".", "FlipGameID", ",", "msg", "flip", ".", "GameMessageEncoded", ")", "(", "err", "error",...
// SendChat implements the flip.DealersHelper interface
[ "SendChat", "implements", "the", "flip", ".", "DealersHelper", "interface" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/chat/flipmanager.go#L1490-L1509
160,575
keybase/client
go/chat/flipmanager.go
Me
func (m *FlipManager) Me() flip.UserDevice { ad := m.G().ActiveDevice did := ad.DeviceID() hdid := make([]byte, libkb.DeviceIDLen) if err := did.ToBytes(hdid); err != nil { return flip.UserDevice{} } return flip.UserDevice{ U: gregor1.UID(ad.UID().ToBytes()), D: gregor1.DeviceID(hdid), } }
go
func (m *FlipManager) Me() flip.UserDevice { ad := m.G().ActiveDevice did := ad.DeviceID() hdid := make([]byte, libkb.DeviceIDLen) if err := did.ToBytes(hdid); err != nil { return flip.UserDevice{} } return flip.UserDevice{ U: gregor1.UID(ad.UID().ToBytes()), D: gregor1.DeviceID(hdid), } }
[ "func", "(", "m", "*", "FlipManager", ")", "Me", "(", ")", "flip", ".", "UserDevice", "{", "ad", ":=", "m", ".", "G", "(", ")", ".", "ActiveDevice", "\n", "did", ":=", "ad", ".", "DeviceID", "(", ")", "\n", "hdid", ":=", "make", "(", "[", "]", ...
// Me implements the flip.DealersHelper interface
[ "Me", "implements", "the", "flip", ".", "DealersHelper", "interface" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/chat/flipmanager.go#L1512-L1523
160,576
keybase/client
go/install/fuse_status_darwin.go
KeybaseFuseStatus
func KeybaseFuseStatus(bundleVersion string, log Log) keybase1.FuseStatus { st := keybase1.FuseStatus{ BundleVersion: bundleVersion, InstallStatus: keybase1.InstallStatus_UNKNOWN, InstallAction: keybase1.InstallAction_UNKNOWN, } var kextInfo *kext.Info if _, err := os.Stat(installPath); err == nil { st.Pa...
go
func KeybaseFuseStatus(bundleVersion string, log Log) keybase1.FuseStatus { st := keybase1.FuseStatus{ BundleVersion: bundleVersion, InstallStatus: keybase1.InstallStatus_UNKNOWN, InstallAction: keybase1.InstallAction_UNKNOWN, } var kextInfo *kext.Info if _, err := os.Stat(installPath); err == nil { st.Pa...
[ "func", "KeybaseFuseStatus", "(", "bundleVersion", "string", ",", "log", "Log", ")", "keybase1", ".", "FuseStatus", "{", "st", ":=", "keybase1", ".", "FuseStatus", "{", "BundleVersion", ":", "bundleVersion", ",", "InstallStatus", ":", "keybase1", ".", "InstallSt...
// KeybaseFuseStatus returns Fuse status
[ "KeybaseFuseStatus", "returns", "Fuse", "status" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/install/fuse_status_darwin.go#L25-L92
160,577
keybase/client
go/kbfs/libfs/file_info.go
Mode
func (fi *FileInfo) Mode() os.FileMode { mode, err := WritePermMode( fi.fs.ctx, fi.node, os.FileMode(0), fi.fs.config.KBPKI(), fi.fs.config, fi.fs.h) if err != nil { fi.fs.log.CWarningf( fi.fs.ctx, "Couldn't get mode for file %s: %+v", fi.Name(), err) mode = os.FileMode(0) } mode |= 0400 switch fi.ei.T...
go
func (fi *FileInfo) Mode() os.FileMode { mode, err := WritePermMode( fi.fs.ctx, fi.node, os.FileMode(0), fi.fs.config.KBPKI(), fi.fs.config, fi.fs.h) if err != nil { fi.fs.log.CWarningf( fi.fs.ctx, "Couldn't get mode for file %s: %+v", fi.Name(), err) mode = os.FileMode(0) } mode |= 0400 switch fi.ei.T...
[ "func", "(", "fi", "*", "FileInfo", ")", "Mode", "(", ")", "os", ".", "FileMode", "{", "mode", ",", "err", ":=", "WritePermMode", "(", "fi", ".", "fs", ".", "ctx", ",", "fi", ".", "node", ",", "os", ".", "FileMode", "(", "0", ")", ",", "fi", ...
// Mode implements the os.FileInfo interface for FileInfo.
[ "Mode", "implements", "the", "os", ".", "FileInfo", "interface", "for", "FileInfo", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libfs/file_info.go#L46-L66
160,578
keybase/client
go/kbfs/libfs/file_info.go
ModTime
func (fi *FileInfo) ModTime() time.Time { return time.Unix(0, fi.ei.Mtime) }
go
func (fi *FileInfo) ModTime() time.Time { return time.Unix(0, fi.ei.Mtime) }
[ "func", "(", "fi", "*", "FileInfo", ")", "ModTime", "(", ")", "time", ".", "Time", "{", "return", "time", ".", "Unix", "(", "0", ",", "fi", ".", "ei", ".", "Mtime", ")", "\n", "}" ]
// ModTime implements the os.FileInfo interface for FileInfo.
[ "ModTime", "implements", "the", "os", ".", "FileInfo", "interface", "for", "FileInfo", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libfs/file_info.go#L69-L71
160,579
keybase/client
go/kbfs/libfs/file_info.go
Mode
func (fif *FileInfoFast) Mode() os.FileMode { mode := os.FileMode(0400) switch fif.ei.Type { case data.Dir: mode |= os.ModeDir | 0100 case data.Sym: mode |= os.ModeSymlink case data.Exec: mode |= 0100 } return mode }
go
func (fif *FileInfoFast) Mode() os.FileMode { mode := os.FileMode(0400) switch fif.ei.Type { case data.Dir: mode |= os.ModeDir | 0100 case data.Sym: mode |= os.ModeSymlink case data.Exec: mode |= 0100 } return mode }
[ "func", "(", "fif", "*", "FileInfoFast", ")", "Mode", "(", ")", "os", ".", "FileMode", "{", "mode", ":=", "os", ".", "FileMode", "(", "0400", ")", "\n", "switch", "fif", ".", "ei", ".", "Type", "{", "case", "data", ".", "Dir", ":", "mode", "|=", ...
// Mode implements the os.FileInfo interface.
[ "Mode", "implements", "the", "os", ".", "FileInfo", "interface", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libfs/file_info.go#L185-L196
160,580
keybase/client
go/kbfs/libfs/file_info.go
ModTime
func (fif *FileInfoFast) ModTime() time.Time { return time.Unix(0, fif.ei.Mtime) }
go
func (fif *FileInfoFast) ModTime() time.Time { return time.Unix(0, fif.ei.Mtime) }
[ "func", "(", "fif", "*", "FileInfoFast", ")", "ModTime", "(", ")", "time", ".", "Time", "{", "return", "time", ".", "Unix", "(", "0", ",", "fif", ".", "ei", ".", "Mtime", ")", "\n", "}" ]
// ModTime implements the os.FileInfo interface.
[ "ModTime", "implements", "the", "os", ".", "FileInfo", "interface", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libfs/file_info.go#L199-L201
160,581
keybase/client
go/kbfs/libfs/file_info.go
EnableFastMode
func EnableFastMode(ctx context.Context) context.Context { return context.WithValue(ctx, ctxFastModeKey{}, true) }
go
func EnableFastMode(ctx context.Context) context.Context { return context.WithValue(ctx, ctxFastModeKey{}, true) }
[ "func", "EnableFastMode", "(", "ctx", "context", ".", "Context", ")", "context", ".", "Context", "{", "return", "context", ".", "WithValue", "(", "ctx", ",", "ctxFastModeKey", "{", "}", ",", "true", ")", "\n", "}" ]
// EnableFastMode returns a context.Context based on ctx that will test to true // with IsFastModeEnabled.
[ "EnableFastMode", "returns", "a", "context", ".", "Context", "based", "on", "ctx", "that", "will", "test", "to", "true", "with", "IsFastModeEnabled", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libfs/file_info.go#L217-L219
160,582
keybase/client
go/kbfs/kbfsgit/runner.go
getElapsedStr
func (r *runner) getElapsedStr( ctx context.Context, startTime time.Time, profName string, cpuProfFullPath string) string { if r.verbosity < 2 { return "" } elapsed := r.config.Clock().Now().Sub(startTime) elapsedStr := fmt.Sprintf(" [%s]", elapsed) if r.verbosity >= 3 { profName = filepath.Join(os.TempDir(...
go
func (r *runner) getElapsedStr( ctx context.Context, startTime time.Time, profName string, cpuProfFullPath string) string { if r.verbosity < 2 { return "" } elapsed := r.config.Clock().Now().Sub(startTime) elapsedStr := fmt.Sprintf(" [%s]", elapsed) if r.verbosity >= 3 { profName = filepath.Join(os.TempDir(...
[ "func", "(", "r", "*", "runner", ")", "getElapsedStr", "(", "ctx", "context", ".", "Context", ",", "startTime", "time", ".", "Time", ",", "profName", "string", ",", "cpuProfFullPath", "string", ")", "string", "{", "if", "r", ".", "verbosity", "<", "2", ...
// getElapsedStr gets an additional string to append to the errput // message at the end of a phase. It includes the measured time of // the phase, and if verbosity is high enough, it includes the // location of a memory profile taken at the end of the phase.
[ "getElapsedStr", "gets", "an", "additional", "string", "to", "append", "to", "the", "errput", "message", "at", "the", "end", "of", "a", "phase", ".", "It", "includes", "the", "measured", "time", "of", "the", "phase", "and", "if", "verbosity", "is", "high",...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfsgit/runner.go#L220-L248
160,583
keybase/client
go/kbfs/kbfsgit/runner.go
printStageEndIfNeeded
func (r *runner) printStageEndIfNeeded(ctx context.Context) { r.printStageLock.Lock() defer r.printStageLock.Unlock() // go-git grabs the lock right after plumbing.StatusIndexOffset, but before // sending the Done status update. As a result, it would look like we are // flushing the journal before plumbing.StatusI...
go
func (r *runner) printStageEndIfNeeded(ctx context.Context) { r.printStageLock.Lock() defer r.printStageLock.Unlock() // go-git grabs the lock right after plumbing.StatusIndexOffset, but before // sending the Done status update. As a result, it would look like we are // flushing the journal before plumbing.StatusI...
[ "func", "(", "r", "*", "runner", ")", "printStageEndIfNeeded", "(", "ctx", "context", ".", "Context", ")", "{", "r", ".", "printStageLock", ".", "Lock", "(", ")", "\n", "defer", "r", ".", "printStageLock", ".", "Unlock", "(", ")", "\n", "// go-git grabs ...
// printStageEndIfNeeded should only be used to end stages started with // printStageStart.
[ "printStageEndIfNeeded", "should", "only", "be", "used", "to", "end", "stages", "started", "with", "printStageStart", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfsgit/runner.go#L405-L418
160,584
keybase/client
go/kbfs/kbfsgit/runner.go
printJournalStatus
func (r *runner) printJournalStatus( ctx context.Context, jManager *libkbfs.JournalManager, tlfID tlf.ID, doneCh <-chan struct{}) { r.printStageEndIfNeeded(ctx) // Note: the "first" status here gets us the number of unflushed // bytes left at the time we started printing. However, we don't // have the total numb...
go
func (r *runner) printJournalStatus( ctx context.Context, jManager *libkbfs.JournalManager, tlfID tlf.ID, doneCh <-chan struct{}) { r.printStageEndIfNeeded(ctx) // Note: the "first" status here gets us the number of unflushed // bytes left at the time we started printing. However, we don't // have the total numb...
[ "func", "(", "r", "*", "runner", ")", "printJournalStatus", "(", "ctx", "context", ".", "Context", ",", "jManager", "*", "libkbfs", ".", "JournalManager", ",", "tlfID", "tlf", ".", "ID", ",", "doneCh", "<-", "chan", "struct", "{", "}", ")", "{", "r", ...
// caller should make sure doneCh is closed when journal is all flushed.
[ "caller", "should", "make", "sure", "doneCh", "is", "closed", "when", "journal", "is", "all", "flushed", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfsgit/runner.go#L452-L529
160,585
keybase/client
go/kbfs/kbfsgit/runner.go
recursiveByteCount
func (r *runner) recursiveByteCount( ctx context.Context, fs billy.Filesystem, totalSoFar int64, toErase int) ( bytes int64, toEraseRet int, err error) { fileInfos, err := fs.ReadDir("/") if err != nil { return 0, 0, err } for _, fi := range fileInfos { if fi.IsDir() { if fi.Name() == "." { continue ...
go
func (r *runner) recursiveByteCount( ctx context.Context, fs billy.Filesystem, totalSoFar int64, toErase int) ( bytes int64, toEraseRet int, err error) { fileInfos, err := fs.ReadDir("/") if err != nil { return 0, 0, err } for _, fi := range fileInfos { if fi.IsDir() { if fi.Name() == "." { continue ...
[ "func", "(", "r", "*", "runner", ")", "recursiveByteCount", "(", "ctx", "context", ".", "Context", ",", "fs", "billy", ".", "Filesystem", ",", "totalSoFar", "int64", ",", "toErase", "int", ")", "(", "bytes", "int64", ",", "toEraseRet", "int", ",", "err",...
// recursiveByteCount returns a sum of the size of all files under the // directory represented by `fs`. It also returns the length of the // last string it printed to `r.errput` as `toErase`, to aid in // overwriting the text on the next update.
[ "recursiveByteCount", "returns", "a", "sum", "of", "the", "size", "of", "all", "files", "under", "the", "directory", "represented", "by", "fs", ".", "It", "also", "returns", "the", "length", "of", "the", "last", "string", "it", "printed", "to", "r", ".", ...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfsgit/runner.go#L834-L871
160,586
keybase/client
go/kbfs/kbfsgit/runner.go
recursiveCopy
func (r *runner) recursiveCopy( ctx context.Context, from billy.Filesystem, to billy.Filesystem, sw *statusWriter) (err error) { fileInfos, err := from.ReadDir("") if err != nil { return err } for _, fi := range fileInfos { if fi.IsDir() { if fi.Name() == "." { continue } err := to.MkdirAll(fi.N...
go
func (r *runner) recursiveCopy( ctx context.Context, from billy.Filesystem, to billy.Filesystem, sw *statusWriter) (err error) { fileInfos, err := from.ReadDir("") if err != nil { return err } for _, fi := range fileInfos { if fi.IsDir() { if fi.Name() == "." { continue } err := to.MkdirAll(fi.N...
[ "func", "(", "r", "*", "runner", ")", "recursiveCopy", "(", "ctx", "context", ".", "Context", ",", "from", "billy", ".", "Filesystem", ",", "to", "billy", ".", "Filesystem", ",", "sw", "*", "statusWriter", ")", "(", "err", "error", ")", "{", "fileInfos...
// recursiveCopy copies the entire subdirectory rooted at `fs` to // `localFS`.
[ "recursiveCopy", "copies", "the", "entire", "subdirectory", "rooted", "at", "fs", "to", "localFS", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfsgit/runner.go#L969-L1006
160,587
keybase/client
go/kbfs/kbfsgit/runner.go
parentCommitsForRef
func (r *runner) parentCommitsForRef(ctx context.Context, localStorer gogitstor.Storer, remoteStorer gogitstor.Storer, refs map[gogitcfg.RefSpec]bool) (libgit.RefDataByName, error) { commitsByRef := make(libgit.RefDataByName, len(refs)) haves := make(map[plumbing.Hash]bool) for refspec := range refs { if refsp...
go
func (r *runner) parentCommitsForRef(ctx context.Context, localStorer gogitstor.Storer, remoteStorer gogitstor.Storer, refs map[gogitcfg.RefSpec]bool) (libgit.RefDataByName, error) { commitsByRef := make(libgit.RefDataByName, len(refs)) haves := make(map[plumbing.Hash]bool) for refspec := range refs { if refsp...
[ "func", "(", "r", "*", "runner", ")", "parentCommitsForRef", "(", "ctx", "context", ".", "Context", ",", "localStorer", "gogitstor", ".", "Storer", ",", "remoteStorer", "gogitstor", ".", "Storer", ",", "refs", "map", "[", "gogitcfg", ".", "RefSpec", "]", "...
// parentCommitsForRef returns a map of refs with a list of commits for each // ref, newest first. It only includes commits that exist in `localStorer` but // not in `remoteStorer`.
[ "parentCommitsForRef", "returns", "a", "map", "of", "refs", "with", "a", "list", "of", "commits", "for", "each", "ref", "newest", "first", ".", "It", "only", "includes", "commits", "that", "exist", "in", "localStorer", "but", "not", "in", "remoteStorer", "."...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfsgit/runner.go#L1449-L1527
160,588
keybase/client
go/libkb/env.go
GetNegBool
func (e *Env) GetNegBool(def bool, flist []NegBoolFunc) bool { for _, f := range flist { if val, isSet := f.f(); isSet { return (val != f.neg) } } return def }
go
func (e *Env) GetNegBool(def bool, flist []NegBoolFunc) bool { for _, f := range flist { if val, isSet := f.f(); isSet { return (val != f.neg) } } return def }
[ "func", "(", "e", "*", "Env", ")", "GetNegBool", "(", "def", "bool", ",", "flist", "[", "]", "NegBoolFunc", ")", "bool", "{", "for", "_", ",", "f", ":=", "range", "flist", "{", "if", "val", ",", "isSet", ":=", "f", ".", "f", "(", ")", ";", "i...
// GetNegBool gets a negatable bool. You can give it a list of functions, // and also possible negations for those functions.
[ "GetNegBool", "gets", "a", "negatable", "bool", ".", "You", "can", "give", "it", "a", "list", "of", "functions", "and", "also", "possible", "negations", "for", "those", "functions", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/env.go#L500-L507
160,589
keybase/client
go/libkb/env.go
GetChatMemberType
func (e *Env) GetChatMemberType() string { return e.GetString( func() string { return os.Getenv("KEYBASE_CHAT_MEMBER_TYPE") }, func() string { return "impteam" }, ) }
go
func (e *Env) GetChatMemberType() string { return e.GetString( func() string { return os.Getenv("KEYBASE_CHAT_MEMBER_TYPE") }, func() string { return "impteam" }, ) }
[ "func", "(", "e", "*", "Env", ")", "GetChatMemberType", "(", ")", "string", "{", "return", "e", ".", "GetString", "(", "func", "(", ")", "string", "{", "return", "os", ".", "Getenv", "(", "\"", "\"", ")", "}", ",", "func", "(", ")", "string", "{"...
// GetChatMemberType returns the default member type for new conversations.
[ "GetChatMemberType", "returns", "the", "default", "member", "type", "for", "new", "conversations", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/env.go#L1396-L1401
160,590
keybase/client
go/libkb/base58.go
Encode58
func Encode58(inp []byte) string { num := new(big.Int).SetBytes(inp) buf := make([]byte, 0, len(inp)) base := big.NewInt(int64(58)) rem := new(big.Int) quo := new(big.Int) for num.Sign() != 0 { num, rem = quo.QuoRem(num, base, rem) c := alphabet[rem.Uint64()] buf = append(buf, c) } // Pad leading zeros....
go
func Encode58(inp []byte) string { num := new(big.Int).SetBytes(inp) buf := make([]byte, 0, len(inp)) base := big.NewInt(int64(58)) rem := new(big.Int) quo := new(big.Int) for num.Sign() != 0 { num, rem = quo.QuoRem(num, base, rem) c := alphabet[rem.Uint64()] buf = append(buf, c) } // Pad leading zeros....
[ "func", "Encode58", "(", "inp", "[", "]", "byte", ")", "string", "{", "num", ":=", "new", "(", "big", ".", "Int", ")", ".", "SetBytes", "(", "inp", ")", "\n", "buf", ":=", "make", "(", "[", "]", "byte", ",", "0", ",", "len", "(", "inp", ")", ...
// Encode58 base58 encodes the input.
[ "Encode58", "base58", "encodes", "the", "input", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/base58.go#L37-L62
160,591
keybase/client
go/libkb/base58.go
Decode58
func Decode58(inp string) (outp []byte, err error) { place := big.NewInt(1) base := big.NewInt(58) buf := []byte(inp) padlen := 0 // Advance to first non-pad byte for ; padlen < len(buf); padlen++ { if buf[padlen] != alphabet[0] { break } } buf = buf[padlen:] reverseBuf(buf) tmp := new(big.Int) res ...
go
func Decode58(inp string) (outp []byte, err error) { place := big.NewInt(1) base := big.NewInt(58) buf := []byte(inp) padlen := 0 // Advance to first non-pad byte for ; padlen < len(buf); padlen++ { if buf[padlen] != alphabet[0] { break } } buf = buf[padlen:] reverseBuf(buf) tmp := new(big.Int) res ...
[ "func", "Decode58", "(", "inp", "string", ")", "(", "outp", "[", "]", "byte", ",", "err", "error", ")", "{", "place", ":=", "big", ".", "NewInt", "(", "1", ")", "\n", "base", ":=", "big", ".", "NewInt", "(", "58", ")", "\n", "buf", ":=", "[", ...
// Decode58 base58 decodes the input or returns an error.
[ "Decode58", "base58", "decodes", "the", "input", "or", "returns", "an", "error", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/base58.go#L65-L102
160,592
keybase/client
go/engine/saltpack_encrypt.go
NewSaltpackEncrypt
func NewSaltpackEncrypt(arg *SaltpackEncryptArg, newKeyfinderHook func(arg libkb.SaltpackRecipientKeyfinderArg) libkb.SaltpackRecipientKeyfinderEngineInterface) *SaltpackEncrypt { return &SaltpackEncrypt{ arg: arg, newKeyfinderHook: newKeyfinderHook, } }
go
func NewSaltpackEncrypt(arg *SaltpackEncryptArg, newKeyfinderHook func(arg libkb.SaltpackRecipientKeyfinderArg) libkb.SaltpackRecipientKeyfinderEngineInterface) *SaltpackEncrypt { return &SaltpackEncrypt{ arg: arg, newKeyfinderHook: newKeyfinderHook, } }
[ "func", "NewSaltpackEncrypt", "(", "arg", "*", "SaltpackEncryptArg", ",", "newKeyfinderHook", "func", "(", "arg", "libkb", ".", "SaltpackRecipientKeyfinderArg", ")", "libkb", ".", "SaltpackRecipientKeyfinderEngineInterface", ")", "*", "SaltpackEncrypt", "{", "return", "...
// NewSaltpackEncrypt creates a SaltpackEncrypt engine.
[ "NewSaltpackEncrypt", "creates", "a", "SaltpackEncrypt", "engine", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/engine/saltpack_encrypt.go#L36-L41
160,593
keybase/client
go/kbfs/libkbfs/rekey_queue.go
NewRekeyQueueStandard
func NewRekeyQueueStandard(config Config) (rkq *RekeyQueueStandard) { ctx, cancel := context.WithCancel(context.Background()) rkq = &RekeyQueueStandard{ config: config, log: config.MakeLogger("RQ"), queue: make(chan tlf.ID, config.Mode().RekeyQueueSize()), limiter: rate.NewLimiter(rekeysPerSecond, ...
go
func NewRekeyQueueStandard(config Config) (rkq *RekeyQueueStandard) { ctx, cancel := context.WithCancel(context.Background()) rkq = &RekeyQueueStandard{ config: config, log: config.MakeLogger("RQ"), queue: make(chan tlf.ID, config.Mode().RekeyQueueSize()), limiter: rate.NewLimiter(rekeysPerSecond, ...
[ "func", "NewRekeyQueueStandard", "(", "config", "Config", ")", "(", "rkq", "*", "RekeyQueueStandard", ")", "{", "ctx", ",", "cancel", ":=", "context", ".", "WithCancel", "(", "context", ".", "Background", "(", ")", ")", "\n", "rkq", "=", "&", "RekeyQueueSt...
// NewRekeyQueueStandard creates a new rekey queue.
[ "NewRekeyQueueStandard", "creates", "a", "new", "rekey", "queue", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/rekey_queue.go#L58-L72
160,594
keybase/client
go/kbfs/libkbfs/rekey_queue.go
start
func (rkq *RekeyQueueStandard) start(ctx context.Context) { go func() { for { select { case id := <-rkq.queue: if err := rkq.limiter.Wait(ctx); err != nil { rkq.log.Debug("Waiting on rate limiter for tlf=%v error: %v", id, err) return } rkq.config.KBFSOps().RequestRekey(context.Background...
go
func (rkq *RekeyQueueStandard) start(ctx context.Context) { go func() { for { select { case id := <-rkq.queue: if err := rkq.limiter.Wait(ctx); err != nil { rkq.log.Debug("Waiting on rate limiter for tlf=%v error: %v", id, err) return } rkq.config.KBFSOps().RequestRekey(context.Background...
[ "func", "(", "rkq", "*", "RekeyQueueStandard", ")", "start", "(", "ctx", "context", ".", "Context", ")", "{", "go", "func", "(", ")", "{", "for", "{", "select", "{", "case", "id", ":=", "<-", "rkq", ".", "queue", ":", "if", "err", ":=", "rkq", "....
// start spawns a goroutine that dispatches rekey requests to correct folder // branch ops while conforming to the rater limiter.
[ "start", "spawns", "a", "goroutine", "that", "dispatches", "rekey", "requests", "to", "correct", "folder", "branch", "ops", "while", "conforming", "to", "the", "rater", "limiter", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/rekey_queue.go#L76-L97
160,595
keybase/client
go/kbfs/libkbfs/rekey_queue.go
Enqueue
func (rkq *RekeyQueueStandard) Enqueue(id tlf.ID) { rkq.mu.Lock() defer rkq.mu.Unlock() rkq.pendings[id] = true select { case rkq.queue <- id: default: // The queue is full; drop this one for now until the next // request to the server for more rekeys. rkq.log.Debug("Rekey queue is full; dropping %s", id) ...
go
func (rkq *RekeyQueueStandard) Enqueue(id tlf.ID) { rkq.mu.Lock() defer rkq.mu.Unlock() rkq.pendings[id] = true select { case rkq.queue <- id: default: // The queue is full; drop this one for now until the next // request to the server for more rekeys. rkq.log.Debug("Rekey queue is full; dropping %s", id) ...
[ "func", "(", "rkq", "*", "RekeyQueueStandard", ")", "Enqueue", "(", "id", "tlf", ".", "ID", ")", "{", "rkq", ".", "mu", ".", "Lock", "(", ")", "\n", "defer", "rkq", ".", "mu", ".", "Unlock", "(", ")", "\n", "rkq", ".", "pendings", "[", "id", "]...
// Enqueue implements the RekeyQueue interface for RekeyQueueStandard.
[ "Enqueue", "implements", "the", "RekeyQueue", "interface", "for", "RekeyQueueStandard", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/rekey_queue.go#L100-L112
160,596
keybase/client
go/kbfs/libkbfs/rekey_queue.go
IsRekeyPending
func (rkq *RekeyQueueStandard) IsRekeyPending(id tlf.ID) bool { rkq.mu.RLock() defer rkq.mu.RUnlock() return rkq.pendings[id] }
go
func (rkq *RekeyQueueStandard) IsRekeyPending(id tlf.ID) bool { rkq.mu.RLock() defer rkq.mu.RUnlock() return rkq.pendings[id] }
[ "func", "(", "rkq", "*", "RekeyQueueStandard", ")", "IsRekeyPending", "(", "id", "tlf", ".", "ID", ")", "bool", "{", "rkq", ".", "mu", ".", "RLock", "(", ")", "\n", "defer", "rkq", ".", "mu", ".", "RUnlock", "(", ")", "\n", "return", "rkq", ".", ...
// IsRekeyPending implements the RekeyQueue interface for RekeyQueueStandard.
[ "IsRekeyPending", "implements", "the", "RekeyQueue", "interface", "for", "RekeyQueueStandard", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/rekey_queue.go#L115-L119
160,597
keybase/client
go/kbfs/libkbfs/rekey_queue.go
Shutdown
func (rkq *RekeyQueueStandard) Shutdown() { rkq.mu.Lock() defer rkq.mu.Unlock() if rkq.cancel != nil { rkq.cancel() rkq.cancel = nil } }
go
func (rkq *RekeyQueueStandard) Shutdown() { rkq.mu.Lock() defer rkq.mu.Unlock() if rkq.cancel != nil { rkq.cancel() rkq.cancel = nil } }
[ "func", "(", "rkq", "*", "RekeyQueueStandard", ")", "Shutdown", "(", ")", "{", "rkq", ".", "mu", ".", "Lock", "(", ")", "\n", "defer", "rkq", ".", "mu", ".", "Unlock", "(", ")", "\n", "if", "rkq", ".", "cancel", "!=", "nil", "{", "rkq", ".", "c...
// Shutdown implements the RekeyQueue interface for RekeyQueueStandard.
[ "Shutdown", "implements", "the", "RekeyQueue", "interface", "for", "RekeyQueueStandard", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/rekey_queue.go#L122-L129
160,598
keybase/client
go/engine/paperkey_submit.go
NewPaperKeySubmit
func NewPaperKeySubmit(g *libkb.GlobalContext, paperPhrase string) *PaperKeySubmit { return &PaperKeySubmit{ Contextified: libkb.NewContextified(g), paperPhrase: paperPhrase, } }
go
func NewPaperKeySubmit(g *libkb.GlobalContext, paperPhrase string) *PaperKeySubmit { return &PaperKeySubmit{ Contextified: libkb.NewContextified(g), paperPhrase: paperPhrase, } }
[ "func", "NewPaperKeySubmit", "(", "g", "*", "libkb", ".", "GlobalContext", ",", "paperPhrase", "string", ")", "*", "PaperKeySubmit", "{", "return", "&", "PaperKeySubmit", "{", "Contextified", ":", "libkb", ".", "NewContextified", "(", "g", ")", ",", "paperPhra...
// NewPaperKeySubmit creates a PaperKeySubmit engine.
[ "NewPaperKeySubmit", "creates", "a", "PaperKeySubmit", "engine", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/engine/paperkey_submit.go#L18-L23
160,599
keybase/client
go/protocol/keybase1/crypto.go
SignED25519ForKBFS
func (c CryptoClient) SignED25519ForKBFS(ctx context.Context, __arg SignED25519ForKBFSArg) (res ED25519SignatureInfo, err error) { err = c.Cli.Call(ctx, "keybase.1.crypto.signED25519ForKBFS", []interface{}{__arg}, &res) return }
go
func (c CryptoClient) SignED25519ForKBFS(ctx context.Context, __arg SignED25519ForKBFSArg) (res ED25519SignatureInfo, err error) { err = c.Cli.Call(ctx, "keybase.1.crypto.signED25519ForKBFS", []interface{}{__arg}, &res) return }
[ "func", "(", "c", "CryptoClient", ")", "SignED25519ForKBFS", "(", "ctx", "context", ".", "Context", ",", "__arg", "SignED25519ForKBFSArg", ")", "(", "res", "ED25519SignatureInfo", ",", "err", "error", ")", "{", "err", "=", "c", ".", "Cli", ".", "Call", "("...
// Same as the above except a KBFS-specific prefix is added to the payload to be signed.
[ "Same", "as", "the", "above", "except", "a", "KBFS", "-", "specific", "prefix", "is", "added", "to", "the", "payload", "to", "be", "signed", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/keybase1/crypto.go#L243-L246