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
159,100
keybase/client
go/kbfs/data/dirty_file.go
AssimilateDeferredNewBytes
func (df *DirtyFile) AssimilateDeferredNewBytes() { df.lock.Lock() defer df.lock.Unlock() if df.deferredNewBytes == 0 { return } df.dirtyBcache.UpdateUnsyncedBytes(df.Path.Tlf, df.deferredNewBytes, false) df.deferredNewBytes = 0 }
go
func (df *DirtyFile) AssimilateDeferredNewBytes() { df.lock.Lock() defer df.lock.Unlock() if df.deferredNewBytes == 0 { return } df.dirtyBcache.UpdateUnsyncedBytes(df.Path.Tlf, df.deferredNewBytes, false) df.deferredNewBytes = 0 }
[ "func", "(", "df", "*", "DirtyFile", ")", "AssimilateDeferredNewBytes", "(", ")", "{", "df", ".", "lock", ".", "Lock", "(", ")", "\n", "defer", "df", ".", "lock", ".", "Unlock", "(", ")", "\n", "if", "df", ".", "deferredNewBytes", "==", "0", "{", "...
// AssimilateDeferredNewBytes is called to indicate that any deferred // bytes should be included in the count of the next sync.
[ "AssimilateDeferredNewBytes", "is", "called", "to", "indicate", "that", "any", "deferred", "bytes", "should", "be", "included", "in", "the", "count", "of", "the", "next", "sync", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/data/dirty_file.go#L366-L374
159,101
keybase/client
go/libkb/globals.go
simulateServiceRestart
func (g *GlobalContext) simulateServiceRestart() { defer g.switchUserMu.Acquire(NewMetaContext(context.TODO(), g), "simulateServiceRestart")() g.ActiveDevice.Clear() }
go
func (g *GlobalContext) simulateServiceRestart() { defer g.switchUserMu.Acquire(NewMetaContext(context.TODO(), g), "simulateServiceRestart")() g.ActiveDevice.Clear() }
[ "func", "(", "g", "*", "GlobalContext", ")", "simulateServiceRestart", "(", ")", "{", "defer", "g", ".", "switchUserMu", ".", "Acquire", "(", "NewMetaContext", "(", "context", ".", "TODO", "(", ")", ",", "g", ")", ",", "\"", "\"", ")", "(", ")", "\n"...
// simulateServiceRestart simulates what happens when a service restarts for the // purposes of testing.
[ "simulateServiceRestart", "simulates", "what", "happens", "when", "a", "service", "restarts", "for", "the", "purposes", "of", "testing", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/globals.go#L269-L272
159,102
keybase/client
go/libkb/globals.go
Shutdown
func (g *GlobalContext) Shutdown() error { var err error didShutdown := false // Wrap in a Once.Do so that we don't inadvertedly // run this code twice. g.shutdownOnce.Do(func() { g.Log.Debug("GlobalContext#Shutdown(%p)\n", g) didShutdown = true epick := FirstErrorPicker{} if g.NotifyRouter != nil { ...
go
func (g *GlobalContext) Shutdown() error { var err error didShutdown := false // Wrap in a Once.Do so that we don't inadvertedly // run this code twice. g.shutdownOnce.Do(func() { g.Log.Debug("GlobalContext#Shutdown(%p)\n", g) didShutdown = true epick := FirstErrorPicker{} if g.NotifyRouter != nil { ...
[ "func", "(", "g", "*", "GlobalContext", ")", "Shutdown", "(", ")", "error", "{", "var", "err", "error", "\n", "didShutdown", ":=", "false", "\n\n", "// Wrap in a Once.Do so that we don't inadvertedly", "// run this code twice.", "g", ".", "shutdownOnce", ".", "Do", ...
// Shutdown is called exactly once per-process and does whatever // cleanup is necessary to shut down the server.
[ "Shutdown", "is", "called", "exactly", "once", "per", "-", "process", "and", "does", "whatever", "cleanup", "is", "necessary", "to", "shut", "down", "the", "server", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/globals.go#L655-L718
159,103
keybase/client
go/libkb/globals.go
LogoutSelfCheck
func (g *GlobalContext) LogoutSelfCheck(ctx context.Context) error { mctx := NewMetaContext(ctx, g) uid := g.ActiveDevice.UID() if uid.IsNil() { mctx.Debug("LogoutSelfCheck: no uid") return nil } deviceID := g.ActiveDevice.DeviceID() if deviceID.IsNil() { mctx.Debug("LogoutSelfCheck: no device id") return...
go
func (g *GlobalContext) LogoutSelfCheck(ctx context.Context) error { mctx := NewMetaContext(ctx, g) uid := g.ActiveDevice.UID() if uid.IsNil() { mctx.Debug("LogoutSelfCheck: no uid") return nil } deviceID := g.ActiveDevice.DeviceID() if deviceID.IsNil() { mctx.Debug("LogoutSelfCheck: no device id") return...
[ "func", "(", "g", "*", "GlobalContext", ")", "LogoutSelfCheck", "(", "ctx", "context", ".", "Context", ")", "error", "{", "mctx", ":=", "NewMetaContext", "(", "ctx", ",", "g", ")", "\n", "uid", ":=", "g", ".", "ActiveDevice", ".", "UID", "(", ")", "\...
// LogoutSelfCheck checks with the API server to see if this uid+device pair should // logout.
[ "LogoutSelfCheck", "checks", "with", "the", "API", "server", "to", "see", "if", "this", "uid", "+", "device", "pair", "should", "logout", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/globals.go#L1069-L1107
159,104
keybase/client
go/libkb/globals.go
GetPerUserKeyring
func (g *GlobalContext) GetPerUserKeyring(ctx context.Context) (ret *PerUserKeyring, err error) { defer g.Trace("G#GetPerUserKeyring", func() error { return err })() myUID := g.ActiveDevice.UID() if myUID.IsNil() { return nil, errors.New("PerUserKeyring unavailable with no UID") } // Don't do any operations un...
go
func (g *GlobalContext) GetPerUserKeyring(ctx context.Context) (ret *PerUserKeyring, err error) { defer g.Trace("G#GetPerUserKeyring", func() error { return err })() myUID := g.ActiveDevice.UID() if myUID.IsNil() { return nil, errors.New("PerUserKeyring unavailable with no UID") } // Don't do any operations un...
[ "func", "(", "g", "*", "GlobalContext", ")", "GetPerUserKeyring", "(", "ctx", "context", ".", "Context", ")", "(", "ret", "*", "PerUserKeyring", ",", "err", "error", ")", "{", "defer", "g", ".", "Trace", "(", "\"", "\"", ",", "func", "(", ")", "error...
// GetPerUserKeyring recreates PerUserKeyring if the uid changes or this is none installed.
[ "GetPerUserKeyring", "recreates", "PerUserKeyring", "if", "the", "uid", "changes", "or", "this", "is", "none", "installed", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/globals.go#L1249-L1282
159,105
keybase/client
go/kbfs/libfs/node_wrappers.go
ShouldCreateMissedLookup
func (sfn *specialFileNode) ShouldCreateMissedLookup( ctx context.Context, name string) ( bool, context.Context, data.EntryType, os.FileInfo, string) { if !perTlfWrappedNodeNames[name] { return sfn.Node.ShouldCreateMissedLookup(ctx, name) } switch name { case StatusFileName: sfn := &statusFileNode{ Node: ...
go
func (sfn *specialFileNode) ShouldCreateMissedLookup( ctx context.Context, name string) ( bool, context.Context, data.EntryType, os.FileInfo, string) { if !perTlfWrappedNodeNames[name] { return sfn.Node.ShouldCreateMissedLookup(ctx, name) } switch name { case StatusFileName: sfn := &statusFileNode{ Node: ...
[ "func", "(", "sfn", "*", "specialFileNode", ")", "ShouldCreateMissedLookup", "(", "ctx", "context", ".", "Context", ",", "name", "string", ")", "(", "bool", ",", "context", ".", "Context", ",", "data", ".", "EntryType", ",", "os", ".", "FileInfo", ",", "...
// ShouldCreateMissedLookup implements the Node interface for // specialFileNode.
[ "ShouldCreateMissedLookup", "implements", "the", "Node", "interface", "for", "specialFileNode", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libfs/node_wrappers.go#L62-L83
159,106
keybase/client
go/kbfs/libfs/node_wrappers.go
WrapChild
func (sfn *specialFileNode) WrapChild(child libkbfs.Node) libkbfs.Node { child = sfn.Node.WrapChild(child) name := child.GetBasename() if !perTlfWrappedNodeNames[name] { if child.EntryType() == data.Dir { // Wrap this child too, so we can look up special files in // subdirectories of this node as well. re...
go
func (sfn *specialFileNode) WrapChild(child libkbfs.Node) libkbfs.Node { child = sfn.Node.WrapChild(child) name := child.GetBasename() if !perTlfWrappedNodeNames[name] { if child.EntryType() == data.Dir { // Wrap this child too, so we can look up special files in // subdirectories of this node as well. re...
[ "func", "(", "sfn", "*", "specialFileNode", ")", "WrapChild", "(", "child", "libkbfs", ".", "Node", ")", "libkbfs", ".", "Node", "{", "child", "=", "sfn", ".", "Node", ".", "WrapChild", "(", "child", ")", "\n", "name", ":=", "child", ".", "GetBasename"...
// WrapChild implements the Node interface for specialFileNode.
[ "WrapChild", "implements", "the", "Node", "interface", "for", "specialFileNode", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libfs/node_wrappers.go#L86-L113
159,107
keybase/client
go/kbfs/libfs/node_wrappers.go
AddRootWrapper
func AddRootWrapper(config libkbfs.Config) { rw := rootWrapper{config, config.MakeLogger("")} config.AddRootNodeWrapper(rw.wrap) }
go
func AddRootWrapper(config libkbfs.Config) { rw := rootWrapper{config, config.MakeLogger("")} config.AddRootNodeWrapper(rw.wrap) }
[ "func", "AddRootWrapper", "(", "config", "libkbfs", ".", "Config", ")", "{", "rw", ":=", "rootWrapper", "{", "config", ",", "config", ".", "MakeLogger", "(", "\"", "\"", ")", "}", "\n", "config", ".", "AddRootNodeWrapper", "(", "rw", ".", "wrap", ")", ...
// AddRootWrapper should be called on startup by any KBFS interface // that wants to handle special files.
[ "AddRootWrapper", "should", "be", "called", "on", "startup", "by", "any", "KBFS", "interface", "that", "wants", "to", "handle", "special", "files", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libfs/node_wrappers.go#L132-L135
159,108
keybase/client
go/service/delegate_ui.go
NewDelegateUICtlHandler
func NewDelegateUICtlHandler(xp rpc.Transporter, id libkb.ConnectionID, g *libkb.GlobalContext, rekeyMaster *rekeyMaster) *DelegateUICtlHandler { return &DelegateUICtlHandler{ Contextified: libkb.NewContextified(g), BaseHandler: NewBaseHandler(g, xp), id: id, rekeyMaster: rekeyMaster, } }
go
func NewDelegateUICtlHandler(xp rpc.Transporter, id libkb.ConnectionID, g *libkb.GlobalContext, rekeyMaster *rekeyMaster) *DelegateUICtlHandler { return &DelegateUICtlHandler{ Contextified: libkb.NewContextified(g), BaseHandler: NewBaseHandler(g, xp), id: id, rekeyMaster: rekeyMaster, } }
[ "func", "NewDelegateUICtlHandler", "(", "xp", "rpc", ".", "Transporter", ",", "id", "libkb", ".", "ConnectionID", ",", "g", "*", "libkb", ".", "GlobalContext", ",", "rekeyMaster", "*", "rekeyMaster", ")", "*", "DelegateUICtlHandler", "{", "return", "&", "Deleg...
// NewDelegateUICtlHandler creates a new handler for setting up notification // channels
[ "NewDelegateUICtlHandler", "creates", "a", "new", "handler", "for", "setting", "up", "notification", "channels" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/service/delegate_ui.go#L22-L29
159,109
keybase/client
go/kbfs/kbfscrypto/encrypted_data.go
ToHashType
func (v EncryptionVer) ToHashType() kbfshash.HashType { switch v { case EncryptionSecretbox: return kbfshash.SHA256Hash case EncryptionSecretboxWithKeyNonce: return kbfshash.SHA256HashV2 default: return kbfshash.InvalidHash } }
go
func (v EncryptionVer) ToHashType() kbfshash.HashType { switch v { case EncryptionSecretbox: return kbfshash.SHA256Hash case EncryptionSecretboxWithKeyNonce: return kbfshash.SHA256HashV2 default: return kbfshash.InvalidHash } }
[ "func", "(", "v", "EncryptionVer", ")", "ToHashType", "(", ")", "kbfshash", ".", "HashType", "{", "switch", "v", "{", "case", "EncryptionSecretbox", ":", "return", "kbfshash", ".", "SHA256Hash", "\n", "case", "EncryptionSecretboxWithKeyNonce", ":", "return", "kb...
// ToHashType returns the type of the hash that should be used for the // given encryption version.
[ "ToHashType", "returns", "the", "type", "of", "the", "hash", "that", "should", "be", "used", "for", "the", "given", "encryption", "version", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfscrypto/encrypted_data.go#L48-L57
159,110
keybase/client
go/kbfs/kbfscrypto/encrypted_data.go
encryptDataWithNonce
func encryptDataWithNonce( data []byte, key [32]byte, nonce [24]byte, ver EncryptionVer) ( encryptedData, error) { sealedData := secretbox.Seal(nil, data, &nonce, &key) return encryptedData{ Version: ver, Nonce: nonce[:], EncryptedData: sealedData, }, nil }
go
func encryptDataWithNonce( data []byte, key [32]byte, nonce [24]byte, ver EncryptionVer) ( encryptedData, error) { sealedData := secretbox.Seal(nil, data, &nonce, &key) return encryptedData{ Version: ver, Nonce: nonce[:], EncryptedData: sealedData, }, nil }
[ "func", "encryptDataWithNonce", "(", "data", "[", "]", "byte", ",", "key", "[", "32", "]", "byte", ",", "nonce", "[", "24", "]", "byte", ",", "ver", "EncryptionVer", ")", "(", "encryptedData", ",", "error", ")", "{", "sealedData", ":=", "secretbox", "....
// encryptDataWithNonce encrypts the given data with the given // symmetric key and nonce.
[ "encryptDataWithNonce", "encrypts", "the", "given", "data", "with", "the", "given", "symmetric", "key", "and", "nonce", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfscrypto/encrypted_data.go#L93-L103
159,111
keybase/client
go/kbfs/kbfscrypto/encrypted_data.go
encryptData
func encryptData(data []byte, key [32]byte) (encryptedData, error) { var nonce [24]byte err := RandRead(nonce[:]) if err != nil { return encryptedData{}, err } return encryptDataWithNonce(data, key, nonce, EncryptionSecretbox) }
go
func encryptData(data []byte, key [32]byte) (encryptedData, error) { var nonce [24]byte err := RandRead(nonce[:]) if err != nil { return encryptedData{}, err } return encryptDataWithNonce(data, key, nonce, EncryptionSecretbox) }
[ "func", "encryptData", "(", "data", "[", "]", "byte", ",", "key", "[", "32", "]", "byte", ")", "(", "encryptedData", ",", "error", ")", "{", "var", "nonce", "[", "24", "]", "byte", "\n", "err", ":=", "RandRead", "(", "nonce", "[", ":", "]", ")", ...
// encryptData encrypts the given data with the given symmetric key.
[ "encryptData", "encrypts", "the", "given", "data", "with", "the", "given", "symmetric", "key", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfscrypto/encrypted_data.go#L106-L114
159,112
keybase/client
go/kbfs/kbfscrypto/encrypted_data.go
decryptData
func decryptData( encryptedData encryptedData, key [32]byte, nonce [24]byte) ([]byte, error) { switch encryptedData.Version { case EncryptionSecretbox: // We're good, no nonce check needed. case EncryptionSecretboxWithKeyNonce: if !bytes.Equal(nonce[:], encryptedData.Nonce) { return nil, errors.WithStack(Inv...
go
func decryptData( encryptedData encryptedData, key [32]byte, nonce [24]byte) ([]byte, error) { switch encryptedData.Version { case EncryptionSecretbox: // We're good, no nonce check needed. case EncryptionSecretboxWithKeyNonce: if !bytes.Equal(nonce[:], encryptedData.Nonce) { return nil, errors.WithStack(Inv...
[ "func", "decryptData", "(", "encryptedData", "encryptedData", ",", "key", "[", "32", "]", "byte", ",", "nonce", "[", "24", "]", "byte", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "switch", "encryptedData", ".", "Version", "{", "case", "Encrypt...
// decryptData decrypts the given encrypted data with the given // symmetric key and nonce.
[ "decryptData", "decrypts", "the", "given", "encrypted", "data", "with", "the", "given", "symmetric", "key", "and", "nonce", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfscrypto/encrypted_data.go#L118-L140
159,113
keybase/client
go/kbfs/kbfscrypto/encrypted_data.go
EncryptTLFCryptKeyClientHalf
func EncryptTLFCryptKeyClientHalf( privateKey TLFEphemeralPrivateKey, publicKey CryptPublicKey, clientHalf TLFCryptKeyClientHalf) ( encryptedClientHalf EncryptedTLFCryptKeyClientHalf, err error) { var nonce [24]byte err = RandRead(nonce[:]) if err != nil { return EncryptedTLFCryptKeyClientHalf{}, err } keypa...
go
func EncryptTLFCryptKeyClientHalf( privateKey TLFEphemeralPrivateKey, publicKey CryptPublicKey, clientHalf TLFCryptKeyClientHalf) ( encryptedClientHalf EncryptedTLFCryptKeyClientHalf, err error) { var nonce [24]byte err = RandRead(nonce[:]) if err != nil { return EncryptedTLFCryptKeyClientHalf{}, err } keypa...
[ "func", "EncryptTLFCryptKeyClientHalf", "(", "privateKey", "TLFEphemeralPrivateKey", ",", "publicKey", "CryptPublicKey", ",", "clientHalf", "TLFCryptKeyClientHalf", ")", "(", "encryptedClientHalf", "EncryptedTLFCryptKeyClientHalf", ",", "err", "error", ")", "{", "var", "non...
// EncryptTLFCryptKeyClientHalf encrypts a TLFCryptKeyClientHalf // using both a TLF's ephemeral private key and a device pubkey.
[ "EncryptTLFCryptKeyClientHalf", "encrypts", "a", "TLFCryptKeyClientHalf", "using", "both", "a", "TLF", "s", "ephemeral", "private", "key", "and", "a", "device", "pubkey", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfscrypto/encrypted_data.go#L150-L182
159,114
keybase/client
go/kbfs/kbfscrypto/encrypted_data.go
EncryptEncodedPrivateMetadata
func EncryptEncodedPrivateMetadata(encodedPrivateMetadata []byte, key TLFCryptKey) ( encryptedPrivateMetadata EncryptedPrivateMetadata, err error) { encryptedData, err := encryptData(encodedPrivateMetadata, key.Data()) if err != nil { return EncryptedPrivateMetadata{}, err } return EncryptedPrivateMetadata{encr...
go
func EncryptEncodedPrivateMetadata(encodedPrivateMetadata []byte, key TLFCryptKey) ( encryptedPrivateMetadata EncryptedPrivateMetadata, err error) { encryptedData, err := encryptData(encodedPrivateMetadata, key.Data()) if err != nil { return EncryptedPrivateMetadata{}, err } return EncryptedPrivateMetadata{encr...
[ "func", "EncryptEncodedPrivateMetadata", "(", "encodedPrivateMetadata", "[", "]", "byte", ",", "key", "TLFCryptKey", ")", "(", "encryptedPrivateMetadata", "EncryptedPrivateMetadata", ",", "err", "error", ")", "{", "encryptedData", ",", "err", ":=", "encryptData", "(",...
// EncryptEncodedPrivateMetadata encrypts an encoded PrivateMetadata // object.
[ "EncryptEncodedPrivateMetadata", "encrypts", "an", "encoded", "PrivateMetadata", "object", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfscrypto/encrypted_data.go#L191-L199
159,115
keybase/client
go/kbfs/kbfscrypto/encrypted_data.go
DecryptPrivateMetadata
func DecryptPrivateMetadata( encryptedPrivateMetadata EncryptedPrivateMetadata, key TLFCryptKey) ( []byte, error) { if encryptedPrivateMetadata.encryptedData.Version == EncryptionSecretboxWithKeyNonce { // Only blocks should have v2 encryption. return nil, errors.WithStack(InvalidEncryptionVer{ encryptedPri...
go
func DecryptPrivateMetadata( encryptedPrivateMetadata EncryptedPrivateMetadata, key TLFCryptKey) ( []byte, error) { if encryptedPrivateMetadata.encryptedData.Version == EncryptionSecretboxWithKeyNonce { // Only blocks should have v2 encryption. return nil, errors.WithStack(InvalidEncryptionVer{ encryptedPri...
[ "func", "DecryptPrivateMetadata", "(", "encryptedPrivateMetadata", "EncryptedPrivateMetadata", ",", "key", "TLFCryptKey", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "if", "encryptedPrivateMetadata", ".", "encryptedData", ".", "Version", "==", "EncryptionSecre...
// DecryptPrivateMetadata decrypts a PrivateMetadata object, but does // not decode it.
[ "DecryptPrivateMetadata", "decrypts", "a", "PrivateMetadata", "object", "but", "does", "not", "decode", "it", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfscrypto/encrypted_data.go#L203-L220
159,116
keybase/client
go/kbfs/kbfscrypto/encrypted_data.go
EncryptPaddedEncodedBlock
func EncryptPaddedEncodedBlock( paddedEncodedBlock []byte, tlfCryptKey TLFCryptKey, blockServerHalf BlockCryptKeyServerHalf, ver EncryptionVer) ( encryptedBlock EncryptedBlock, err error) { var ed encryptedData switch ver { case EncryptionSecretbox: key := UnmaskBlockCryptKey(blockServerHalf, tlfCryptKey) ed,...
go
func EncryptPaddedEncodedBlock( paddedEncodedBlock []byte, tlfCryptKey TLFCryptKey, blockServerHalf BlockCryptKeyServerHalf, ver EncryptionVer) ( encryptedBlock EncryptedBlock, err error) { var ed encryptedData switch ver { case EncryptionSecretbox: key := UnmaskBlockCryptKey(blockServerHalf, tlfCryptKey) ed,...
[ "func", "EncryptPaddedEncodedBlock", "(", "paddedEncodedBlock", "[", "]", "byte", ",", "tlfCryptKey", "TLFCryptKey", ",", "blockServerHalf", "BlockCryptKeyServerHalf", ",", "ver", "EncryptionVer", ")", "(", "encryptedBlock", "EncryptedBlock", ",", "err", "error", ")", ...
// EncryptPaddedEncodedBlock encrypts a padded, encoded block.
[ "EncryptPaddedEncodedBlock", "encrypts", "a", "padded", "encoded", "block", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfscrypto/encrypted_data.go#L228-L253
159,117
keybase/client
go/kbfs/kbfscrypto/encrypted_data.go
DecryptBlock
func DecryptBlock( encryptedBlock EncryptedBlock, tlfCryptKey TLFCryptKey, blockServerHalf BlockCryptKeyServerHalf) ([]byte, error) { switch encryptedBlock.encryptedData.Version { case EncryptionSecretbox: nonce, err := encryptedBlock.encryptedData.Nonce24() if err != nil { return nil, err } key := Unma...
go
func DecryptBlock( encryptedBlock EncryptedBlock, tlfCryptKey TLFCryptKey, blockServerHalf BlockCryptKeyServerHalf) ([]byte, error) { switch encryptedBlock.encryptedData.Version { case EncryptionSecretbox: nonce, err := encryptedBlock.encryptedData.Nonce24() if err != nil { return nil, err } key := Unma...
[ "func", "DecryptBlock", "(", "encryptedBlock", "EncryptedBlock", ",", "tlfCryptKey", "TLFCryptKey", ",", "blockServerHalf", "BlockCryptKeyServerHalf", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "switch", "encryptedBlock", ".", "encryptedData", ".", "Version...
// DecryptBlock decrypts a block, but does not unpad or decode it.
[ "DecryptBlock", "decrypts", "a", "block", "but", "does", "not", "unpad", "or", "decode", "it", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfscrypto/encrypted_data.go#L256-L276
159,118
keybase/client
go/kbfs/kbfscrypto/encrypted_data.go
EncryptTLFCryptKeys
func EncryptTLFCryptKeys(codec kbfscodec.Codec, oldKeys []TLFCryptKey, key TLFCryptKey) ( encryptedTLFCryptKeys EncryptedTLFCryptKeys, err error) { encodedKeys, err := codec.Encode(oldKeys) if err != nil { return EncryptedTLFCryptKeys{}, err } encryptedData, err := encryptData(encodedKeys, key.Data()) if err !...
go
func EncryptTLFCryptKeys(codec kbfscodec.Codec, oldKeys []TLFCryptKey, key TLFCryptKey) ( encryptedTLFCryptKeys EncryptedTLFCryptKeys, err error) { encodedKeys, err := codec.Encode(oldKeys) if err != nil { return EncryptedTLFCryptKeys{}, err } encryptedData, err := encryptData(encodedKeys, key.Data()) if err !...
[ "func", "EncryptTLFCryptKeys", "(", "codec", "kbfscodec", ".", "Codec", ",", "oldKeys", "[", "]", "TLFCryptKey", ",", "key", "TLFCryptKey", ")", "(", "encryptedTLFCryptKeys", "EncryptedTLFCryptKeys", ",", "err", "error", ")", "{", "encodedKeys", ",", "err", ":="...
// EncryptTLFCryptKeys encrypts a TLFCryptKey array.
[ "EncryptTLFCryptKeys", "encrypts", "a", "TLFCryptKey", "array", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfscrypto/encrypted_data.go#L284-L297
159,119
keybase/client
go/kbfs/kbfscrypto/encrypted_data.go
DecryptTLFCryptKeys
func DecryptTLFCryptKeys( codec kbfscodec.Codec, encryptedTLFCryptKeys EncryptedTLFCryptKeys, key TLFCryptKey) ( []TLFCryptKey, error) { if encryptedTLFCryptKeys.encryptedData.Version == EncryptionSecretboxWithKeyNonce { // Only blocks should have v2 encryption. return nil, errors.WithStack( InvalidEncrypti...
go
func DecryptTLFCryptKeys( codec kbfscodec.Codec, encryptedTLFCryptKeys EncryptedTLFCryptKeys, key TLFCryptKey) ( []TLFCryptKey, error) { if encryptedTLFCryptKeys.encryptedData.Version == EncryptionSecretboxWithKeyNonce { // Only blocks should have v2 encryption. return nil, errors.WithStack( InvalidEncrypti...
[ "func", "DecryptTLFCryptKeys", "(", "codec", "kbfscodec", ".", "Codec", ",", "encryptedTLFCryptKeys", "EncryptedTLFCryptKeys", ",", "key", "TLFCryptKey", ")", "(", "[", "]", "TLFCryptKey", ",", "error", ")", "{", "if", "encryptedTLFCryptKeys", ".", "encryptedData", ...
// DecryptTLFCryptKeys decrypts a TLFCryptKey array, but does not // decode it.
[ "DecryptTLFCryptKeys", "decrypts", "a", "TLFCryptKey", "array", "but", "does", "not", "decode", "it", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfscrypto/encrypted_data.go#L301-L329
159,120
keybase/client
go/kbfs/kbfscrypto/encrypted_data.go
MakeEncryptedMerkleLeaf
func MakeEncryptedMerkleLeaf( version EncryptionVer, data []byte, nonce *[24]byte) EncryptedMerkleLeaf { return EncryptedMerkleLeaf{ encryptedData{ Version: version, EncryptedData: data, Nonce: nonce[:], }, } }
go
func MakeEncryptedMerkleLeaf( version EncryptionVer, data []byte, nonce *[24]byte) EncryptedMerkleLeaf { return EncryptedMerkleLeaf{ encryptedData{ Version: version, EncryptedData: data, Nonce: nonce[:], }, } }
[ "func", "MakeEncryptedMerkleLeaf", "(", "version", "EncryptionVer", ",", "data", "[", "]", "byte", ",", "nonce", "*", "[", "24", "]", "byte", ")", "EncryptedMerkleLeaf", "{", "return", "EncryptedMerkleLeaf", "{", "encryptedData", "{", "Version", ":", "version", ...
// MakeEncryptedMerkleLeaf constructs an EncryptedMerkleLeaf.
[ "MakeEncryptedMerkleLeaf", "constructs", "an", "EncryptedMerkleLeaf", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfscrypto/encrypted_data.go#L337-L346
159,121
keybase/client
go/kbfs/kbfscrypto/encrypted_data.go
PrepareMerkleLeaf
func PrepareMerkleLeaf(encryptedMerkleLeaf EncryptedMerkleLeaf) ( nonce [24]byte, err error) { if encryptedMerkleLeaf.Version != EncryptionSecretbox { return nonce, errors.WithStack(UnknownEncryptionVer{ Ver: encryptedMerkleLeaf.Version}) } if len(encryptedMerkleLeaf.Nonce) != len(nonce) { return nonce,...
go
func PrepareMerkleLeaf(encryptedMerkleLeaf EncryptedMerkleLeaf) ( nonce [24]byte, err error) { if encryptedMerkleLeaf.Version != EncryptionSecretbox { return nonce, errors.WithStack(UnknownEncryptionVer{ Ver: encryptedMerkleLeaf.Version}) } if len(encryptedMerkleLeaf.Nonce) != len(nonce) { return nonce,...
[ "func", "PrepareMerkleLeaf", "(", "encryptedMerkleLeaf", "EncryptedMerkleLeaf", ")", "(", "nonce", "[", "24", "]", "byte", ",", "err", "error", ")", "{", "if", "encryptedMerkleLeaf", ".", "Version", "!=", "EncryptionSecretbox", "{", "return", "nonce", ",", "erro...
// PrepareMerkleLeaf verifies the correctness of the given leaf, and // returns its nonce.
[ "PrepareMerkleLeaf", "verifies", "the", "correctness", "of", "the", "given", "leaf", "and", "returns", "its", "nonce", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfscrypto/encrypted_data.go#L350-L365
159,122
keybase/client
go/kbfs/kbfscrypto/encrypted_data.go
DecryptMerkleLeaf
func DecryptMerkleLeaf( privateKey TLFPrivateKey, publicKey TLFEphemeralPublicKey, encryptedMerkleLeaf EncryptedMerkleLeaf) ([]byte, error) { nonce, err := PrepareMerkleLeaf(encryptedMerkleLeaf) if err != nil { return nil, err } publicKeyData := publicKey.Data() privateKeyData := privateKey.Data() decryptedD...
go
func DecryptMerkleLeaf( privateKey TLFPrivateKey, publicKey TLFEphemeralPublicKey, encryptedMerkleLeaf EncryptedMerkleLeaf) ([]byte, error) { nonce, err := PrepareMerkleLeaf(encryptedMerkleLeaf) if err != nil { return nil, err } publicKeyData := publicKey.Data() privateKeyData := privateKey.Data() decryptedD...
[ "func", "DecryptMerkleLeaf", "(", "privateKey", "TLFPrivateKey", ",", "publicKey", "TLFEphemeralPublicKey", ",", "encryptedMerkleLeaf", "EncryptedMerkleLeaf", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "nonce", ",", "err", ":=", "PrepareMerkleLeaf", "(", ...
// DecryptMerkleLeaf decrypts an EncryptedMerkleLeaf using the given // private TLF key and ephemeral public key.
[ "DecryptMerkleLeaf", "decrypts", "an", "EncryptedMerkleLeaf", "using", "the", "given", "private", "TLF", "key", "and", "ephemeral", "public", "key", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfscrypto/encrypted_data.go#L369-L386
159,123
keybase/client
go/engine/puk_upkeep.go
NewPerUserKeyUpkeep
func NewPerUserKeyUpkeep(g *libkb.GlobalContext, args *PerUserKeyUpkeepArgs) *PerUserKeyUpkeep { return &PerUserKeyUpkeep{ args: args, Contextified: libkb.NewContextified(g), } }
go
func NewPerUserKeyUpkeep(g *libkb.GlobalContext, args *PerUserKeyUpkeepArgs) *PerUserKeyUpkeep { return &PerUserKeyUpkeep{ args: args, Contextified: libkb.NewContextified(g), } }
[ "func", "NewPerUserKeyUpkeep", "(", "g", "*", "libkb", ".", "GlobalContext", ",", "args", "*", "PerUserKeyUpkeepArgs", ")", "*", "PerUserKeyUpkeep", "{", "return", "&", "PerUserKeyUpkeep", "{", "args", ":", "args", ",", "Contextified", ":", "libkb", ".", "NewC...
// NewPerUserKeyUpkeep creates a PerUserKeyUpkeep engine.
[ "NewPerUserKeyUpkeep", "creates", "a", "PerUserKeyUpkeep", "engine", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/engine/puk_upkeep.go#L31-L36
159,124
keybase/client
go/engine/puk_upkeep.go
shouldRollKey
func (e *PerUserKeyUpkeep) shouldRollKey(m libkb.MetaContext, uid keybase1.UID, upak *keybase1.UserPlusKeysV2) (bool, error) { if len(upak.PerUserKeys) == 0 { m.Debug("PerUserKeyUpkeep has no per-user-key") return false, nil } m.Debug("PerUserKeyUpkeep has %v per-user-keys", len(upak.PerUserKeys)) lastPuk := ...
go
func (e *PerUserKeyUpkeep) shouldRollKey(m libkb.MetaContext, uid keybase1.UID, upak *keybase1.UserPlusKeysV2) (bool, error) { if len(upak.PerUserKeys) == 0 { m.Debug("PerUserKeyUpkeep has no per-user-key") return false, nil } m.Debug("PerUserKeyUpkeep has %v per-user-keys", len(upak.PerUserKeys)) lastPuk := ...
[ "func", "(", "e", "*", "PerUserKeyUpkeep", ")", "shouldRollKey", "(", "m", "libkb", ".", "MetaContext", ",", "uid", "keybase1", ".", "UID", ",", "upak", "*", "keybase1", ".", "UserPlusKeysV2", ")", "(", "bool", ",", "error", ")", "{", "if", "len", "(",...
// Whether we should roll the per-user-key.
[ "Whether", "we", "should", "roll", "the", "per", "-", "user", "-", "key", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/engine/puk_upkeep.go#L106-L120
159,125
keybase/client
go/install/fuse_status_windows.go
findDokanUninstall
func findDokanUninstall(log Log, wow64 bool) (result string) { dokanRegexp := regexp.MustCompile("^Dokan Library.*Bundle") var access uint32 = registry.ENUMERATE_SUB_KEYS | registry.QUERY_VALUE // Assume this is build 64 bit, so we need this flag to see 32 bit WOW registry // https://msdn.microsoft.com/en-us/libr...
go
func findDokanUninstall(log Log, wow64 bool) (result string) { dokanRegexp := regexp.MustCompile("^Dokan Library.*Bundle") var access uint32 = registry.ENUMERATE_SUB_KEYS | registry.QUERY_VALUE // Assume this is build 64 bit, so we need this flag to see 32 bit WOW registry // https://msdn.microsoft.com/en-us/libr...
[ "func", "findDokanUninstall", "(", "log", "Log", ",", "wow64", "bool", ")", "(", "result", "string", ")", "{", "dokanRegexp", ":=", "regexp", ".", "MustCompile", "(", "\"", "\"", ")", "\n", "var", "access", "uint32", "=", "registry", ".", "ENUMERATE_SUB_KE...
// Read all the uninstall subkeys and find the ones with DisplayName starting with "Dokan Library" // and containing "Bundle"
[ "Read", "all", "the", "uninstall", "subkeys", "and", "find", "the", "ones", "with", "DisplayName", "starting", "with", "Dokan", "Library", "and", "containing", "Bundle" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/install/fuse_status_windows.go#L40-L88
159,126
keybase/client
go/kbfs/libkbfs/disk_block_cache_service.go
GetBlock
func (cache *DiskBlockCacheService) GetBlock(ctx context.Context, arg kbgitkbfs.GetBlockArg) (kbgitkbfs.GetBlockRes, error) { // TODO: make sure this isn't remote. dbc := cache.config.DiskBlockCache() if dbc == nil { return kbgitkbfs.GetBlockRes{}, DiskBlockCacheError{"Disk cache is nil"} } tlfID := tlf.ID{}...
go
func (cache *DiskBlockCacheService) GetBlock(ctx context.Context, arg kbgitkbfs.GetBlockArg) (kbgitkbfs.GetBlockRes, error) { // TODO: make sure this isn't remote. dbc := cache.config.DiskBlockCache() if dbc == nil { return kbgitkbfs.GetBlockRes{}, DiskBlockCacheError{"Disk cache is nil"} } tlfID := tlf.ID{}...
[ "func", "(", "cache", "*", "DiskBlockCacheService", ")", "GetBlock", "(", "ctx", "context", ".", "Context", ",", "arg", "kbgitkbfs", ".", "GetBlockArg", ")", "(", "kbgitkbfs", ".", "GetBlockRes", ",", "error", ")", "{", "// TODO: make sure this isn't remote.", "...
// GetBlock implements the DiskBlockCacheInterface interface for // DiskBlockCacheService.
[ "GetBlock", "implements", "the", "DiskBlockCacheInterface", "interface", "for", "DiskBlockCacheService", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/disk_block_cache_service.go#L38-L68
159,127
keybase/client
go/kbfs/libkbfs/disk_block_cache_service.go
GetPrefetchStatus
func (cache *DiskBlockCacheService) GetPrefetchStatus( ctx context.Context, arg kbgitkbfs.GetPrefetchStatusArg) ( prefetchStatus kbgitkbfs.PrefetchStatus, err error) { dbc := cache.config.DiskBlockCache() if dbc == nil { return NoPrefetch.ToProtocol(), DiskBlockCacheError{"Disk cache is nil"} } tlfID := tlf.ID{...
go
func (cache *DiskBlockCacheService) GetPrefetchStatus( ctx context.Context, arg kbgitkbfs.GetPrefetchStatusArg) ( prefetchStatus kbgitkbfs.PrefetchStatus, err error) { dbc := cache.config.DiskBlockCache() if dbc == nil { return NoPrefetch.ToProtocol(), DiskBlockCacheError{"Disk cache is nil"} } tlfID := tlf.ID{...
[ "func", "(", "cache", "*", "DiskBlockCacheService", ")", "GetPrefetchStatus", "(", "ctx", "context", ".", "Context", ",", "arg", "kbgitkbfs", ".", "GetPrefetchStatusArg", ")", "(", "prefetchStatus", "kbgitkbfs", ".", "PrefetchStatus", ",", "err", "error", ")", "...
// GetPrefetchStatus implements the DiskBlockCacheInterface interface // for DiskBlockCacheService.
[ "GetPrefetchStatus", "implements", "the", "DiskBlockCacheInterface", "interface", "for", "DiskBlockCacheService", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/disk_block_cache_service.go#L72-L100
159,128
keybase/client
go/kbfs/libkbfs/disk_block_cache_service.go
PutBlock
func (cache *DiskBlockCacheService) PutBlock(ctx context.Context, arg kbgitkbfs.PutBlockArg) error { dbc := cache.config.DiskBlockCache() if dbc == nil { return DiskBlockCacheError{"Disk cache is nil"} } tlfID := tlf.ID{} err := tlfID.UnmarshalBinary(arg.TlfID) if err != nil { return newDiskBlockCacheError(e...
go
func (cache *DiskBlockCacheService) PutBlock(ctx context.Context, arg kbgitkbfs.PutBlockArg) error { dbc := cache.config.DiskBlockCache() if dbc == nil { return DiskBlockCacheError{"Disk cache is nil"} } tlfID := tlf.ID{} err := tlfID.UnmarshalBinary(arg.TlfID) if err != nil { return newDiskBlockCacheError(e...
[ "func", "(", "cache", "*", "DiskBlockCacheService", ")", "PutBlock", "(", "ctx", "context", ".", "Context", ",", "arg", "kbgitkbfs", ".", "PutBlockArg", ")", "error", "{", "dbc", ":=", "cache", ".", "config", ".", "DiskBlockCache", "(", ")", "\n", "if", ...
// PutBlock implements the DiskBlockCacheInterface interface for // DiskBlockCacheService.
[ "PutBlock", "implements", "the", "DiskBlockCacheInterface", "interface", "for", "DiskBlockCacheService", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/disk_block_cache_service.go#L104-L134
159,129
keybase/client
go/kbfs/libkbfs/disk_block_cache_service.go
DeleteBlocks
func (cache *DiskBlockCacheService) DeleteBlocks(ctx context.Context, blockIDs [][]byte) (kbgitkbfs.DeleteBlocksRes, error) { dbc := cache.config.DiskBlockCache() if dbc == nil { return kbgitkbfs.DeleteBlocksRes{}, DiskBlockCacheError{"Disk cache is nil"} } blocks := make([]kbfsblock.ID, 0, len(blockIDs)) fo...
go
func (cache *DiskBlockCacheService) DeleteBlocks(ctx context.Context, blockIDs [][]byte) (kbgitkbfs.DeleteBlocksRes, error) { dbc := cache.config.DiskBlockCache() if dbc == nil { return kbgitkbfs.DeleteBlocksRes{}, DiskBlockCacheError{"Disk cache is nil"} } blocks := make([]kbfsblock.ID, 0, len(blockIDs)) fo...
[ "func", "(", "cache", "*", "DiskBlockCacheService", ")", "DeleteBlocks", "(", "ctx", "context", ".", "Context", ",", "blockIDs", "[", "]", "[", "]", "byte", ")", "(", "kbgitkbfs", ".", "DeleteBlocksRes", ",", "error", ")", "{", "dbc", ":=", "cache", ".",...
// DeleteBlocks implements the DiskBlockCacheInterface interface for // DiskBlockCacheService.
[ "DeleteBlocks", "implements", "the", "DiskBlockCacheInterface", "interface", "for", "DiskBlockCacheService", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/disk_block_cache_service.go#L138-L162
159,130
keybase/client
go/kbfs/libkbfs/disk_block_cache_service.go
UpdateBlockMetadata
func (cache *DiskBlockCacheService) UpdateBlockMetadata(ctx context.Context, arg kbgitkbfs.UpdateBlockMetadataArg) error { dbc := cache.config.DiskBlockCache() if dbc == nil { return DiskBlockCacheError{"Disk cache is nil"} } tlfID := tlf.ID{} err := tlfID.UnmarshalBinary(arg.TlfID) if err != nil { return ne...
go
func (cache *DiskBlockCacheService) UpdateBlockMetadata(ctx context.Context, arg kbgitkbfs.UpdateBlockMetadataArg) error { dbc := cache.config.DiskBlockCache() if dbc == nil { return DiskBlockCacheError{"Disk cache is nil"} } tlfID := tlf.ID{} err := tlfID.UnmarshalBinary(arg.TlfID) if err != nil { return ne...
[ "func", "(", "cache", "*", "DiskBlockCacheService", ")", "UpdateBlockMetadata", "(", "ctx", "context", ".", "Context", ",", "arg", "kbgitkbfs", ".", "UpdateBlockMetadataArg", ")", "error", "{", "dbc", ":=", "cache", ".", "config", ".", "DiskBlockCache", "(", "...
// UpdateBlockMetadata implements the DiskBlockCacheInterface interface for // DiskBlockCacheService.
[ "UpdateBlockMetadata", "implements", "the", "DiskBlockCacheInterface", "interface", "for", "DiskBlockCacheService", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/disk_block_cache_service.go#L166-L189
159,131
keybase/client
go/stellar/bundle/boxer.go
BoxAndEncode
func BoxAndEncode(a *stellar1.Bundle, pukGen keybase1.PerUserKeyGeneration, puk libkb.PerUserKeySeed) (*BoxedEncoded, error) { err := a.CheckInvariants() if err != nil { return nil, err } accountsVisible, accountsSecret := visibilitySplit(a) // visible portion parent visibleV2 := newVisibleParent(a, accountsV...
go
func BoxAndEncode(a *stellar1.Bundle, pukGen keybase1.PerUserKeyGeneration, puk libkb.PerUserKeySeed) (*BoxedEncoded, error) { err := a.CheckInvariants() if err != nil { return nil, err } accountsVisible, accountsSecret := visibilitySplit(a) // visible portion parent visibleV2 := newVisibleParent(a, accountsV...
[ "func", "BoxAndEncode", "(", "a", "*", "stellar1", ".", "Bundle", ",", "pukGen", "keybase1", ".", "PerUserKeyGeneration", ",", "puk", "libkb", ".", "PerUserKeySeed", ")", "(", "*", "BoxedEncoded", ",", "error", ")", "{", "err", ":=", "a", ".", "CheckInvari...
// BoxAndEncode encrypts and encodes a Bundle object.
[ "BoxAndEncode", "encrypts", "and", "encodes", "a", "Bundle", "object", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/bundle/boxer.go#L64-L111
159,132
keybase/client
go/stellar/bundle/boxer.go
unboxParent
func unboxParent(encBundle stellar1.EncryptedBundle, hash stellar1.Hash, visB64 string, puk libkb.PerUserKeySeed) (*stellar1.Bundle, stellar1.BundleVersion, error) { versioned, err := decryptParent(encBundle, puk) if err != nil { return nil, 0, err } version, err := versioned.Version() if err != nil { return n...
go
func unboxParent(encBundle stellar1.EncryptedBundle, hash stellar1.Hash, visB64 string, puk libkb.PerUserKeySeed) (*stellar1.Bundle, stellar1.BundleVersion, error) { versioned, err := decryptParent(encBundle, puk) if err != nil { return nil, 0, err } version, err := versioned.Version() if err != nil { return n...
[ "func", "unboxParent", "(", "encBundle", "stellar1", ".", "EncryptedBundle", ",", "hash", "stellar1", ".", "Hash", ",", "visB64", "string", ",", "puk", "libkb", ".", "PerUserKeySeed", ")", "(", "*", "stellar1", ".", "Bundle", ",", "stellar1", ".", "BundleVer...
// unboxParent unboxes an encrypted parent bundle and decodes the visual portion of the bundle. // It validates the visible hash in the secret portion.
[ "unboxParent", "unboxes", "an", "encrypted", "parent", "bundle", "and", "decodes", "the", "visual", "portion", "of", "the", "bundle", ".", "It", "validates", "the", "visible", "hash", "in", "the", "secret", "portion", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/bundle/boxer.go#L330-L357
159,133
keybase/client
go/stellar/bundle/boxer.go
decryptParent
func decryptParent(encBundle stellar1.EncryptedBundle, puk libkb.PerUserKeySeed) (res stellar1.BundleSecretVersioned, err error) { switch encBundle.V { case 1: // CORE-8135 return res, fmt.Errorf("stellar secret bundle encryption version 1 has been retired") case 2: default: return res, fmt.Errorf("unsupporte...
go
func decryptParent(encBundle stellar1.EncryptedBundle, puk libkb.PerUserKeySeed) (res stellar1.BundleSecretVersioned, err error) { switch encBundle.V { case 1: // CORE-8135 return res, fmt.Errorf("stellar secret bundle encryption version 1 has been retired") case 2: default: return res, fmt.Errorf("unsupporte...
[ "func", "decryptParent", "(", "encBundle", "stellar1", ".", "EncryptedBundle", ",", "puk", "libkb", ".", "PerUserKeySeed", ")", "(", "res", "stellar1", ".", "BundleSecretVersioned", ",", "err", "error", ")", "{", "switch", "encBundle", ".", "V", "{", "case", ...
// decryptParent decrypts an encrypted parent bundle with the provided puk.
[ "decryptParent", "decrypts", "an", "encrypted", "parent", "bundle", "with", "the", "provided", "puk", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/bundle/boxer.go#L379-L407
159,134
keybase/client
go/stellar/bundle/boxer.go
decode
func decode(encryptedB64 string) (stellar1.EncryptedAccountBundle, stellar1.Hash, error) { cipherpack, err := base64.StdEncoding.DecodeString(encryptedB64) if err != nil { return stellar1.EncryptedAccountBundle{}, stellar1.Hash{}, err } encHash := sha256.Sum256(cipherpack) var enc stellar1.EncryptedAccountBundle...
go
func decode(encryptedB64 string) (stellar1.EncryptedAccountBundle, stellar1.Hash, error) { cipherpack, err := base64.StdEncoding.DecodeString(encryptedB64) if err != nil { return stellar1.EncryptedAccountBundle{}, stellar1.Hash{}, err } encHash := sha256.Sum256(cipherpack) var enc stellar1.EncryptedAccountBundle...
[ "func", "decode", "(", "encryptedB64", "string", ")", "(", "stellar1", ".", "EncryptedAccountBundle", ",", "stellar1", ".", "Hash", ",", "error", ")", "{", "cipherpack", ",", "err", ":=", "base64", ".", "StdEncoding", ".", "DecodeString", "(", "encryptedB64", ...
// decode decodes a base64-encoded encrypted account bundle.
[ "decode", "decodes", "a", "base64", "-", "encoded", "encrypted", "account", "bundle", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/bundle/boxer.go#L410-L421
159,135
keybase/client
go/stellar/bundle/boxer.go
unbox
func unbox(encBundle stellar1.EncryptedAccountBundle, hash stellar1.Hash /* visB64 string, */, puk libkb.PerUserKeySeed) (*stellar1.AccountBundle, stellar1.AccountBundleVersion, error) { versioned, err := decrypt(encBundle, puk) if err != nil { return nil, 0, err } version, err := versioned.Version() if err != n...
go
func unbox(encBundle stellar1.EncryptedAccountBundle, hash stellar1.Hash /* visB64 string, */, puk libkb.PerUserKeySeed) (*stellar1.AccountBundle, stellar1.AccountBundleVersion, error) { versioned, err := decrypt(encBundle, puk) if err != nil { return nil, 0, err } version, err := versioned.Version() if err != n...
[ "func", "unbox", "(", "encBundle", "stellar1", ".", "EncryptedAccountBundle", ",", "hash", "stellar1", ".", "Hash", "/* visB64 string, */", ",", "puk", "libkb", ".", "PerUserKeySeed", ")", "(", "*", "stellar1", ".", "AccountBundle", ",", "stellar1", ".", "Accoun...
// unbox unboxes an encrypted account bundle and decodes the visual portion of the bundle. // It validates the visible hash in the secret portion.
[ "unbox", "unboxes", "an", "encrypted", "account", "bundle", "and", "decodes", "the", "visual", "portion", "of", "the", "bundle", ".", "It", "validates", "the", "visible", "hash", "in", "the", "secret", "portion", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/bundle/boxer.go#L425-L463
159,136
keybase/client
go/stellar/bundle/boxer.go
decrypt
func decrypt(encBundle stellar1.EncryptedAccountBundle, puk libkb.PerUserKeySeed) (stellar1.AccountBundleSecretVersioned, error) { var empty stellar1.AccountBundleSecretVersioned if encBundle.V != 1 { return empty, errors.New("invalid stellar secret account bundle encryption version") } // Derive key reason := ...
go
func decrypt(encBundle stellar1.EncryptedAccountBundle, puk libkb.PerUserKeySeed) (stellar1.AccountBundleSecretVersioned, error) { var empty stellar1.AccountBundleSecretVersioned if encBundle.V != 1 { return empty, errors.New("invalid stellar secret account bundle encryption version") } // Derive key reason := ...
[ "func", "decrypt", "(", "encBundle", "stellar1", ".", "EncryptedAccountBundle", ",", "puk", "libkb", ".", "PerUserKeySeed", ")", "(", "stellar1", ".", "AccountBundleSecretVersioned", ",", "error", ")", "{", "var", "empty", "stellar1", ".", "AccountBundleSecretVersio...
// decrypt decrypts an encrypted account bundle with the provided puk.
[ "decrypt", "decrypts", "an", "encrypted", "account", "bundle", "with", "the", "provided", "puk", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/bundle/boxer.go#L466-L494
159,137
keybase/client
go/stellar/bundle/boxer.go
merge
func merge(secret stellar1.BundleSecretV2, visible stellar1.BundleVisibleV2) (stellar1.Bundle, error) { if len(secret.Accounts) != len(visible.Accounts) { return stellar1.Bundle{}, errors.New("invalid bundle, mismatched number of visible and secret accounts") } accounts := convertVisibleAccounts(visible.Accounts) ...
go
func merge(secret stellar1.BundleSecretV2, visible stellar1.BundleVisibleV2) (stellar1.Bundle, error) { if len(secret.Accounts) != len(visible.Accounts) { return stellar1.Bundle{}, errors.New("invalid bundle, mismatched number of visible and secret accounts") } accounts := convertVisibleAccounts(visible.Accounts) ...
[ "func", "merge", "(", "secret", "stellar1", ".", "BundleSecretV2", ",", "visible", "stellar1", ".", "BundleVisibleV2", ")", "(", "stellar1", ".", "Bundle", ",", "error", ")", "{", "if", "len", "(", "secret", ".", "Accounts", ")", "!=", "len", "(", "visib...
// merge combines the versioned secret account bundle and the visible account bundle into // a stellar1.AccountBundle for local use.
[ "merge", "combines", "the", "versioned", "secret", "account", "bundle", "and", "the", "visible", "account", "bundle", "into", "a", "stellar1", ".", "AccountBundle", "for", "local", "use", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/bundle/boxer.go#L511-L529
159,138
keybase/client
go/engine/saltpack_verify.go
NewSaltpackVerify
func NewSaltpackVerify(g *libkb.GlobalContext, arg *SaltpackVerifyArg) *SaltpackVerify { return &SaltpackVerify{ arg: arg, Contextified: libkb.NewContextified(g), } }
go
func NewSaltpackVerify(g *libkb.GlobalContext, arg *SaltpackVerifyArg) *SaltpackVerify { return &SaltpackVerify{ arg: arg, Contextified: libkb.NewContextified(g), } }
[ "func", "NewSaltpackVerify", "(", "g", "*", "libkb", ".", "GlobalContext", ",", "arg", "*", "SaltpackVerifyArg", ")", "*", "SaltpackVerify", "{", "return", "&", "SaltpackVerify", "{", "arg", ":", "arg", ",", "Contextified", ":", "libkb", ".", "NewContextified"...
// NewSaltpackVerify creates a SaltpackVerify engine.
[ "NewSaltpackVerify", "creates", "a", "SaltpackVerify", "engine", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/engine/saltpack_verify.go#L28-L33
159,139
keybase/client
go/kbun/username.go
CheckUsername
func CheckUsername(s string) bool { return len(s) >= 2 && len(s) <= 16 && usernameRE.MatchString(s) }
go
func CheckUsername(s string) bool { return len(s) >= 2 && len(s) <= 16 && usernameRE.MatchString(s) }
[ "func", "CheckUsername", "(", "s", "string", ")", "bool", "{", "return", "len", "(", "s", ")", ">=", "2", "&&", "len", "(", "s", ")", "<=", "16", "&&", "usernameRE", ".", "MatchString", "(", "s", ")", "\n", "}" ]
// CheckUsername returns true if the given string can be a Keybase // username.
[ "CheckUsername", "returns", "true", "if", "the", "given", "string", "can", "be", "a", "Keybase", "username", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbun/username.go#L16-L18
159,140
keybase/client
go/kbun/username.go
Eq
func (n NormalizedUsername) Eq(n2 NormalizedUsername) bool { return string(n) == string(n2) }
go
func (n NormalizedUsername) Eq(n2 NormalizedUsername) bool { return string(n) == string(n2) }
[ "func", "(", "n", "NormalizedUsername", ")", "Eq", "(", "n2", "NormalizedUsername", ")", "bool", "{", "return", "string", "(", "n", ")", "==", "string", "(", "n2", ")", "\n", "}" ]
// Eq returns true if the given normalized usernames are equal
[ "Eq", "returns", "true", "if", "the", "given", "normalized", "usernames", "are", "equal" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbun/username.go#L32-L34
159,141
keybase/client
go/chat/search/storage.go
deleteOldVersions
func (s *store) deleteOldVersions(ctx context.Context, keyFn func(int) (libkb.DbKey, error), maxVersion int) { for version := 1; version < maxVersion; version++ { key, err := keyFn(version) if err != nil { s.Debug(ctx, "unable to get key for version %d, %v", version, err) continue } s.Debug(ctx, "cleanin...
go
func (s *store) deleteOldVersions(ctx context.Context, keyFn func(int) (libkb.DbKey, error), maxVersion int) { for version := 1; version < maxVersion; version++ { key, err := keyFn(version) if err != nil { s.Debug(ctx, "unable to get key for version %d, %v", version, err) continue } s.Debug(ctx, "cleanin...
[ "func", "(", "s", "*", "store", ")", "deleteOldVersions", "(", "ctx", "context", ".", "Context", ",", "keyFn", "func", "(", "int", ")", "(", "libkb", ".", "DbKey", ",", "error", ")", ",", "maxVersion", "int", ")", "{", "for", "version", ":=", "1", ...
// deleteOldVersions purges old disk structures so we don't error out on msg // pack decode or strand indexes with ephemeral content.
[ "deleteOldVersions", "purges", "old", "disk", "structures", "so", "we", "don", "t", "error", "out", "on", "msg", "pack", "decode", "or", "strand", "indexes", "with", "ephemeral", "content", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/chat/search/storage.go#L169-L181
159,142
keybase/client
go/chat/search/storage.go
addTokens
func (s *store) addTokens(ctx context.Context, batch *addTokenBatch, uid gregor1.UID, convID chat1.ConversationID, tokens tokenMap, msgID chat1.MessageID) error { for token, aliases := range tokens { // Update the token entry with the msg ID hit te, err := s.getTokenEntryWithBatch(ctx, batch, uid, convID, token) ...
go
func (s *store) addTokens(ctx context.Context, batch *addTokenBatch, uid gregor1.UID, convID chat1.ConversationID, tokens tokenMap, msgID chat1.MessageID) error { for token, aliases := range tokens { // Update the token entry with the msg ID hit te, err := s.getTokenEntryWithBatch(ctx, batch, uid, convID, token) ...
[ "func", "(", "s", "*", "store", ")", "addTokens", "(", "ctx", "context", ".", "Context", ",", "batch", "*", "addTokenBatch", ",", "uid", "gregor1", ".", "UID", ",", "convID", "chat1", ".", "ConversationID", ",", "tokens", "tokenMap", ",", "msgID", "chat1...
// addTokens add the given tokens to the index under the given message // id, when ingesting EDIT messages the msgID is of the superseded msg but the // tokens are from the EDIT itself.
[ "addTokens", "add", "the", "given", "tokens", "to", "the", "index", "under", "the", "given", "message", "id", "when", "ingesting", "EDIT", "messages", "the", "msgID", "is", "of", "the", "superseded", "msg", "but", "the", "tokens", "are", "from", "the", "ED...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/chat/search/storage.go#L406-L426
159,143
keybase/client
go/service/device.go
NewDeviceHandler
func NewDeviceHandler(xp rpc.Transporter, g *libkb.GlobalContext, gregor *gregorHandler) *DeviceHandler { return &DeviceHandler{ BaseHandler: NewBaseHandler(g, xp), Contextified: libkb.NewContextified(g), gregor: gregor, } }
go
func NewDeviceHandler(xp rpc.Transporter, g *libkb.GlobalContext, gregor *gregorHandler) *DeviceHandler { return &DeviceHandler{ BaseHandler: NewBaseHandler(g, xp), Contextified: libkb.NewContextified(g), gregor: gregor, } }
[ "func", "NewDeviceHandler", "(", "xp", "rpc", ".", "Transporter", ",", "g", "*", "libkb", ".", "GlobalContext", ",", "gregor", "*", "gregorHandler", ")", "*", "DeviceHandler", "{", "return", "&", "DeviceHandler", "{", "BaseHandler", ":", "NewBaseHandler", "(",...
// NewDeviceHandler creates a DeviceHandler for the xp transport.
[ "NewDeviceHandler", "creates", "a", "DeviceHandler", "for", "the", "xp", "transport", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/service/device.go#L26-L32
159,144
keybase/client
go/service/device.go
DeviceList
func (h *DeviceHandler) DeviceList(ctx context.Context, sessionID int) ([]keybase1.Device, error) { uis := libkb.UIs{ LogUI: h.getLogUI(sessionID), SessionID: sessionID, } eng := engine.NewDevList(h.G()) m := libkb.NewMetaContext(ctx, h.G()).WithUIs(uis) if err := engine.RunEngine2(m, eng); err != nil { ...
go
func (h *DeviceHandler) DeviceList(ctx context.Context, sessionID int) ([]keybase1.Device, error) { uis := libkb.UIs{ LogUI: h.getLogUI(sessionID), SessionID: sessionID, } eng := engine.NewDevList(h.G()) m := libkb.NewMetaContext(ctx, h.G()).WithUIs(uis) if err := engine.RunEngine2(m, eng); err != nil { ...
[ "func", "(", "h", "*", "DeviceHandler", ")", "DeviceList", "(", "ctx", "context", ".", "Context", ",", "sessionID", "int", ")", "(", "[", "]", "keybase1", ".", "Device", ",", "error", ")", "{", "uis", ":=", "libkb", ".", "UIs", "{", "LogUI", ":", "...
// DeviceList returns a list of all the devices for a user.
[ "DeviceList", "returns", "a", "list", "of", "all", "the", "devices", "for", "a", "user", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/service/device.go#L35-L46
159,145
keybase/client
go/service/device.go
DeviceHistoryList
func (h *DeviceHandler) DeviceHistoryList(nctx context.Context, sessionID int) ([]keybase1.DeviceDetail, error) { uis := libkb.UIs{ LogUI: h.getLogUI(sessionID), SessionID: sessionID, } eng := engine.NewDeviceHistorySelf(h.G()) m := libkb.NewMetaContext(nctx, h.G()).WithUIs(uis) if err := engine.RunEngine2...
go
func (h *DeviceHandler) DeviceHistoryList(nctx context.Context, sessionID int) ([]keybase1.DeviceDetail, error) { uis := libkb.UIs{ LogUI: h.getLogUI(sessionID), SessionID: sessionID, } eng := engine.NewDeviceHistorySelf(h.G()) m := libkb.NewMetaContext(nctx, h.G()).WithUIs(uis) if err := engine.RunEngine2...
[ "func", "(", "h", "*", "DeviceHandler", ")", "DeviceHistoryList", "(", "nctx", "context", ".", "Context", ",", "sessionID", "int", ")", "(", "[", "]", "keybase1", ".", "DeviceDetail", ",", "error", ")", "{", "uis", ":=", "libkb", ".", "UIs", "{", "LogU...
// DeviceHistoryList returns a list of all the devices for a user, // with detailed history and provisioner, revoker information.
[ "DeviceHistoryList", "returns", "a", "list", "of", "all", "the", "devices", "for", "a", "user", "with", "detailed", "history", "and", "provisioner", "revoker", "information", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/service/device.go#L50-L61
159,146
keybase/client
go/service/device.go
CheckDeviceNameFormat
func (h *DeviceHandler) CheckDeviceNameFormat(_ context.Context, arg keybase1.CheckDeviceNameFormatArg) (bool, error) { ok := libkb.CheckDeviceName.F(arg.Name) if ok { return ok, nil } return false, errors.New(libkb.CheckDeviceName.Hint) }
go
func (h *DeviceHandler) CheckDeviceNameFormat(_ context.Context, arg keybase1.CheckDeviceNameFormatArg) (bool, error) { ok := libkb.CheckDeviceName.F(arg.Name) if ok { return ok, nil } return false, errors.New(libkb.CheckDeviceName.Hint) }
[ "func", "(", "h", "*", "DeviceHandler", ")", "CheckDeviceNameFormat", "(", "_", "context", ".", "Context", ",", "arg", "keybase1", ".", "CheckDeviceNameFormatArg", ")", "(", "bool", ",", "error", ")", "{", "ok", ":=", "libkb", ".", "CheckDeviceName", ".", ...
// CheckDeviceNameFormat verifies that the device name has a valid // format.
[ "CheckDeviceNameFormat", "verifies", "that", "the", "device", "name", "has", "a", "valid", "format", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/service/device.go#L78-L84
159,147
keybase/client
go/client/cmd_ctl_start_osx.go
NewCmdCtlStart
func NewCmdCtlStart(cl *libcmdline.CommandLine, g *libkb.GlobalContext) cli.Command { return cli.Command{ Name: "start", Usage: "Start the app and services", Flags: []cli.Flag{ cli.StringFlag{ Name: "include", Usage: fmt.Sprintf("Stop only specified components, comma separated. Specify %v.", availab...
go
func NewCmdCtlStart(cl *libcmdline.CommandLine, g *libkb.GlobalContext) cli.Command { return cli.Command{ Name: "start", Usage: "Start the app and services", Flags: []cli.Flag{ cli.StringFlag{ Name: "include", Usage: fmt.Sprintf("Stop only specified components, comma separated. Specify %v.", availab...
[ "func", "NewCmdCtlStart", "(", "cl", "*", "libcmdline", ".", "CommandLine", ",", "g", "*", "libkb", ".", "GlobalContext", ")", "cli", ".", "Command", "{", "return", "cli", ".", "Command", "{", "Name", ":", "\"", "\"", ",", "Usage", ":", "\"", "\"", "...
// NewCmdCtlStart constructs ctl start command
[ "NewCmdCtlStart", "constructs", "ctl", "start", "command" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/client/cmd_ctl_start_osx.go#L18-L39
159,148
keybase/client
go/kbfs/libkbfs/md_journal.go
MakeImmutableBareRootMetadata
func MakeImmutableBareRootMetadata( rmd kbfsmd.RootMetadata, extra kbfsmd.ExtraMetadata, mdID kbfsmd.ID, localTimestamp time.Time) ImmutableBareRootMetadata { if mdID == (kbfsmd.ID{}) { panic("zero mdID passed to MakeImmutableBareRootMetadata") } return ImmutableBareRootMetadata{rmd, extra, mdID, localTimestamp}...
go
func MakeImmutableBareRootMetadata( rmd kbfsmd.RootMetadata, extra kbfsmd.ExtraMetadata, mdID kbfsmd.ID, localTimestamp time.Time) ImmutableBareRootMetadata { if mdID == (kbfsmd.ID{}) { panic("zero mdID passed to MakeImmutableBareRootMetadata") } return ImmutableBareRootMetadata{rmd, extra, mdID, localTimestamp}...
[ "func", "MakeImmutableBareRootMetadata", "(", "rmd", "kbfsmd", ".", "RootMetadata", ",", "extra", "kbfsmd", ".", "ExtraMetadata", ",", "mdID", "kbfsmd", ".", "ID", ",", "localTimestamp", "time", ".", "Time", ")", "ImmutableBareRootMetadata", "{", "if", "mdID", "...
// MakeImmutableBareRootMetadata makes a new ImmutableBareRootMetadata // from the given BareRootMetadata and its corresponding MdID.
[ "MakeImmutableBareRootMetadata", "makes", "a", "new", "ImmutableBareRootMetadata", "from", "the", "given", "BareRootMetadata", "and", "its", "corresponding", "MdID", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/md_journal.go#L47-L54
159,149
keybase/client
go/kbfs/libkbfs/md_journal.go
MakeBareTlfHandleWithExtra
func (ibrmd ImmutableBareRootMetadata) MakeBareTlfHandleWithExtra() ( tlf.Handle, error) { return ibrmd.RootMetadata.MakeBareTlfHandle(ibrmd.extra) }
go
func (ibrmd ImmutableBareRootMetadata) MakeBareTlfHandleWithExtra() ( tlf.Handle, error) { return ibrmd.RootMetadata.MakeBareTlfHandle(ibrmd.extra) }
[ "func", "(", "ibrmd", "ImmutableBareRootMetadata", ")", "MakeBareTlfHandleWithExtra", "(", ")", "(", "tlf", ".", "Handle", ",", "error", ")", "{", "return", "ibrmd", ".", "RootMetadata", ".", "MakeBareTlfHandle", "(", "ibrmd", ".", "extra", ")", "\n", "}" ]
// MakeBareTlfHandleWithExtra makes a BareTlfHandle for this // ImmutableBareRootMetadata. Should be used only by servers and MDOps.
[ "MakeBareTlfHandleWithExtra", "makes", "a", "BareTlfHandle", "for", "this", "ImmutableBareRootMetadata", ".", "Should", "be", "used", "only", "by", "servers", "and", "MDOps", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/md_journal.go#L58-L61
159,150
keybase/client
go/kbfs/libkbfs/md_journal.go
getExtraMetadata
func (j mdJournal) getExtraMetadata( wkbID kbfsmd.TLFWriterKeyBundleID, rkbID kbfsmd.TLFReaderKeyBundleID, wkbNew, rkbNew bool) (kbfsmd.ExtraMetadata, error) { if (wkbID == kbfsmd.TLFWriterKeyBundleID{}) != (rkbID == kbfsmd.TLFReaderKeyBundleID{}) { return nil, errors.Errorf( "wkbID is empty (%t) != rkbID is ...
go
func (j mdJournal) getExtraMetadata( wkbID kbfsmd.TLFWriterKeyBundleID, rkbID kbfsmd.TLFReaderKeyBundleID, wkbNew, rkbNew bool) (kbfsmd.ExtraMetadata, error) { if (wkbID == kbfsmd.TLFWriterKeyBundleID{}) != (rkbID == kbfsmd.TLFReaderKeyBundleID{}) { return nil, errors.Errorf( "wkbID is empty (%t) != rkbID is ...
[ "func", "(", "j", "mdJournal", ")", "getExtraMetadata", "(", "wkbID", "kbfsmd", ".", "TLFWriterKeyBundleID", ",", "rkbID", "kbfsmd", ".", "TLFReaderKeyBundleID", ",", "wkbNew", ",", "rkbNew", "bool", ")", "(", "kbfsmd", ".", "ExtraMetadata", ",", "error", ")",...
// getExtraMetadata gets the extra metadata corresponding to the given // IDs, if any, after checking them.
[ "getExtraMetadata", "gets", "the", "extra", "metadata", "corresponding", "to", "the", "given", "IDs", "if", "any", "after", "checking", "them", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/md_journal.go#L326-L364
159,151
keybase/client
go/kbfs/libkbfs/md_journal.go
getEarliestWithExtra
func (j mdJournal) getEarliestWithExtra( ctx context.Context, verifyBranchID bool) ( kbfsmd.ID, kbfsmd.MutableRootMetadata, kbfsmd.ExtraMetadata, time.Time, error) { entry, exists, err := j.j.getEarliestEntry() if err != nil { return kbfsmd.ID{}, nil, nil, time.Time{}, err } if !exists { return kbfsmd.ID{}, n...
go
func (j mdJournal) getEarliestWithExtra( ctx context.Context, verifyBranchID bool) ( kbfsmd.ID, kbfsmd.MutableRootMetadata, kbfsmd.ExtraMetadata, time.Time, error) { entry, exists, err := j.j.getEarliestEntry() if err != nil { return kbfsmd.ID{}, nil, nil, time.Time{}, err } if !exists { return kbfsmd.ID{}, n...
[ "func", "(", "j", "mdJournal", ")", "getEarliestWithExtra", "(", "ctx", "context", ".", "Context", ",", "verifyBranchID", "bool", ")", "(", "kbfsmd", ".", "ID", ",", "kbfsmd", ".", "MutableRootMetadata", ",", "kbfsmd", ".", "ExtraMetadata", ",", "time", ".",...
// getEarliestWithExtra returns a kbfsmd.MutableRootMetadata so that it // can be put in a RootMetadataSigned object.
[ "getEarliestWithExtra", "returns", "a", "kbfsmd", ".", "MutableRootMetadata", "so", "that", "it", "can", "be", "put", "in", "a", "RootMetadataSigned", "object", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/md_journal.go#L557-L573
159,152
keybase/client
go/kbfs/libkbfs/md_journal.go
clearHelper
func (j *mdJournal) clearHelper(ctx context.Context, bid kbfsmd.BranchID, earliestBranchRevision kbfsmd.Revision) (err error) { j.log.CDebugf(ctx, "Clearing journal for branch %s", bid) defer func() { if err != nil { j.deferLog.CDebugf(ctx, "Clearing journal for branch %s failed with %+v", bid, err) }...
go
func (j *mdJournal) clearHelper(ctx context.Context, bid kbfsmd.BranchID, earliestBranchRevision kbfsmd.Revision) (err error) { j.log.CDebugf(ctx, "Clearing journal for branch %s", bid) defer func() { if err != nil { j.deferLog.CDebugf(ctx, "Clearing journal for branch %s failed with %+v", bid, err) }...
[ "func", "(", "j", "*", "mdJournal", ")", "clearHelper", "(", "ctx", "context", ".", "Context", ",", "bid", "kbfsmd", ".", "BranchID", ",", "earliestBranchRevision", "kbfsmd", ".", "Revision", ")", "(", "err", "error", ")", "{", "j", ".", "log", ".", "C...
// clearHelper removes all the journal entries starting from // earliestBranchRevision and deletes the corresponding MD // updates. All MDs from earliestBranchRevision onwards must have // branch equal to the given one, which must not be kbfsmd.NullBranchID. This // means that, if bid != kbfsmd.PendingLocalSquashBranch...
[ "clearHelper", "removes", "all", "the", "journal", "entries", "starting", "from", "earliestBranchRevision", "and", "deletes", "the", "corresponding", "MD", "updates", ".", "All", "MDs", "from", "earliestBranchRevision", "onwards", "must", "have", "branch", "equal", ...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/md_journal.go#L944-L1012
159,153
keybase/client
go/kbfs/libkbfs/md_journal.go
clear
func (j *mdJournal) clear(ctx context.Context, bid kbfsmd.BranchID) error { earliestBranchRevision, err := j.j.readEarliestRevision() if err != nil { return err } if earliestBranchRevision != kbfsmd.RevisionUninitialized && bid == kbfsmd.PendingLocalSquashBranchID { latestRevision, err := j.j.readLatestRevis...
go
func (j *mdJournal) clear(ctx context.Context, bid kbfsmd.BranchID) error { earliestBranchRevision, err := j.j.readEarliestRevision() if err != nil { return err } if earliestBranchRevision != kbfsmd.RevisionUninitialized && bid == kbfsmd.PendingLocalSquashBranchID { latestRevision, err := j.j.readLatestRevis...
[ "func", "(", "j", "*", "mdJournal", ")", "clear", "(", "ctx", "context", ".", "Context", ",", "bid", "kbfsmd", ".", "BranchID", ")", "error", "{", "earliestBranchRevision", ",", "err", ":=", "j", ".", "j", ".", "readEarliestRevision", "(", ")", "\n", "...
// clear removes all the journal entries, and deletes the // corresponding MD updates. If the branch is a pending local squash, // it preserves the MD updates corresponding to the prefix of existing // local squashes, so they can be re-used in the newly-resolved // journal.
[ "clear", "removes", "all", "the", "journal", "entries", "and", "deletes", "the", "corresponding", "MD", "updates", ".", "If", "the", "branch", "is", "a", "pending", "local", "squash", "it", "preserves", "the", "MD", "updates", "corresponding", "to", "the", "...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/md_journal.go#L1403-L1428
159,154
keybase/client
go/kbfs/kbfsmd/errors.go
Error
func (e MDRevisionMismatch) Error() string { return fmt.Sprintf("MD revision %d isn't next in line for our "+ "current revision %d", e.Rev, e.Curr) }
go
func (e MDRevisionMismatch) Error() string { return fmt.Sprintf("MD revision %d isn't next in line for our "+ "current revision %d", e.Rev, e.Curr) }
[ "func", "(", "e", "MDRevisionMismatch", ")", "Error", "(", ")", "string", "{", "return", "fmt", ".", "Sprintf", "(", "\"", "\"", "+", "\"", "\"", ",", "e", ".", "Rev", ",", "e", ".", "Curr", ")", "\n", "}" ]
// Error implements the error interface for MDRevisionMismatch.
[ "Error", "implements", "the", "error", "interface", "for", "MDRevisionMismatch", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfsmd/errors.go#L65-L68
159,155
keybase/client
go/kbfs/kbfsmd/errors.go
Error
func (e InvalidNonPrivateTLFOperation) Error() string { return fmt.Sprintf( "Tried to do invalid operation %s on non-private TLF %v (ver=%v)", e.opName, e.id, e.ver) }
go
func (e InvalidNonPrivateTLFOperation) Error() string { return fmt.Sprintf( "Tried to do invalid operation %s on non-private TLF %v (ver=%v)", e.opName, e.id, e.ver) }
[ "func", "(", "e", "InvalidNonPrivateTLFOperation", ")", "Error", "(", ")", "string", "{", "return", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "e", ".", "opName", ",", "e", ".", "id", ",", "e", ".", "ver", ")", "\n", "}" ]
// Error implements the error interface for InvalidNonPrivateTLFOperation.
[ "Error", "implements", "the", "error", "interface", "for", "InvalidNonPrivateTLFOperation", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfsmd/errors.go#L103-L107
159,156
keybase/client
go/kbfs/kbfsmd/errors.go
Error
func (e InvalidKeyGenerationError) Error() string { return fmt.Sprintf("Invalid key generation %d for %s", int(e.KeyGen), e.TlfID) }
go
func (e InvalidKeyGenerationError) Error() string { return fmt.Sprintf("Invalid key generation %d for %s", int(e.KeyGen), e.TlfID) }
[ "func", "(", "e", "InvalidKeyGenerationError", ")", "Error", "(", ")", "string", "{", "return", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "int", "(", "e", ".", "KeyGen", ")", ",", "e", ".", "TlfID", ")", "\n", "}" ]
// Error implements the error interface for InvalidKeyGenerationError.
[ "Error", "implements", "the", "error", "interface", "for", "InvalidKeyGenerationError", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfsmd/errors.go#L117-L119
159,157
keybase/client
go/kbfs/kbfsmd/errors.go
Error
func (e NewKeyGenerationError) Error() string { return fmt.Sprintf( "The data for %v is keyed with a key generation (%d) that "+ "we don't know", e.TlfID, e.KeyGen) }
go
func (e NewKeyGenerationError) Error() string { return fmt.Sprintf( "The data for %v is keyed with a key generation (%d) that "+ "we don't know", e.TlfID, e.KeyGen) }
[ "func", "(", "e", "NewKeyGenerationError", ")", "Error", "(", ")", "string", "{", "return", "fmt", ".", "Sprintf", "(", "\"", "\"", "+", "\"", "\"", ",", "e", ".", "TlfID", ",", "e", ".", "KeyGen", ")", "\n", "}" ]
// Error implements the error interface for NewKeyGenerationError.
[ "Error", "implements", "the", "error", "interface", "for", "NewKeyGenerationError", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfsmd/errors.go#L129-L133
159,158
keybase/client
go/kbfs/kbfsmd/errors.go
Error
func (e InvalidMetadataVersionError) Error() string { return fmt.Sprintf("Invalid metadata version %d for folder %s", int(e.MetadataVer), e.TlfID) }
go
func (e InvalidMetadataVersionError) Error() string { return fmt.Sprintf("Invalid metadata version %d for folder %s", int(e.MetadataVer), e.TlfID) }
[ "func", "(", "e", "InvalidMetadataVersionError", ")", "Error", "(", ")", "string", "{", "return", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "int", "(", "e", ".", "MetadataVer", ")", ",", "e", ".", "TlfID", ")", "\n", "}" ]
// Error implements the error interface for InvalidMetadataVersionError.
[ "Error", "implements", "the", "error", "interface", "for", "InvalidMetadataVersionError", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfsmd/errors.go#L157-L160
159,159
keybase/client
go/kbfs/kbfsmd/errors.go
Error
func (e NewMetadataVersionError) Error() string { return fmt.Sprintf( "The metadata for folder %s is of a version (%d) that we can't read", e.Tlf, e.MetadataVer) }
go
func (e NewMetadataVersionError) Error() string { return fmt.Sprintf( "The metadata for folder %s is of a version (%d) that we can't read", e.Tlf, e.MetadataVer) }
[ "func", "(", "e", "NewMetadataVersionError", ")", "Error", "(", ")", "string", "{", "return", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "e", ".", "Tlf", ",", "e", ".", "MetadataVer", ")", "\n", "}" ]
// Error implements the error interface for NewMetadataVersionError.
[ "Error", "implements", "the", "error", "interface", "for", "NewMetadataVersionError", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfsmd/errors.go#L171-L175
159,160
keybase/client
go/libkb/constants.go
ProofUserAgent
func ProofUserAgent() string { var os string if runtime.GOOS == "darwin" { // Either ios or mac if isIOS { os = "ios" } else { os = "mac" } } else { os = runtime.GOOS } return fmt.Sprintf("%s:%s", os, Version) }
go
func ProofUserAgent() string { var os string if runtime.GOOS == "darwin" { // Either ios or mac if isIOS { os = "ios" } else { os = "mac" } } else { os = runtime.GOOS } return fmt.Sprintf("%s:%s", os, Version) }
[ "func", "ProofUserAgent", "(", ")", "string", "{", "var", "os", "string", "\n", "if", "runtime", ".", "GOOS", "==", "\"", "\"", "{", "// Either ios or mac", "if", "isIOS", "{", "os", "=", "\"", "\"", "\n", "}", "else", "{", "os", "=", "\"", "\"", "...
// Returns a simplified UserAgent that's used as the kb_ua GET param.
[ "Returns", "a", "simplified", "UserAgent", "that", "s", "used", "as", "the", "kb_ua", "GET", "param", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/constants.go#L94-L108
159,161
keybase/client
go/gregor/storage/mem_sm.go
isDismissedAt
func (i item) isDismissedAt(t time.Time) bool { if i.dismissedImmediate { return true } if i.dtime != nil && isBeforeOrSame(*i.dtime, t) { return true } if dt := i.item.DTime(); dt != nil && isBeforeOrSame(toTime(i.ctime, dt), t) { return true } return false }
go
func (i item) isDismissedAt(t time.Time) bool { if i.dismissedImmediate { return true } if i.dtime != nil && isBeforeOrSame(*i.dtime, t) { return true } if dt := i.item.DTime(); dt != nil && isBeforeOrSame(toTime(i.ctime, dt), t) { return true } return false }
[ "func", "(", "i", "item", ")", "isDismissedAt", "(", "t", "time", ".", "Time", ")", "bool", "{", "if", "i", ".", "dismissedImmediate", "{", "return", "true", "\n", "}", "\n", "if", "i", ".", "dtime", "!=", "nil", "&&", "isBeforeOrSame", "(", "*", "...
// isDismissedAt returns true if item i is dismissed at time t. It will always return // true if the `dismissedImmediate` flag was turned out.
[ "isDismissedAt", "returns", "true", "if", "item", "i", "is", "dismissed", "at", "time", "t", ".", "It", "will", "always", "return", "true", "if", "the", "dismissedImmediate", "flag", "was", "turned", "out", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/gregor/storage/mem_sm.go#L87-L98
159,162
keybase/client
go/gregor/storage/mem_sm.go
isDismissedAt
func (m loggedMsg) isDismissedAt(t time.Time) bool { return m.i != nil && m.i.isDismissedAt(t) }
go
func (m loggedMsg) isDismissedAt(t time.Time) bool { return m.i != nil && m.i.isDismissedAt(t) }
[ "func", "(", "m", "loggedMsg", ")", "isDismissedAt", "(", "t", "time", ".", "Time", ")", "bool", "{", "return", "m", ".", "i", "!=", "nil", "&&", "m", ".", "i", ".", "isDismissedAt", "(", "t", ")", "\n", "}" ]
// isDismissedAt returns true if the log message has an associated item // and that item was dismissed at time t.
[ "isDismissedAt", "returns", "true", "if", "the", "log", "message", "has", "an", "associated", "item", "and", "that", "item", "was", "dismissed", "at", "time", "t", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/gregor/storage/mem_sm.go#L102-L104
159,163
keybase/client
go/gregor/storage/mem_sm.go
addItem
func (u *user) addItem(now time.Time, i gregor.Item) *item { msgID := i.Metadata().MsgID().Bytes() for _, it := range u.items { if bytes.Equal(msgID, it.item.Metadata().MsgID().Bytes()) { return it } } newItem := &item{item: i, ctime: nowIfZero(now, i.Metadata().CTime())} if i.DTime() != nil { newItem.dti...
go
func (u *user) addItem(now time.Time, i gregor.Item) *item { msgID := i.Metadata().MsgID().Bytes() for _, it := range u.items { if bytes.Equal(msgID, it.item.Metadata().MsgID().Bytes()) { return it } } newItem := &item{item: i, ctime: nowIfZero(now, i.Metadata().CTime())} if i.DTime() != nil { newItem.dti...
[ "func", "(", "u", "*", "user", ")", "addItem", "(", "now", "time", ".", "Time", ",", "i", "gregor", ".", "Item", ")", "*", "item", "{", "msgID", ":=", "i", ".", "Metadata", "(", ")", ".", "MsgID", "(", ")", ".", "Bytes", "(", ")", "\n", "for"...
// addItem adds an item for this user
[ "addItem", "adds", "an", "item", "for", "this", "user" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/gregor/storage/mem_sm.go#L115-L128
159,164
keybase/client
go/gregor/storage/mem_sm.go
logMessage
func (u *user) logMessage(t time.Time, m gregor.InBandMessage, i *item) { for _, l := range u.log { if bytes.Equal(l.m.Metadata().MsgID().Bytes(), m.Metadata().MsgID().Bytes()) { return } } u.log = append(u.log, loggedMsg{m, t, i}) }
go
func (u *user) logMessage(t time.Time, m gregor.InBandMessage, i *item) { for _, l := range u.log { if bytes.Equal(l.m.Metadata().MsgID().Bytes(), m.Metadata().MsgID().Bytes()) { return } } u.log = append(u.log, loggedMsg{m, t, i}) }
[ "func", "(", "u", "*", "user", ")", "logMessage", "(", "t", "time", ".", "Time", ",", "m", "gregor", ".", "InBandMessage", ",", "i", "*", "item", ")", "{", "for", "_", ",", "l", ":=", "range", "u", ".", "log", "{", "if", "bytes", ".", "Equal", ...
// logMessage logs a message for this user and potentially associates an item
[ "logMessage", "logs", "a", "message", "for", "this", "user", "and", "potentially", "associates", "an", "item" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/gregor/storage/mem_sm.go#L137-L144
159,165
keybase/client
go/gregor/storage/mem_sm.go
getUser
func (m *MemEngine) getUser(uid gregor.UID) *user { uidHex := uidToString(uid) if u, ok := m.users[uidHex]; ok { return u } u := newUser(m.log) m.users[uidHex] = u return u }
go
func (m *MemEngine) getUser(uid gregor.UID) *user { uidHex := uidToString(uid) if u, ok := m.users[uidHex]; ok { return u } u := newUser(m.log) m.users[uidHex] = u return u }
[ "func", "(", "m", "*", "MemEngine", ")", "getUser", "(", "uid", "gregor", ".", "UID", ")", "*", "user", "{", "uidHex", ":=", "uidToString", "(", "uid", ")", "\n", "if", "u", ",", "ok", ":=", "m", ".", "users", "[", "uidHex", "]", ";", "ok", "{"...
// getUser gets or makes a new user object for the given UID.
[ "getUser", "gets", "or", "makes", "a", "new", "user", "object", "for", "the", "given", "UID", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/gregor/storage/mem_sm.go#L380-L388
159,166
keybase/client
go/libkb/json.go
Rollback
func (f *jsonFileTransaction) Rollback() error { f.f.G().Log.Debug("+ Rolling back %s to state from %s", f.f.which, f.f.filename) err := f.f.Load(false) if !f.f.exists { // Before transaction there was no file, so set in-memory // wrapper to clean state as well. f.f.jw = jsonw.NewDictionary() f.f.G().Log.Deb...
go
func (f *jsonFileTransaction) Rollback() error { f.f.G().Log.Debug("+ Rolling back %s to state from %s", f.f.which, f.f.filename) err := f.f.Load(false) if !f.f.exists { // Before transaction there was no file, so set in-memory // wrapper to clean state as well. f.f.jw = jsonw.NewDictionary() f.f.G().Log.Deb...
[ "func", "(", "f", "*", "jsonFileTransaction", ")", "Rollback", "(", ")", "error", "{", "f", ".", "f", ".", "G", "(", ")", ".", "Log", ".", "Debug", "(", "\"", "\"", ",", "f", ".", "f", ".", "which", ",", "f", ".", "f", ".", "filename", ")", ...
// Rollback reloads config from unchanged config file, bringing its // state back to from before the transaction changes. Note that it // only works for changes that do not affect UserConfig, which caches // values, and has to be reloaded manually.
[ "Rollback", "reloads", "config", "from", "unchanged", "config", "file", "bringing", "its", "state", "back", "to", "from", "before", "the", "transaction", "changes", ".", "Note", "that", "it", "only", "works", "for", "changes", "that", "do", "not", "affect", ...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/json.go#L324-L335
159,167
keybase/client
go/client/cmd_device.go
NewCmdDevice
func NewCmdDevice(cl *libcmdline.CommandLine, g *libkb.GlobalContext) cli.Command { return cli.Command{ Name: "device", Usage: "Manage your devices", ArgumentHelp: "[arguments...]", Subcommands: []cli.Command{ NewCmdDeviceRemove(cl, g), NewCmdDeviceList(cl, g), NewCmdDeviceAdd(cl, g), ...
go
func NewCmdDevice(cl *libcmdline.CommandLine, g *libkb.GlobalContext) cli.Command { return cli.Command{ Name: "device", Usage: "Manage your devices", ArgumentHelp: "[arguments...]", Subcommands: []cli.Command{ NewCmdDeviceRemove(cl, g), NewCmdDeviceList(cl, g), NewCmdDeviceAdd(cl, g), ...
[ "func", "NewCmdDevice", "(", "cl", "*", "libcmdline", ".", "CommandLine", ",", "g", "*", "libkb", ".", "GlobalContext", ")", "cli", ".", "Command", "{", "return", "cli", ".", "Command", "{", "Name", ":", "\"", "\"", ",", "Usage", ":", "\"", "\"", ","...
// NewCmdDevice creates the device command, which is just a holder // for subcommands.
[ "NewCmdDevice", "creates", "the", "device", "command", "which", "is", "just", "a", "holder", "for", "subcommands", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/client/cmd_device.go#L14-L25
159,168
keybase/client
go/engine/paperkey_gen.go
NewPaperKeyGen
func NewPaperKeyGen(g *libkb.GlobalContext, arg *PaperKeyGenArg) *PaperKeyGen { return &PaperKeyGen{ arg: arg, Contextified: libkb.NewContextified(g), } }
go
func NewPaperKeyGen(g *libkb.GlobalContext, arg *PaperKeyGenArg) *PaperKeyGen { return &PaperKeyGen{ arg: arg, Contextified: libkb.NewContextified(g), } }
[ "func", "NewPaperKeyGen", "(", "g", "*", "libkb", ".", "GlobalContext", ",", "arg", "*", "PaperKeyGenArg", ")", "*", "PaperKeyGen", "{", "return", "&", "PaperKeyGen", "{", "arg", ":", "arg", ",", "Contextified", ":", "libkb", ".", "NewContextified", "(", "...
// NewPaperKeyGen creates a PaperKeyGen engine.
[ "NewPaperKeyGen", "creates", "a", "PaperKeyGen", "engine", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/engine/paperkey_gen.go#L46-L51
159,169
keybase/client
go/kbfs/libkbfs/chat_local.go
newChatLocal
func newChatLocal(config Config) *chatLocal { return newChatLocalWithData(config, &chatLocalSharedData{ convs: make(convLocalByTypeMap), convsByID: make(convLocalByIDMap), newChannelCBs: map[Config]newConvCB{ config: nil, }, }) }
go
func newChatLocal(config Config) *chatLocal { return newChatLocalWithData(config, &chatLocalSharedData{ convs: make(convLocalByTypeMap), convsByID: make(convLocalByIDMap), newChannelCBs: map[Config]newConvCB{ config: nil, }, }) }
[ "func", "newChatLocal", "(", "config", "Config", ")", "*", "chatLocal", "{", "return", "newChatLocalWithData", "(", "config", ",", "&", "chatLocalSharedData", "{", "convs", ":", "make", "(", "convLocalByTypeMap", ")", ",", "convsByID", ":", "make", "(", "convL...
// newChatLocal constructs a new local chat implementation.
[ "newChatLocal", "constructs", "a", "new", "local", "chat", "implementation", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/chat_local.go#L75-L83
159,170
keybase/client
go/protocol/keybase1/tlf.go
CryptKeys
func (c TlfClient) CryptKeys(ctx context.Context, query TLFQuery) (res GetTLFCryptKeysRes, err error) { __arg := CryptKeysArg{Query: query} err = c.Cli.Call(ctx, "keybase.1.tlf.CryptKeys", []interface{}{__arg}, &res) return }
go
func (c TlfClient) CryptKeys(ctx context.Context, query TLFQuery) (res GetTLFCryptKeysRes, err error) { __arg := CryptKeysArg{Query: query} err = c.Cli.Call(ctx, "keybase.1.tlf.CryptKeys", []interface{}{__arg}, &res) return }
[ "func", "(", "c", "TlfClient", ")", "CryptKeys", "(", "ctx", "context", ".", "Context", ",", "query", "TLFQuery", ")", "(", "res", "GetTLFCryptKeysRes", ",", "err", "error", ")", "{", "__arg", ":=", "CryptKeysArg", "{", "Query", ":", "query", "}", "\n", ...
// CryptKeys returns TLF crypt keys from all generations.
[ "CryptKeys", "returns", "TLF", "crypt", "keys", "from", "all", "generations", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/keybase1/tlf.go#L90-L94
159,171
keybase/client
go/pvl/debug.go
debugServiceToString
func debugServiceToString(service keybase1.ProofType) string { s, err := serviceToString(service) if err != nil { return string(service) } return s }
go
func debugServiceToString(service keybase1.ProofType) string { s, err := serviceToString(service) if err != nil { return string(service) } return s }
[ "func", "debugServiceToString", "(", "service", "keybase1", ".", "ProofType", ")", "string", "{", "s", ",", "err", ":=", "serviceToString", "(", "service", ")", "\n", "if", "err", "!=", "nil", "{", "return", "string", "(", "service", ")", "\n", "}", "\n"...
// debugServiceToString returns the name of a service or number string if it is invalid.
[ "debugServiceToString", "returns", "the", "name", "of", "a", "service", "or", "number", "string", "if", "it", "is", "invalid", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/pvl/debug.go#L49-L55
159,172
keybase/client
go/stellar/stellarsvc/service.go
WalletInitLocal
func (s *Server) WalletInitLocal(ctx context.Context) (err error) { mctx, fin, err := s.Preamble(ctx, preambleArg{ RPCName: "WalletInitLocal", Err: &err, }) defer fin() if err != nil { return err } _, err = stellar.CreateWallet(mctx) return err }
go
func (s *Server) WalletInitLocal(ctx context.Context) (err error) { mctx, fin, err := s.Preamble(ctx, preambleArg{ RPCName: "WalletInitLocal", Err: &err, }) defer fin() if err != nil { return err } _, err = stellar.CreateWallet(mctx) return err }
[ "func", "(", "s", "*", "Server", ")", "WalletInitLocal", "(", "ctx", "context", ".", "Context", ")", "(", "err", "error", ")", "{", "mctx", ",", "fin", ",", "err", ":=", "s", ".", "Preamble", "(", "ctx", ",", "preambleArg", "{", "RPCName", ":", "\"...
// WalletInitLocal creates and posts an initial stellar bundle for a user. // Only succeeds if they do not already have one. // Safe to call even if the user has a bundle already.
[ "WalletInitLocal", "creates", "and", "posts", "an", "initial", "stellar", "bundle", "for", "a", "user", ".", "Only", "succeeds", "if", "they", "do", "not", "already", "have", "one", ".", "Safe", "to", "call", "even", "if", "the", "user", "has", "a", "bun...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/stellarsvc/service.go#L314-L326
159,173
keybase/client
go/stellar/stellarsvc/service.go
getLocalCurrencyAndExchangeRate
func getLocalCurrencyAndExchangeRate(mctx libkb.MetaContext, remoter remote.Remoter, account *stellar1.OwnAccountCLILocal, exchangeRates exchangeRateMap) error { displayCurrency, err := stellar.GetAccountDisplayCurrency(mctx, account.AccountID) if err != nil { return err } rate, ok := exchangeRates[displayCurrenc...
go
func getLocalCurrencyAndExchangeRate(mctx libkb.MetaContext, remoter remote.Remoter, account *stellar1.OwnAccountCLILocal, exchangeRates exchangeRateMap) error { displayCurrency, err := stellar.GetAccountDisplayCurrency(mctx, account.AccountID) if err != nil { return err } rate, ok := exchangeRates[displayCurrenc...
[ "func", "getLocalCurrencyAndExchangeRate", "(", "mctx", "libkb", ".", "MetaContext", ",", "remoter", "remote", ".", "Remoter", ",", "account", "*", "stellar1", ".", "OwnAccountCLILocal", ",", "exchangeRates", "exchangeRateMap", ")", "error", "{", "displayCurrency", ...
// getLocalCurrencyAndExchangeRate gets display currency setting // for accountID and fetches exchange rate is set. // // Arguments `account` and `exchangeRates` may end up mutated.
[ "getLocalCurrencyAndExchangeRate", "gets", "display", "currency", "setting", "for", "accountID", "and", "fetches", "exchange", "rate", "is", "set", ".", "Arguments", "account", "and", "exchangeRates", "may", "end", "up", "mutated", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/stellarsvc/service.go#L348-L364
159,174
keybase/client
go/stellar/stellarsvc/service.go
checkDisplayAmount
func (s *Server) checkDisplayAmount(ctx context.Context, arg stellar1.SendCLILocalArg) error { if arg.DisplayAmount == "" { return nil } exchangeRate, err := s.remoter.ExchangeRate(ctx, arg.DisplayCurrency) if err != nil { return err } xlmAmount, err := stellarnet.ConvertOutsideToXLM(arg.DisplayAmount, exch...
go
func (s *Server) checkDisplayAmount(ctx context.Context, arg stellar1.SendCLILocalArg) error { if arg.DisplayAmount == "" { return nil } exchangeRate, err := s.remoter.ExchangeRate(ctx, arg.DisplayCurrency) if err != nil { return err } xlmAmount, err := stellarnet.ConvertOutsideToXLM(arg.DisplayAmount, exch...
[ "func", "(", "s", "*", "Server", ")", "checkDisplayAmount", "(", "ctx", "context", ".", "Context", ",", "arg", "stellar1", ".", "SendCLILocalArg", ")", "error", "{", "if", "arg", ".", "DisplayAmount", "==", "\"", "\"", "{", "return", "nil", "\n", "}", ...
// check that the display amount is within 1% of current exchange rates
[ "check", "that", "the", "display", "amount", "is", "within", "1%", "of", "current", "exchange", "rates" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/stellarsvc/service.go#L473-L504
159,175
keybase/client
go/libkb/connmgr.go
AddConnection
func (c *ConnectionManager) AddConnection(xp rpc.Transporter, closeListener chan error) ConnectionID { c.Lock() c.nxt++ // increment first, since 0 is reserved id := c.nxt c.lookup[id] = &rpcConnection{transporter: xp} c.Unlock() if closeListener != nil { go func() { <-closeListener c.removeConnection(id...
go
func (c *ConnectionManager) AddConnection(xp rpc.Transporter, closeListener chan error) ConnectionID { c.Lock() c.nxt++ // increment first, since 0 is reserved id := c.nxt c.lookup[id] = &rpcConnection{transporter: xp} c.Unlock() if closeListener != nil { go func() { <-closeListener c.removeConnection(id...
[ "func", "(", "c", "*", "ConnectionManager", ")", "AddConnection", "(", "xp", "rpc", ".", "Transporter", ",", "closeListener", "chan", "error", ")", "ConnectionID", "{", "c", ".", "Lock", "(", ")", "\n", "c", ".", "nxt", "++", "// increment first, since 0 is ...
// AddConnection adds a new connection to the table of Connection object, with a // related closeListener. We'll listen for a close on that channel, and when one occurs, // we'll remove the connection from the pool.
[ "AddConnection", "adds", "a", "new", "connection", "to", "the", "table", "of", "Connection", "object", "with", "a", "related", "closeListener", ".", "We", "ll", "listen", "for", "a", "close", "on", "that", "channel", "and", "when", "one", "occurs", "we", "...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/connmgr.go#L50-L65
159,176
keybase/client
go/libkb/connmgr.go
LookupConnection
func (c *ConnectionManager) LookupConnection(i ConnectionID) rpc.Transporter { c.Lock() defer c.Unlock() if conn := c.lookup[i]; conn != nil { return conn.transporter } return nil }
go
func (c *ConnectionManager) LookupConnection(i ConnectionID) rpc.Transporter { c.Lock() defer c.Unlock() if conn := c.lookup[i]; conn != nil { return conn.transporter } return nil }
[ "func", "(", "c", "*", "ConnectionManager", ")", "LookupConnection", "(", "i", "ConnectionID", ")", "rpc", ".", "Transporter", "{", "c", ".", "Lock", "(", ")", "\n", "defer", "c", ".", "Unlock", "(", ")", "\n", "if", "conn", ":=", "c", ".", "lookup",...
// LookupConnection looks up a connection given a connectionID, or returns nil // if no such connection was found.
[ "LookupConnection", "looks", "up", "a", "connection", "given", "a", "connectionID", "or", "returns", "nil", "if", "no", "such", "connection", "was", "found", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/connmgr.go#L75-L82
159,177
keybase/client
go/libkb/connmgr.go
WaitForClientType
func (c *ConnectionManager) WaitForClientType(clientType keybase1.ClientType, timeout time.Duration) bool { if c.hasClientType(clientType) { return true } ticker := time.NewTicker(time.Second) deadline := time.After(timeout) defer ticker.Stop() for { select { case <-ticker.C: if c.hasClientType(clientTyp...
go
func (c *ConnectionManager) WaitForClientType(clientType keybase1.ClientType, timeout time.Duration) bool { if c.hasClientType(clientType) { return true } ticker := time.NewTicker(time.Second) deadline := time.After(timeout) defer ticker.Stop() for { select { case <-ticker.C: if c.hasClientType(clientTyp...
[ "func", "(", "c", "*", "ConnectionManager", ")", "WaitForClientType", "(", "clientType", "keybase1", ".", "ClientType", ",", "timeout", "time", ".", "Duration", ")", "bool", "{", "if", "c", ".", "hasClientType", "(", "clientType", ")", "{", "return", "true",...
// WaitForClientType returns true if client type is connected, or waits until timeout for the connection
[ "WaitForClientType", "returns", "true", "if", "client", "type", "is", "connected", "or", "waits", "until", "timeout", "for", "the", "connection" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/connmgr.go#L136-L153
159,178
keybase/client
go/libkb/connmgr.go
ApplyAll
func (c *ConnectionManager) ApplyAll(f ApplyFn) { c.Lock() defer c.Unlock() for k, v := range c.lookup { if !f(k, v.transporter) { break } } }
go
func (c *ConnectionManager) ApplyAll(f ApplyFn) { c.Lock() defer c.Unlock() for k, v := range c.lookup { if !f(k, v.transporter) { break } } }
[ "func", "(", "c", "*", "ConnectionManager", ")", "ApplyAll", "(", "f", "ApplyFn", ")", "{", "c", ".", "Lock", "(", ")", "\n", "defer", "c", ".", "Unlock", "(", ")", "\n", "for", "k", ",", "v", ":=", "range", "c", ".", "lookup", "{", "if", "!", ...
// ApplyAll applies the given function f to all connections in the table. // If you're going to do something blocking, please do it in a GoRoutine, // since we're holding the lock for all connections as we do this.
[ "ApplyAll", "applies", "the", "given", "function", "f", "to", "all", "connections", "in", "the", "table", ".", "If", "you", "re", "going", "to", "do", "something", "blocking", "please", "do", "it", "in", "a", "GoRoutine", "since", "we", "re", "holding", ...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/connmgr.go#L176-L184
159,179
keybase/client
go/libkb/connmgr.go
ApplyAllDetails
func (c *ConnectionManager) ApplyAllDetails(f ApplyDetailsFn) { c.Lock() defer c.Unlock() for k, v := range c.lookup { status := v.details var details *keybase1.ClientDetails if status != nil { details = &status.Details } if !f(k, v.transporter, details) { break } } }
go
func (c *ConnectionManager) ApplyAllDetails(f ApplyDetailsFn) { c.Lock() defer c.Unlock() for k, v := range c.lookup { status := v.details var details *keybase1.ClientDetails if status != nil { details = &status.Details } if !f(k, v.transporter, details) { break } } }
[ "func", "(", "c", "*", "ConnectionManager", ")", "ApplyAllDetails", "(", "f", "ApplyDetailsFn", ")", "{", "c", ".", "Lock", "(", ")", "\n", "defer", "c", ".", "Unlock", "(", ")", "\n", "for", "k", ",", "v", ":=", "range", "c", ".", "lookup", "{", ...
// ApplyAllDetails applies the given function f to all connections in the table. // If you're going to do something blocking, please do it in a GoRoutine, // since we're holding the lock for all connections as we do this.
[ "ApplyAllDetails", "applies", "the", "given", "function", "f", "to", "all", "connections", "in", "the", "table", ".", "If", "you", "re", "going", "to", "do", "something", "blocking", "please", "do", "it", "in", "a", "GoRoutine", "since", "we", "re", "holdi...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/connmgr.go#L189-L202
159,180
keybase/client
go/kbfs/libkbfs/bserver_disk.go
newBlockServerDisk
func newBlockServerDisk( codec kbfscodec.Codec, log logger.Logger, dirPath string, shutdownFunc func(logger.Logger)) *BlockServerDisk { bserv := &BlockServerDisk{ codec, log, dirPath, shutdownFunc, sync.RWMutex{}, make(map[tlf.ID]*blockServerDiskTlfStorage), } return bserv }
go
func newBlockServerDisk( codec kbfscodec.Codec, log logger.Logger, dirPath string, shutdownFunc func(logger.Logger)) *BlockServerDisk { bserv := &BlockServerDisk{ codec, log, dirPath, shutdownFunc, sync.RWMutex{}, make(map[tlf.ID]*blockServerDiskTlfStorage), } return bserv }
[ "func", "newBlockServerDisk", "(", "codec", "kbfscodec", ".", "Codec", ",", "log", "logger", ".", "Logger", ",", "dirPath", "string", ",", "shutdownFunc", "func", "(", "logger", ".", "Logger", ")", ")", "*", "BlockServerDisk", "{", "bserv", ":=", "&", "Blo...
// newBlockServerDisk constructs a new BlockServerDisk that stores // its data in the given directory.
[ "newBlockServerDisk", "constructs", "a", "new", "BlockServerDisk", "that", "stores", "its", "data", "in", "the", "given", "directory", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/bserver_disk.go#L48-L56
159,181
keybase/client
go/kbfs/libkbfs/bserver_disk.go
NewBlockServerDir
func NewBlockServerDir(codec kbfscodec.Codec, log logger.Logger, dirPath string) *BlockServerDisk { return newBlockServerDisk(codec, log, dirPath, nil) }
go
func NewBlockServerDir(codec kbfscodec.Codec, log logger.Logger, dirPath string) *BlockServerDisk { return newBlockServerDisk(codec, log, dirPath, nil) }
[ "func", "NewBlockServerDir", "(", "codec", "kbfscodec", ".", "Codec", ",", "log", "logger", ".", "Logger", ",", "dirPath", "string", ")", "*", "BlockServerDisk", "{", "return", "newBlockServerDisk", "(", "codec", ",", "log", ",", "dirPath", ",", "nil", ")", ...
// NewBlockServerDir constructs a new BlockServerDisk that stores // its data in the given directory.
[ "NewBlockServerDir", "constructs", "a", "new", "BlockServerDisk", "that", "stores", "its", "data", "in", "the", "given", "directory", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/bserver_disk.go#L60-L63
159,182
keybase/client
go/kbfs/libkbfs/bserver_disk.go
NewBlockServerTempDir
func NewBlockServerTempDir(codec kbfscodec.Codec, log logger.Logger) (*BlockServerDisk, error) { tempdir, err := ioutil.TempDir(os.TempDir(), "kbfs_bserver_tmp") if err != nil { return nil, err } return newBlockServerDisk(codec, log, tempdir, func(log logger.Logger) { err := ioutil.RemoveAll(tempdir) if err ...
go
func NewBlockServerTempDir(codec kbfscodec.Codec, log logger.Logger) (*BlockServerDisk, error) { tempdir, err := ioutil.TempDir(os.TempDir(), "kbfs_bserver_tmp") if err != nil { return nil, err } return newBlockServerDisk(codec, log, tempdir, func(log logger.Logger) { err := ioutil.RemoveAll(tempdir) if err ...
[ "func", "NewBlockServerTempDir", "(", "codec", "kbfscodec", ".", "Codec", ",", "log", "logger", ".", "Logger", ")", "(", "*", "BlockServerDisk", ",", "error", ")", "{", "tempdir", ",", "err", ":=", "ioutil", ".", "TempDir", "(", "os", ".", "TempDir", "("...
// NewBlockServerTempDir constructs a new BlockServerDisk that stores its // data in a temp directory which is cleaned up on shutdown.
[ "NewBlockServerTempDir", "constructs", "a", "new", "BlockServerDisk", "that", "stores", "its", "data", "in", "a", "temp", "directory", "which", "is", "cleaned", "up", "on", "shutdown", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/bserver_disk.go#L67-L79
159,183
keybase/client
go/kbfs/libkbfs/bserver_disk.go
Get
func (b *BlockServerDisk) Get( ctx context.Context, tlfID tlf.ID, id kbfsblock.ID, context kbfsblock.Context, _ DiskBlockCacheType) ( data []byte, serverHalf kbfscrypto.BlockCryptKeyServerHalf, err error) { if err := checkContext(ctx); err != nil { return nil, kbfscrypto.BlockCryptKeyServerHalf{}, err } defer ...
go
func (b *BlockServerDisk) Get( ctx context.Context, tlfID tlf.ID, id kbfsblock.ID, context kbfsblock.Context, _ DiskBlockCacheType) ( data []byte, serverHalf kbfscrypto.BlockCryptKeyServerHalf, err error) { if err := checkContext(ctx); err != nil { return nil, kbfscrypto.BlockCryptKeyServerHalf{}, err } defer ...
[ "func", "(", "b", "*", "BlockServerDisk", ")", "Get", "(", "ctx", "context", ".", "Context", ",", "tlfID", "tlf", ".", "ID", ",", "id", "kbfsblock", ".", "ID", ",", "context", "kbfsblock", ".", "Context", ",", "_", "DiskBlockCacheType", ")", "(", "data...
// Get implements the BlockServer interface for BlockServerDisk.
[ "Get", "implements", "the", "BlockServer", "interface", "for", "BlockServerDisk", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/bserver_disk.go#L125-L156
159,184
keybase/client
go/kbfs/libkbfs/bserver_disk.go
Put
func (b *BlockServerDisk) Put( ctx context.Context, tlfID tlf.ID, id kbfsblock.ID, context kbfsblock.Context, buf []byte, serverHalf kbfscrypto.BlockCryptKeyServerHalf, _ DiskBlockCacheType) (err error) { if err := checkContext(ctx); err != nil { return err } defer func() { err = translateToBlockServerError...
go
func (b *BlockServerDisk) Put( ctx context.Context, tlfID tlf.ID, id kbfsblock.ID, context kbfsblock.Context, buf []byte, serverHalf kbfscrypto.BlockCryptKeyServerHalf, _ DiskBlockCacheType) (err error) { if err := checkContext(ctx); err != nil { return err } defer func() { err = translateToBlockServerError...
[ "func", "(", "b", "*", "BlockServerDisk", ")", "Put", "(", "ctx", "context", ".", "Context", ",", "tlfID", "tlf", ".", "ID", ",", "id", "kbfsblock", ".", "ID", ",", "context", "kbfsblock", ".", "Context", ",", "buf", "[", "]", "byte", ",", "serverHal...
// Put implements the BlockServer interface for BlockServerDisk.
[ "Put", "implements", "the", "BlockServer", "interface", "for", "BlockServerDisk", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/bserver_disk.go#L201-L240
159,185
keybase/client
go/kbfs/libkbfs/bserver_disk.go
AddBlockReference
func (b *BlockServerDisk) AddBlockReference(ctx context.Context, tlfID tlf.ID, id kbfsblock.ID, context kbfsblock.Context) error { if err := checkContext(ctx); err != nil { return err } b.log.CDebugf(ctx, "BlockServerDisk.AddBlockReference id=%s "+ "tlfID=%s context=%s", id, tlfID, context) tlfStorage, err :=...
go
func (b *BlockServerDisk) AddBlockReference(ctx context.Context, tlfID tlf.ID, id kbfsblock.ID, context kbfsblock.Context) error { if err := checkContext(ctx); err != nil { return err } b.log.CDebugf(ctx, "BlockServerDisk.AddBlockReference id=%s "+ "tlfID=%s context=%s", id, tlfID, context) tlfStorage, err :=...
[ "func", "(", "b", "*", "BlockServerDisk", ")", "AddBlockReference", "(", "ctx", "context", ".", "Context", ",", "tlfID", "tlf", ".", "ID", ",", "id", "kbfsblock", ".", "ID", ",", "context", "kbfsblock", ".", "Context", ")", "error", "{", "if", "err", "...
// AddBlockReference implements the BlockServer interface for BlockServerDisk.
[ "AddBlockReference", "implements", "the", "BlockServer", "interface", "for", "BlockServerDisk", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/bserver_disk.go#L280-L318
159,186
keybase/client
go/kbfs/libkbfs/bserver_disk.go
RemoveBlockReferences
func (b *BlockServerDisk) RemoveBlockReferences(ctx context.Context, tlfID tlf.ID, contexts kbfsblock.ContextMap) ( liveCounts map[kbfsblock.ID]int, err error) { if err := checkContext(ctx); err != nil { return nil, err } defer func() { err = translateToBlockServerError(err) }() b.log.CDebugf(ctx, "BlockSer...
go
func (b *BlockServerDisk) RemoveBlockReferences(ctx context.Context, tlfID tlf.ID, contexts kbfsblock.ContextMap) ( liveCounts map[kbfsblock.ID]int, err error) { if err := checkContext(ctx); err != nil { return nil, err } defer func() { err = translateToBlockServerError(err) }() b.log.CDebugf(ctx, "BlockSer...
[ "func", "(", "b", "*", "BlockServerDisk", ")", "RemoveBlockReferences", "(", "ctx", "context", ".", "Context", ",", "tlfID", "tlf", ".", "ID", ",", "contexts", "kbfsblock", ".", "ContextMap", ")", "(", "liveCounts", "map", "[", "kbfsblock", ".", "ID", "]",...
// RemoveBlockReferences implements the BlockServer interface for // BlockServerDisk.
[ "RemoveBlockReferences", "implements", "the", "BlockServer", "interface", "for", "BlockServerDisk", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/bserver_disk.go#L322-L363
159,187
keybase/client
go/kbfs/libkbfs/bserver_disk.go
ArchiveBlockReferences
func (b *BlockServerDisk) ArchiveBlockReferences(ctx context.Context, tlfID tlf.ID, contexts kbfsblock.ContextMap) (err error) { if err := checkContext(ctx); err != nil { return err } defer func() { err = translateToBlockServerError(err) }() b.log.CDebugf(ctx, "BlockServerDisk.ArchiveBlockReferences "+ "tl...
go
func (b *BlockServerDisk) ArchiveBlockReferences(ctx context.Context, tlfID tlf.ID, contexts kbfsblock.ContextMap) (err error) { if err := checkContext(ctx); err != nil { return err } defer func() { err = translateToBlockServerError(err) }() b.log.CDebugf(ctx, "BlockServerDisk.ArchiveBlockReferences "+ "tl...
[ "func", "(", "b", "*", "BlockServerDisk", ")", "ArchiveBlockReferences", "(", "ctx", "context", ".", "Context", ",", "tlfID", "tlf", ".", "ID", ",", "contexts", "kbfsblock", ".", "ContextMap", ")", "(", "err", "error", ")", "{", "if", "err", ":=", "check...
// ArchiveBlockReferences implements the BlockServer interface for // BlockServerDisk.
[ "ArchiveBlockReferences", "implements", "the", "BlockServer", "interface", "for", "BlockServerDisk", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/bserver_disk.go#L367-L407
159,188
keybase/client
go/kbfs/libkbfs/bserver_disk.go
IsUnflushed
func (b *BlockServerDisk) IsUnflushed(ctx context.Context, tlfID tlf.ID, _ kbfsblock.ID) (bool, error) { if err := checkContext(ctx); err != nil { return false, err } tlfStorage, err := b.getStorage(tlfID) if err != nil { return false, err } tlfStorage.lock.RLock() defer tlfStorage.lock.RUnlock() if tlfS...
go
func (b *BlockServerDisk) IsUnflushed(ctx context.Context, tlfID tlf.ID, _ kbfsblock.ID) (bool, error) { if err := checkContext(ctx); err != nil { return false, err } tlfStorage, err := b.getStorage(tlfID) if err != nil { return false, err } tlfStorage.lock.RLock() defer tlfStorage.lock.RUnlock() if tlfS...
[ "func", "(", "b", "*", "BlockServerDisk", ")", "IsUnflushed", "(", "ctx", "context", ".", "Context", ",", "tlfID", "tlf", ".", "ID", ",", "_", "kbfsblock", ".", "ID", ")", "(", "bool", ",", "error", ")", "{", "if", "err", ":=", "checkContext", "(", ...
// IsUnflushed implements the BlockServer interface for BlockServerDisk.
[ "IsUnflushed", "implements", "the", "BlockServer", "interface", "for", "BlockServerDisk", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/bserver_disk.go#L465-L483
159,189
keybase/client
go/kbfs/libkbfs/bserver_disk.go
Shutdown
func (b *BlockServerDisk) Shutdown(ctx context.Context) { tlfStorage := func() map[tlf.ID]*blockServerDiskTlfStorage { b.tlfStorageLock.Lock() defer b.tlfStorageLock.Unlock() // Make further accesses error out. tlfStorage := b.tlfStorage b.tlfStorage = nil return tlfStorage }() for _, s := range tlfStor...
go
func (b *BlockServerDisk) Shutdown(ctx context.Context) { tlfStorage := func() map[tlf.ID]*blockServerDiskTlfStorage { b.tlfStorageLock.Lock() defer b.tlfStorageLock.Unlock() // Make further accesses error out. tlfStorage := b.tlfStorage b.tlfStorage = nil return tlfStorage }() for _, s := range tlfStor...
[ "func", "(", "b", "*", "BlockServerDisk", ")", "Shutdown", "(", "ctx", "context", ".", "Context", ")", "{", "tlfStorage", ":=", "func", "(", ")", "map", "[", "tlf", ".", "ID", "]", "*", "blockServerDiskTlfStorage", "{", "b", ".", "tlfStorageLock", ".", ...
// Shutdown implements the BlockServer interface for BlockServerDisk.
[ "Shutdown", "implements", "the", "BlockServer", "interface", "for", "BlockServerDisk", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/bserver_disk.go#L486-L513
159,190
keybase/client
go/kbfs/libkbfs/bserver_disk.go
GetUserQuotaInfo
func (b *BlockServerDisk) GetUserQuotaInfo(ctx context.Context) (info *kbfsblock.QuotaInfo, err error) { if err := checkContext(ctx); err != nil { return nil, err } // Return a dummy value here. return &kbfsblock.QuotaInfo{Limit: math.MaxInt64}, nil }
go
func (b *BlockServerDisk) GetUserQuotaInfo(ctx context.Context) (info *kbfsblock.QuotaInfo, err error) { if err := checkContext(ctx); err != nil { return nil, err } // Return a dummy value here. return &kbfsblock.QuotaInfo{Limit: math.MaxInt64}, nil }
[ "func", "(", "b", "*", "BlockServerDisk", ")", "GetUserQuotaInfo", "(", "ctx", "context", ".", "Context", ")", "(", "info", "*", "kbfsblock", ".", "QuotaInfo", ",", "err", "error", ")", "{", "if", "err", ":=", "checkContext", "(", "ctx", ")", ";", "err...
// GetUserQuotaInfo implements the BlockServer interface for BlockServerDisk.
[ "GetUserQuotaInfo", "implements", "the", "BlockServer", "interface", "for", "BlockServerDisk", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/bserver_disk.go#L519-L526
159,191
keybase/client
go/kbfs/libkbfs/bserver_disk.go
GetTeamQuotaInfo
func (b *BlockServerDisk) GetTeamQuotaInfo( ctx context.Context, _ keybase1.TeamID) ( info *kbfsblock.QuotaInfo, err error) { if err := checkContext(ctx); err != nil { return nil, err } // TODO: check team membership and return error if not a reader? // Return a dummy value here. return &kbfsblock.QuotaInfo{...
go
func (b *BlockServerDisk) GetTeamQuotaInfo( ctx context.Context, _ keybase1.TeamID) ( info *kbfsblock.QuotaInfo, err error) { if err := checkContext(ctx); err != nil { return nil, err } // TODO: check team membership and return error if not a reader? // Return a dummy value here. return &kbfsblock.QuotaInfo{...
[ "func", "(", "b", "*", "BlockServerDisk", ")", "GetTeamQuotaInfo", "(", "ctx", "context", ".", "Context", ",", "_", "keybase1", ".", "TeamID", ")", "(", "info", "*", "kbfsblock", ".", "QuotaInfo", ",", "err", "error", ")", "{", "if", "err", ":=", "chec...
// GetTeamQuotaInfo implements the BlockServer interface for BlockServerDisk.
[ "GetTeamQuotaInfo", "implements", "the", "BlockServer", "interface", "for", "BlockServerDisk", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/bserver_disk.go#L529-L540
159,192
keybase/client
go/engine/login_provision.go
newLoginProvision
func newLoginProvision(g *libkb.GlobalContext, arg *loginProvisionArg) *loginProvision { return &loginProvision{ Contextified: libkb.NewContextified(g), arg: arg, } }
go
func newLoginProvision(g *libkb.GlobalContext, arg *loginProvisionArg) *loginProvision { return &loginProvision{ Contextified: libkb.NewContextified(g), arg: arg, } }
[ "func", "newLoginProvision", "(", "g", "*", "libkb", ".", "GlobalContext", ",", "arg", "*", "loginProvisionArg", ")", "*", "loginProvision", "{", "return", "&", "loginProvision", "{", "Contextified", ":", "libkb", ".", "NewContextified", "(", "g", ")", ",", ...
// newLoginProvision creates a loginProvision engine.
[ "newLoginProvision", "creates", "a", "loginProvision", "engine", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/engine/login_provision.go#L56-L61
159,193
keybase/client
go/engine/login_provision.go
paper
func (e *loginProvision) paper(m libkb.MetaContext, device *libkb.Device, keys *libkb.DeviceWithKeys) (err error) { defer m.Trace("loginProvision#paper", func() error { return err })() // get the paper key from the user if we're in the interactive flow if keys == nil { expectedPrefix := device.Description keys,...
go
func (e *loginProvision) paper(m libkb.MetaContext, device *libkb.Device, keys *libkb.DeviceWithKeys) (err error) { defer m.Trace("loginProvision#paper", func() error { return err })() // get the paper key from the user if we're in the interactive flow if keys == nil { expectedPrefix := device.Description keys,...
[ "func", "(", "e", "*", "loginProvision", ")", "paper", "(", "m", "libkb", ".", "MetaContext", ",", "device", "*", "libkb", ".", "Device", ",", "keys", "*", "libkb", ".", "DeviceWithKeys", ")", "(", "err", "error", ")", "{", "defer", "m", ".", "Trace"...
// paper attempts to provision the device via a paper key.
[ "paper", "attempts", "to", "provision", "the", "device", "via", "a", "paper", "key", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/engine/login_provision.go#L301-L344
159,194
keybase/client
go/engine/login_provision.go
pgpProvision
func (e *loginProvision) pgpProvision(m libkb.MetaContext) (err error) { defer m.Trace("loginProvision#pgpProvision", func() error { return err })() err = e.passphraseLogin(m) if err != nil { return err } // After obtaining login session, this will be called before the login state is released. // It tries to ...
go
func (e *loginProvision) pgpProvision(m libkb.MetaContext) (err error) { defer m.Trace("loginProvision#pgpProvision", func() error { return err })() err = e.passphraseLogin(m) if err != nil { return err } // After obtaining login session, this will be called before the login state is released. // It tries to ...
[ "func", "(", "e", "*", "loginProvision", ")", "pgpProvision", "(", "m", "libkb", ".", "MetaContext", ")", "(", "err", "error", ")", "{", "defer", "m", ".", "Trace", "(", "\"", "\"", ",", "func", "(", ")", "error", "{", "return", "err", "}", ")", ...
// pgpProvision attempts to provision with a synced pgp key. It // needs to get a session first to look for a synced pgp key.
[ "pgpProvision", "attempts", "to", "provision", "with", "a", "synced", "pgp", "key", ".", "It", "needs", "to", "get", "a", "session", "first", "to", "look", "for", "a", "synced", "pgp", "key", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/engine/login_provision.go#L405-L426
159,195
keybase/client
go/engine/login_provision.go
makeDeviceWrapArgs
func (e *loginProvision) makeDeviceWrapArgs(m libkb.MetaContext) (*DeviceWrapArgs, error) { if err := e.ensureLKSec(m); err != nil { return nil, err } devname, err := e.deviceName(m) if err != nil { return nil, err } e.devname = devname return &DeviceWrapArgs{ Me: e.arg.User, DeviceName: ...
go
func (e *loginProvision) makeDeviceWrapArgs(m libkb.MetaContext) (*DeviceWrapArgs, error) { if err := e.ensureLKSec(m); err != nil { return nil, err } devname, err := e.deviceName(m) if err != nil { return nil, err } e.devname = devname return &DeviceWrapArgs{ Me: e.arg.User, DeviceName: ...
[ "func", "(", "e", "*", "loginProvision", ")", "makeDeviceWrapArgs", "(", "m", "libkb", ".", "MetaContext", ")", "(", "*", "DeviceWrapArgs", ",", "error", ")", "{", "if", "err", ":=", "e", ".", "ensureLKSec", "(", "m", ")", ";", "err", "!=", "nil", "{...
// makeDeviceWrapArgs creates a base set of args for DeviceWrap. // It ensures that LKSec is created. It also gets a new device // name for this device.
[ "makeDeviceWrapArgs", "creates", "a", "base", "set", "of", "args", "for", "DeviceWrap", ".", "It", "ensures", "that", "LKSec", "is", "created", ".", "It", "also", "gets", "a", "new", "device", "name", "for", "this", "device", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/engine/login_provision.go#L445-L463
159,196
keybase/client
go/engine/login_provision.go
ensureLKSec
func (e *loginProvision) ensureLKSec(m libkb.MetaContext) error { if e.lks != nil { return nil } pps, err := e.ppStream(m) if err != nil { return err } e.lks = libkb.NewLKSec(pps, e.arg.User.GetUID()) return nil }
go
func (e *loginProvision) ensureLKSec(m libkb.MetaContext) error { if e.lks != nil { return nil } pps, err := e.ppStream(m) if err != nil { return err } e.lks = libkb.NewLKSec(pps, e.arg.User.GetUID()) return nil }
[ "func", "(", "e", "*", "loginProvision", ")", "ensureLKSec", "(", "m", "libkb", ".", "MetaContext", ")", "error", "{", "if", "e", ".", "lks", "!=", "nil", "{", "return", "nil", "\n", "}", "\n\n", "pps", ",", "err", ":=", "e", ".", "ppStream", "(", ...
// ensureLKSec ensures we have LKSec for saving device keys.
[ "ensureLKSec", "ensures", "we", "have", "LKSec", "for", "saving", "device", "keys", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/engine/login_provision.go#L466-L478
159,197
keybase/client
go/engine/login_provision.go
ppStream
func (e *loginProvision) ppStream(m libkb.MetaContext) (ret *libkb.PassphraseStream, err error) { defer m.Trace("loginProvision#ppStream", func() error { return err })() if ret = m.PassphraseStream(); ret != nil { return ret, nil } if err = e.passphraseLogin(m); err != nil { return nil, err } if ret = m.Passp...
go
func (e *loginProvision) ppStream(m libkb.MetaContext) (ret *libkb.PassphraseStream, err error) { defer m.Trace("loginProvision#ppStream", func() error { return err })() if ret = m.PassphraseStream(); ret != nil { return ret, nil } if err = e.passphraseLogin(m); err != nil { return nil, err } if ret = m.Passp...
[ "func", "(", "e", "*", "loginProvision", ")", "ppStream", "(", "m", "libkb", ".", "MetaContext", ")", "(", "ret", "*", "libkb", ".", "PassphraseStream", ",", "err", "error", ")", "{", "defer", "m", ".", "Trace", "(", "\"", "\"", ",", "func", "(", "...
// ppStream gets the passphrase stream, either cached or via // SecretUI.
[ "ppStream", "gets", "the", "passphrase", "stream", "either", "cached", "or", "via", "SecretUI", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/engine/login_provision.go#L482-L494
159,198
keybase/client
go/engine/login_provision.go
deviceName
func (e *loginProvision) deviceName(m libkb.MetaContext) (string, error) { var names []string upk, _, err := m.G().GetUPAKLoader().LoadV2(libkb.NewLoadUserArgWithMetaContext(m).WithUID(e.arg.User.GetUID()).WithPublicKeyOptional().WithForcePoll(true).WithSelf(true)) if err != nil { m.Debug("error getting device nam...
go
func (e *loginProvision) deviceName(m libkb.MetaContext) (string, error) { var names []string upk, _, err := m.G().GetUPAKLoader().LoadV2(libkb.NewLoadUserArgWithMetaContext(m).WithUID(e.arg.User.GetUID()).WithPublicKeyOptional().WithForcePoll(true).WithSelf(true)) if err != nil { m.Debug("error getting device nam...
[ "func", "(", "e", "*", "loginProvision", ")", "deviceName", "(", "m", "libkb", ".", "MetaContext", ")", "(", "string", ",", "error", ")", "{", "var", "names", "[", "]", "string", "\n", "upk", ",", "_", ",", "err", ":=", "m", ".", "G", "(", ")", ...
// deviceName gets a new device name from the user.
[ "deviceName", "gets", "a", "new", "device", "name", "from", "the", "user", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/engine/login_provision.go#L511-L566
159,199
keybase/client
go/engine/login_provision.go
makeDeviceKeys
func (e *loginProvision) makeDeviceKeys(m libkb.MetaContext, args *DeviceWrapArgs) error { eng := NewDeviceWrap(m.G(), args) if err := RunEngine2(m, eng); err != nil { return err } // Finish provisoning by calling SwitchConfigAndActiveDevice. we // can't undo that, so do not error out after that. if err := eng....
go
func (e *loginProvision) makeDeviceKeys(m libkb.MetaContext, args *DeviceWrapArgs) error { eng := NewDeviceWrap(m.G(), args) if err := RunEngine2(m, eng); err != nil { return err } // Finish provisoning by calling SwitchConfigAndActiveDevice. we // can't undo that, so do not error out after that. if err := eng....
[ "func", "(", "e", "*", "loginProvision", ")", "makeDeviceKeys", "(", "m", "libkb", ".", "MetaContext", ",", "args", "*", "DeviceWrapArgs", ")", "error", "{", "eng", ":=", "NewDeviceWrap", "(", "m", ".", "G", "(", ")", ",", "args", ")", "\n", "if", "e...
// makeDeviceKeys uses DeviceWrap to generate device keys.
[ "makeDeviceKeys", "uses", "DeviceWrap", "to", "generate", "device", "keys", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/engine/login_provision.go#L586-L601