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
161,400
keybase/client
go/libkb/active_device.go
setSigningKey
func (a *ActiveDevice) setSigningKey(g *GlobalContext, uv keybase1.UserVersion, deviceID keybase1.DeviceID, sigKey GenericKey, deviceName string) error { a.Lock() defer a.Unlock() if err := a.internalUpdateUserVersionDeviceID(uv, deviceID); err != nil { return err } a.signingKey = sigKey if len(deviceName) >...
go
func (a *ActiveDevice) setSigningKey(g *GlobalContext, uv keybase1.UserVersion, deviceID keybase1.DeviceID, sigKey GenericKey, deviceName string) error { a.Lock() defer a.Unlock() if err := a.internalUpdateUserVersionDeviceID(uv, deviceID); err != nil { return err } a.signingKey = sigKey if len(deviceName) >...
[ "func", "(", "a", "*", "ActiveDevice", ")", "setSigningKey", "(", "g", "*", "GlobalContext", ",", "uv", "keybase1", ".", "UserVersion", ",", "deviceID", "keybase1", ".", "DeviceID", ",", "sigKey", "GenericKey", ",", "deviceName", "string", ")", "error", "{",...
// setSigningKey acquires the write lock and sets the signing key. // The acct parameter is not used for anything except to help ensure // that this is called from inside a LogingState account request.
[ "setSigningKey", "acquires", "the", "write", "lock", "and", "sets", "the", "signing", "key", ".", "The", "acct", "parameter", "is", "not", "used", "for", "anything", "except", "to", "help", "ensure", "that", "this", "is", "called", "from", "inside", "a", "...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/active_device.go#L144-L159
161,401
keybase/client
go/libkb/active_device.go
setEncryptionKey
func (a *ActiveDevice) setEncryptionKey(uv keybase1.UserVersion, deviceID keybase1.DeviceID, encKey GenericKey) error { a.Lock() defer a.Unlock() if err := a.internalUpdateUserVersionDeviceID(uv, deviceID); err != nil { return err } a.encryptionKey = encKey return nil }
go
func (a *ActiveDevice) setEncryptionKey(uv keybase1.UserVersion, deviceID keybase1.DeviceID, encKey GenericKey) error { a.Lock() defer a.Unlock() if err := a.internalUpdateUserVersionDeviceID(uv, deviceID); err != nil { return err } a.encryptionKey = encKey return nil }
[ "func", "(", "a", "*", "ActiveDevice", ")", "setEncryptionKey", "(", "uv", "keybase1", ".", "UserVersion", ",", "deviceID", "keybase1", ".", "DeviceID", ",", "encKey", "GenericKey", ")", "error", "{", "a", ".", "Lock", "(", ")", "\n", "defer", "a", ".", ...
// setEncryptionKey acquires the write lock and sets the encryption key. // The acct parameter is not used for anything except to help ensure // that this is called from inside a LogingState account request.
[ "setEncryptionKey", "acquires", "the", "write", "lock", "and", "sets", "the", "encryption", "key", ".", "The", "acct", "parameter", "is", "not", "used", "for", "anything", "except", "to", "help", "ensure", "that", "this", "is", "called", "from", "inside", "a...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/active_device.go#L164-L174
161,402
keybase/client
go/libkb/active_device.go
setDeviceName
func (a *ActiveDevice) setDeviceName(uv keybase1.UserVersion, deviceID keybase1.DeviceID, deviceName string) error { a.Lock() defer a.Unlock() if strings.TrimSpace(deviceName) == "" { return errors.New("no device name specified") } if err := a.internalUpdateUserVersionDeviceID(uv, deviceID); err != nil { ret...
go
func (a *ActiveDevice) setDeviceName(uv keybase1.UserVersion, deviceID keybase1.DeviceID, deviceName string) error { a.Lock() defer a.Unlock() if strings.TrimSpace(deviceName) == "" { return errors.New("no device name specified") } if err := a.internalUpdateUserVersionDeviceID(uv, deviceID); err != nil { ret...
[ "func", "(", "a", "*", "ActiveDevice", ")", "setDeviceName", "(", "uv", "keybase1", ".", "UserVersion", ",", "deviceID", "keybase1", ".", "DeviceID", ",", "deviceName", "string", ")", "error", "{", "a", ".", "Lock", "(", ")", "\n", "defer", "a", ".", "...
// setDeviceName acquires the write lock and sets the device name. // The acct parameter is not used for anything except to help ensure // that this is called from inside a LoginState account request.
[ "setDeviceName", "acquires", "the", "write", "lock", "and", "sets", "the", "device", "name", ".", "The", "acct", "parameter", "is", "not", "used", "for", "anything", "except", "to", "help", "ensure", "that", "this", "is", "called", "from", "inside", "a", "...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/active_device.go#L179-L193
161,403
keybase/client
go/libkb/active_device.go
internalUpdateUserVersionDeviceID
func (a *ActiveDevice) internalUpdateUserVersionDeviceID(uv keybase1.UserVersion, deviceID keybase1.DeviceID) error { if uv.IsNil() { return errors.New("ActiveDevice.set with nil uid") } if deviceID.IsNil() { return errors.New("ActiveDevice.set with nil deviceID") } if a.uv.IsNil() && a.deviceID.IsNil() { ...
go
func (a *ActiveDevice) internalUpdateUserVersionDeviceID(uv keybase1.UserVersion, deviceID keybase1.DeviceID) error { if uv.IsNil() { return errors.New("ActiveDevice.set with nil uid") } if deviceID.IsNil() { return errors.New("ActiveDevice.set with nil deviceID") } if a.uv.IsNil() && a.deviceID.IsNil() { ...
[ "func", "(", "a", "*", "ActiveDevice", ")", "internalUpdateUserVersionDeviceID", "(", "uv", "keybase1", ".", "UserVersion", ",", "deviceID", "keybase1", ".", "DeviceID", ")", "error", "{", "if", "uv", ".", "IsNil", "(", ")", "{", "return", "errors", ".", "...
// should only called by the functions in this type, with the write lock.
[ "should", "only", "called", "by", "the", "functions", "in", "this", "type", "with", "the", "write", "lock", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/active_device.go#L196-L215
161,404
keybase/client
go/libkb/active_device.go
clear
func (a *ActiveDevice) clear() error { a.Lock() defer a.Unlock() a.uv = keybase1.UserVersion{} a.deviceID = "" a.signingKey = nil a.encryptionKey = nil a.nistFactory = nil a.passphrase = nil a.provisioningKey = nil a.secretPromptCancelTimer.Reset() return nil }
go
func (a *ActiveDevice) clear() error { a.Lock() defer a.Unlock() a.uv = keybase1.UserVersion{} a.deviceID = "" a.signingKey = nil a.encryptionKey = nil a.nistFactory = nil a.passphrase = nil a.provisioningKey = nil a.secretPromptCancelTimer.Reset() return nil }
[ "func", "(", "a", "*", "ActiveDevice", ")", "clear", "(", ")", "error", "{", "a", ".", "Lock", "(", ")", "\n", "defer", "a", ".", "Unlock", "(", ")", "\n\n", "a", ".", "uv", "=", "keybase1", ".", "UserVersion", "{", "}", "\n", "a", ".", "device...
// Clear acquires the write lock and resets all the fields to zero values.
[ "Clear", "acquires", "the", "write", "lock", "and", "resets", "all", "the", "fields", "to", "zero", "values", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/active_device.go#L222-L236
161,405
keybase/client
go/libkb/active_device.go
UID
func (a *ActiveDevice) UID() keybase1.UID { a.RLock() defer a.RUnlock() return a.uv.Uid }
go
func (a *ActiveDevice) UID() keybase1.UID { a.RLock() defer a.RUnlock() return a.uv.Uid }
[ "func", "(", "a", "*", "ActiveDevice", ")", "UID", "(", ")", "keybase1", ".", "UID", "{", "a", ".", "RLock", "(", ")", "\n", "defer", "a", ".", "RUnlock", "(", ")", "\n", "return", "a", ".", "uv", ".", "Uid", "\n", "}" ]
// UID returns the user ID that was provided when the device keys were cached. // Safe for use by concurrent goroutines.
[ "UID", "returns", "the", "user", "ID", "that", "was", "provided", "when", "the", "device", "keys", "were", "cached", ".", "Safe", "for", "use", "by", "concurrent", "goroutines", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/active_device.go#L246-L250
161,406
keybase/client
go/libkb/active_device.go
Username
func (a *ActiveDevice) Username(m MetaContext) NormalizedUsername { return m.G().Env.GetUsernameForUID(a.UID()) }
go
func (a *ActiveDevice) Username(m MetaContext) NormalizedUsername { return m.G().Env.GetUsernameForUID(a.UID()) }
[ "func", "(", "a", "*", "ActiveDevice", ")", "Username", "(", "m", "MetaContext", ")", "NormalizedUsername", "{", "return", "m", ".", "G", "(", ")", ".", "Env", ".", "GetUsernameForUID", "(", "a", ".", "UID", "(", ")", ")", "\n", "}" ]
// Username tries to get the active user's username by looking into the current // environment and mapping an UID to a username based on our config file. It // won't work halfway through a provisioning.
[ "Username", "tries", "to", "get", "the", "active", "user", "s", "username", "by", "looking", "into", "the", "current", "environment", "and", "mapping", "an", "UID", "to", "a", "username", "based", "on", "our", "config", "file", ".", "It", "won", "t", "wo...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/active_device.go#L261-L263
161,407
keybase/client
go/libkb/active_device.go
DeviceID
func (a *ActiveDevice) DeviceID() keybase1.DeviceID { a.RLock() defer a.RUnlock() return a.deviceID }
go
func (a *ActiveDevice) DeviceID() keybase1.DeviceID { a.RLock() defer a.RUnlock() return a.deviceID }
[ "func", "(", "a", "*", "ActiveDevice", ")", "DeviceID", "(", ")", "keybase1", ".", "DeviceID", "{", "a", ".", "RLock", "(", ")", "\n", "defer", "a", ".", "RUnlock", "(", ")", "\n", "return", "a", ".", "deviceID", "\n", "}" ]
// DeviceID returns the device ID that was provided when the device keys were // cached. Safe for use by concurrent goroutines.
[ "DeviceID", "returns", "the", "device", "ID", "that", "was", "provided", "when", "the", "device", "keys", "were", "cached", ".", "Safe", "for", "use", "by", "concurrent", "goroutines", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/active_device.go#L267-L271
161,408
keybase/client
go/libkb/active_device.go
SigningKey
func (a *ActiveDevice) SigningKey() (GenericKey, error) { a.RLock() defer a.RUnlock() if a.signingKey == nil { return nil, NotFoundError{ Msg: "Not found: device signing key", } } return a.signingKey, nil }
go
func (a *ActiveDevice) SigningKey() (GenericKey, error) { a.RLock() defer a.RUnlock() if a.signingKey == nil { return nil, NotFoundError{ Msg: "Not found: device signing key", } } return a.signingKey, nil }
[ "func", "(", "a", "*", "ActiveDevice", ")", "SigningKey", "(", ")", "(", "GenericKey", ",", "error", ")", "{", "a", ".", "RLock", "(", ")", "\n", "defer", "a", ".", "RUnlock", "(", ")", "\n", "if", "a", ".", "signingKey", "==", "nil", "{", "retur...
// SigningKey returns the signing key for the active device. // Safe for use by concurrent goroutines.
[ "SigningKey", "returns", "the", "signing", "key", "for", "the", "active", "device", ".", "Safe", "for", "use", "by", "concurrent", "goroutines", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/active_device.go#L294-L303
161,409
keybase/client
go/libkb/active_device.go
EncryptionKey
func (a *ActiveDevice) EncryptionKey() (GenericKey, error) { a.RLock() defer a.RUnlock() if a.encryptionKey == nil { return nil, NotFoundError{ Msg: "Not found: device encryption key", } } return a.encryptionKey, nil }
go
func (a *ActiveDevice) EncryptionKey() (GenericKey, error) { a.RLock() defer a.RUnlock() if a.encryptionKey == nil { return nil, NotFoundError{ Msg: "Not found: device encryption key", } } return a.encryptionKey, nil }
[ "func", "(", "a", "*", "ActiveDevice", ")", "EncryptionKey", "(", ")", "(", "GenericKey", ",", "error", ")", "{", "a", ".", "RLock", "(", ")", "\n", "defer", "a", ".", "RUnlock", "(", ")", "\n", "if", "a", ".", "encryptionKey", "==", "nil", "{", ...
// EncryptionKey returns the encryption key for the active device. // Safe for use by concurrent goroutines.
[ "EncryptionKey", "returns", "the", "encryption", "key", "for", "the", "active", "device", ".", "Safe", "for", "use", "by", "concurrent", "goroutines", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/active_device.go#L307-L316
161,410
keybase/client
go/libkb/active_device.go
KeyByType
func (a *ActiveDevice) KeyByType(t SecretKeyType) (GenericKey, error) { switch t { case DeviceSigningKeyType: return a.SigningKey() case DeviceEncryptionKeyType: return a.EncryptionKey() default: return nil, fmt.Errorf("Invalid type %v", t) } }
go
func (a *ActiveDevice) KeyByType(t SecretKeyType) (GenericKey, error) { switch t { case DeviceSigningKeyType: return a.SigningKey() case DeviceEncryptionKeyType: return a.EncryptionKey() default: return nil, fmt.Errorf("Invalid type %v", t) } }
[ "func", "(", "a", "*", "ActiveDevice", ")", "KeyByType", "(", "t", "SecretKeyType", ")", "(", "GenericKey", ",", "error", ")", "{", "switch", "t", "{", "case", "DeviceSigningKeyType", ":", "return", "a", ".", "SigningKey", "(", ")", "\n", "case", "Device...
// KeyByType returns a cached key based on SecretKeyType. // Safe for use by concurrent goroutines.
[ "KeyByType", "returns", "a", "cached", "key", "based", "on", "SecretKeyType", ".", "Safe", "for", "use", "by", "concurrent", "goroutines", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/active_device.go#L335-L344
161,411
keybase/client
go/libkb/active_device.go
AllFields
func (a *ActiveDevice) AllFields() (uv keybase1.UserVersion, deviceID keybase1.DeviceID, deviceName string, sigKey GenericKey, encKey GenericKey) { a.RLock() defer a.RUnlock() return a.uv, a.deviceID, a.deviceName, a.signingKey, a.encryptionKey }
go
func (a *ActiveDevice) AllFields() (uv keybase1.UserVersion, deviceID keybase1.DeviceID, deviceName string, sigKey GenericKey, encKey GenericKey) { a.RLock() defer a.RUnlock() return a.uv, a.deviceID, a.deviceName, a.signingKey, a.encryptionKey }
[ "func", "(", "a", "*", "ActiveDevice", ")", "AllFields", "(", ")", "(", "uv", "keybase1", ".", "UserVersion", ",", "deviceID", "keybase1", ".", "DeviceID", ",", "deviceName", "string", ",", "sigKey", "GenericKey", ",", "encKey", "GenericKey", ")", "{", "a"...
// AllFields returns all the ActiveDevice fields via one lock for consistency. // Safe for use by concurrent goroutines.
[ "AllFields", "returns", "all", "the", "ActiveDevice", "fields", "via", "one", "lock", "for", "consistency", ".", "Safe", "for", "use", "by", "concurrent", "goroutines", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/active_device.go#L348-L353
161,412
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
DoRUnlockedIfPossible
func (bl *blockLock) DoRUnlockedIfPossible( lState *kbfssync.LockState, f func(*kbfssync.LockState)) { if !bl.locked { bl.RUnlock(lState) defer bl.RLock(lState) } f(lState) }
go
func (bl *blockLock) DoRUnlockedIfPossible( lState *kbfssync.LockState, f func(*kbfssync.LockState)) { if !bl.locked { bl.RUnlock(lState) defer bl.RLock(lState) } f(lState) }
[ "func", "(", "bl", "*", "blockLock", ")", "DoRUnlockedIfPossible", "(", "lState", "*", "kbfssync", ".", "LockState", ",", "f", "func", "(", "*", "kbfssync", ".", "LockState", ")", ")", "{", "if", "!", "bl", ".", "locked", "{", "bl", ".", "RUnlock", "...
// DoRUnlockedIfPossible must be called when r- or w-locked. If // r-locked, r-unlocks, runs the given function, and r-locks after // it's done. Otherwise, just runs the given function.
[ "DoRUnlockedIfPossible", "must", "be", "called", "when", "r", "-", "or", "w", "-", "locked", ".", "If", "r", "-", "locked", "r", "-", "unlocks", "runs", "the", "given", "function", "and", "r", "-", "locks", "after", "it", "s", "done", ".", "Otherwise",...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L171-L179
161,413
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
markForReIdentifyIfNeeded
func (fbo *folderBranchOps) markForReIdentifyIfNeeded(now time.Time, maxValid time.Duration) { fbo.identifyLock.Lock() defer fbo.identifyLock.Unlock() if fbo.identifyDone && (now.Before(fbo.identifyTime) || fbo.identifyTime.Add(maxValid).Before(now)) { fbo.log.CDebugf(nil, "Expiring identify from %v", fbo.identify...
go
func (fbo *folderBranchOps) markForReIdentifyIfNeeded(now time.Time, maxValid time.Duration) { fbo.identifyLock.Lock() defer fbo.identifyLock.Unlock() if fbo.identifyDone && (now.Before(fbo.identifyTime) || fbo.identifyTime.Add(maxValid).Before(now)) { fbo.log.CDebugf(nil, "Expiring identify from %v", fbo.identify...
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "markForReIdentifyIfNeeded", "(", "now", "time", ".", "Time", ",", "maxValid", "time", ".", "Duration", ")", "{", "fbo", ".", "identifyLock", ".", "Lock", "(", ")", "\n", "defer", "fbo", ".", "identifyLock",...
// markForReIdentifyIfNeeded checks whether this tlf is identified and mark // it for lazy reidentification if it exceeds time limits.
[ "markForReIdentifyIfNeeded", "checks", "whether", "this", "tlf", "is", "identified", "and", "mark", "it", "for", "lazy", "reidentification", "if", "it", "exceeds", "time", "limits", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L518-L525
161,414
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
Shutdown
func (fbo *folderBranchOps) Shutdown(ctx context.Context) error { if fbo.config.CheckStateOnShutdown() { lState := makeFBOLockState() if fbo.blocks.GetState(lState) == dirtyState { fbo.log.CDebugf(ctx, "Skipping state-checking due to dirty state") } else if fbo.isUnmerged(lState) { fbo.log.CDebugf(ctx, "S...
go
func (fbo *folderBranchOps) Shutdown(ctx context.Context) error { if fbo.config.CheckStateOnShutdown() { lState := makeFBOLockState() if fbo.blocks.GetState(lState) == dirtyState { fbo.log.CDebugf(ctx, "Skipping state-checking due to dirty state") } else if fbo.isUnmerged(lState) { fbo.log.CDebugf(ctx, "S...
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "Shutdown", "(", "ctx", "context", ".", "Context", ")", "error", "{", "if", "fbo", ".", "config", ".", "CheckStateOnShutdown", "(", ")", "{", "lState", ":=", "makeFBOLockState", "(", ")", "\n\n", "if", "fb...
// Shutdown safely shuts down any background goroutines that may have // been launched by folderBranchOps.
[ "Shutdown", "safely", "shuts", "down", "any", "background", "goroutines", "that", "may", "have", "been", "launched", "by", "folderBranchOps", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L529-L564
161,415
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
isUnmerged
func (fbo *folderBranchOps) isUnmerged(lState *kbfssync.LockState) bool { fbo.mdWriterLock.Lock(lState) defer fbo.mdWriterLock.Unlock(lState) return fbo.unmergedBID != kbfsmd.NullBranchID }
go
func (fbo *folderBranchOps) isUnmerged(lState *kbfssync.LockState) bool { fbo.mdWriterLock.Lock(lState) defer fbo.mdWriterLock.Unlock(lState) return fbo.unmergedBID != kbfsmd.NullBranchID }
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "isUnmerged", "(", "lState", "*", "kbfssync", ".", "LockState", ")", "bool", "{", "fbo", ".", "mdWriterLock", ".", "Lock", "(", "lState", ")", "\n", "defer", "fbo", ".", "mdWriterLock", ".", "Unlock", "(",...
// isUnmerged should not be called if mdWriterLock is already taken.
[ "isUnmerged", "should", "not", "be", "called", "if", "mdWriterLock", "is", "already", "taken", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L719-L723
161,416
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
clearConflictView
func (fbo *folderBranchOps) clearConflictView(ctx context.Context) ( err error) { // TODO(KBFS-3990): show the cleared conflict view under a special path, // so users can copy any unmerged files manually back into their synced // view before nuking it. fbo.log.CDebugf(ctx, "Clearing conflict view") defer func(...
go
func (fbo *folderBranchOps) clearConflictView(ctx context.Context) ( err error) { // TODO(KBFS-3990): show the cleared conflict view under a special path, // so users can copy any unmerged files manually back into their synced // view before nuking it. fbo.log.CDebugf(ctx, "Clearing conflict view") defer func(...
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "clearConflictView", "(", "ctx", "context", ".", "Context", ")", "(", "err", "error", ")", "{", "// TODO(KBFS-3990): show the cleared conflict view under a special path,", "// so users can copy any unmerged files manually back i...
// clearConflictView tells the journal to move any pending writes elsewhere, // resets the CR counter, and resets the FBO to have a synced view of the TLF.
[ "clearConflictView", "tells", "the", "journal", "to", "move", "any", "pending", "writes", "elsewhere", "resets", "the", "CR", "counter", "and", "resets", "the", "FBO", "to", "have", "a", "synced", "view", "of", "the", "TLF", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L735-L760
161,417
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
getJournalPredecessorRevision
func (fbo *folderBranchOps) getJournalPredecessorRevision(ctx context.Context) ( kbfsmd.Revision, error) { jManager, err := GetJournalManager(fbo.config) if err != nil { // Journaling is disabled entirely. return kbfsmd.RevisionUninitialized, nil } jStatus, err := jManager.JournalStatus(fbo.id()) if err != n...
go
func (fbo *folderBranchOps) getJournalPredecessorRevision(ctx context.Context) ( kbfsmd.Revision, error) { jManager, err := GetJournalManager(fbo.config) if err != nil { // Journaling is disabled entirely. return kbfsmd.RevisionUninitialized, nil } jStatus, err := jManager.JournalStatus(fbo.id()) if err != n...
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "getJournalPredecessorRevision", "(", "ctx", "context", ".", "Context", ")", "(", "kbfsmd", ".", "Revision", ",", "error", ")", "{", "jManager", ",", "err", ":=", "GetJournalManager", "(", "fbo", ".", "config"...
// getJournalPredecessorRevision returns the revision that precedes // the current journal head if journaling enabled and there are // unflushed MD updates; otherwise it returns // kbfsmd.RevisionUninitialized. If there aren't any flushed MD // revisions, it returns errNoFlushedRevisions.
[ "getJournalPredecessorRevision", "returns", "the", "revision", "that", "precedes", "the", "current", "journal", "head", "if", "journaling", "enabled", "and", "there", "are", "unflushed", "MD", "updates", ";", "otherwise", "it", "returns", "kbfsmd", ".", "RevisionUni...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L785-L817
161,418
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
validateHeadLocked
func (fbo *folderBranchOps) validateHeadLocked( ctx context.Context, lState *kbfssync.LockState, md ImmutableRootMetadata) error { fbo.headLock.AssertLocked(lState) // Validate fbo against fetched md and discard the fetched one. if fbo.head.TlfID() != md.TlfID() { fbo.log.CCriticalf(ctx, "Fake untrusted TLF enc...
go
func (fbo *folderBranchOps) validateHeadLocked( ctx context.Context, lState *kbfssync.LockState, md ImmutableRootMetadata) error { fbo.headLock.AssertLocked(lState) // Validate fbo against fetched md and discard the fetched one. if fbo.head.TlfID() != md.TlfID() { fbo.log.CCriticalf(ctx, "Fake untrusted TLF enc...
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "validateHeadLocked", "(", "ctx", "context", ".", "Context", ",", "lState", "*", "kbfssync", ".", "LockState", ",", "md", "ImmutableRootMetadata", ")", "error", "{", "fbo", ".", "headLock", ".", "AssertLocked", ...
// validateHeadLocked validates an untrusted head and sets it as trusted. // see headTrustedState comment for more information.
[ "validateHeadLocked", "validates", "an", "untrusted", "head", "and", "sets", "it", "as", "trusted", ".", "see", "headTrustedState", "comment", "for", "more", "information", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L821-L833
161,419
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
doPartialMarkAndSweep
func (fbo *folderBranchOps) doPartialMarkAndSweep( ctx context.Context, syncConfig keybase1.FolderSyncConfig, latestMerged ImmutableRootMetadata) (err error) { startTime, timer := fbo.startOp( ctx, "Starting partial mark-and-sweep at revision %d", latestMerged.Revision()) defer func() { fbo.endOp( ctx, sta...
go
func (fbo *folderBranchOps) doPartialMarkAndSweep( ctx context.Context, syncConfig keybase1.FolderSyncConfig, latestMerged ImmutableRootMetadata) (err error) { startTime, timer := fbo.startOp( ctx, "Starting partial mark-and-sweep at revision %d", latestMerged.Revision()) defer func() { fbo.endOp( ctx, sta...
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "doPartialMarkAndSweep", "(", "ctx", "context", ".", "Context", ",", "syncConfig", "keybase1", ".", "FolderSyncConfig", ",", "latestMerged", "ImmutableRootMetadata", ")", "(", "err", "error", ")", "{", "startTime", ...
// doPartialMarkAndSweep runs a mark-and-sweep algorithm against all // the currently-synced paths, to delete any blocks not reachable from // one of these paths.
[ "doPartialMarkAndSweep", "runs", "a", "mark", "-", "and", "-", "sweep", "algorithm", "against", "all", "the", "currently", "-", "synced", "paths", "to", "delete", "any", "blocks", "not", "reachable", "from", "one", "of", "these", "paths", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L1256-L1346
161,420
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
setNewInitialHeadLocked
func (fbo *folderBranchOps) setNewInitialHeadLocked(ctx context.Context, lState *kbfssync.LockState, md ImmutableRootMetadata) error { fbo.mdWriterLock.AssertLocked(lState) fbo.headLock.AssertLocked(lState) if fbo.head != (ImmutableRootMetadata{}) { return errors.New("Unexpected non-nil head in setNewInitialHeadL...
go
func (fbo *folderBranchOps) setNewInitialHeadLocked(ctx context.Context, lState *kbfssync.LockState, md ImmutableRootMetadata) error { fbo.mdWriterLock.AssertLocked(lState) fbo.headLock.AssertLocked(lState) if fbo.head != (ImmutableRootMetadata{}) { return errors.New("Unexpected non-nil head in setNewInitialHeadL...
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "setNewInitialHeadLocked", "(", "ctx", "context", ".", "Context", ",", "lState", "*", "kbfssync", ".", "LockState", ",", "md", "ImmutableRootMetadata", ")", "error", "{", "fbo", ".", "mdWriterLock", ".", "Assert...
// setNewInitialHeadLocked is for when we're creating a brand-new TLF. // This is trusted.
[ "setNewInitialHeadLocked", "is", "for", "when", "we", "re", "creating", "a", "brand", "-", "new", "TLF", ".", "This", "is", "trusted", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L1839-L1850
161,421
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
setInitialHeadTrustedLocked
func (fbo *folderBranchOps) setInitialHeadTrustedLocked(ctx context.Context, lState *kbfssync.LockState, md ImmutableRootMetadata, ct mdCommitType) error { fbo.mdWriterLock.AssertLocked(lState) fbo.headLock.AssertLocked(lState) if fbo.head != (ImmutableRootMetadata{}) { return errors.New("Unexpected non-nil head...
go
func (fbo *folderBranchOps) setInitialHeadTrustedLocked(ctx context.Context, lState *kbfssync.LockState, md ImmutableRootMetadata, ct mdCommitType) error { fbo.mdWriterLock.AssertLocked(lState) fbo.headLock.AssertLocked(lState) if fbo.head != (ImmutableRootMetadata{}) { return errors.New("Unexpected non-nil head...
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "setInitialHeadTrustedLocked", "(", "ctx", "context", ".", "Context", ",", "lState", "*", "kbfssync", ".", "LockState", ",", "md", "ImmutableRootMetadata", ",", "ct", "mdCommitType", ")", "error", "{", "fbo", "....
// setInitialHeadTrustedLocked is for when the given RootMetadata // was fetched due to a user action, and will be checked against the // TLF name.
[ "setInitialHeadTrustedLocked", "is", "for", "when", "the", "given", "RootMetadata", "was", "fetched", "due", "to", "a", "user", "action", "and", "will", "be", "checked", "against", "the", "TLF", "name", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L1855-L1864
161,422
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
setHeadSuccessorLocked
func (fbo *folderBranchOps) setHeadSuccessorLocked(ctx context.Context, lState *kbfssync.LockState, md ImmutableRootMetadata, rebased bool) error { fbo.mdWriterLock.AssertLocked(lState) fbo.headLock.AssertLocked(lState) if fbo.head == (ImmutableRootMetadata{}) { // This can happen in tests via SyncFromServer(). ...
go
func (fbo *folderBranchOps) setHeadSuccessorLocked(ctx context.Context, lState *kbfssync.LockState, md ImmutableRootMetadata, rebased bool) error { fbo.mdWriterLock.AssertLocked(lState) fbo.headLock.AssertLocked(lState) if fbo.head == (ImmutableRootMetadata{}) { // This can happen in tests via SyncFromServer(). ...
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "setHeadSuccessorLocked", "(", "ctx", "context", ".", "Context", ",", "lState", "*", "kbfssync", ".", "LockState", ",", "md", "ImmutableRootMetadata", ",", "rebased", "bool", ")", "error", "{", "fbo", ".", "md...
// setHeadSuccessorLocked is for when we're applying updates from the // server or when we're applying new updates we created ourselves.
[ "setHeadSuccessorLocked", "is", "for", "when", "we", "re", "applying", "updates", "from", "the", "server", "or", "when", "we", "re", "applying", "new", "updates", "we", "created", "ourselves", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L1868-L1937
161,423
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
setHeadPredecessorLocked
func (fbo *folderBranchOps) setHeadPredecessorLocked(ctx context.Context, lState *kbfssync.LockState, md ImmutableRootMetadata) error { fbo.mdWriterLock.AssertLocked(lState) fbo.headLock.AssertLocked(lState) if fbo.head == (ImmutableRootMetadata{}) { return errors.New("Unexpected nil head in setHeadPredecessorLoc...
go
func (fbo *folderBranchOps) setHeadPredecessorLocked(ctx context.Context, lState *kbfssync.LockState, md ImmutableRootMetadata) error { fbo.mdWriterLock.AssertLocked(lState) fbo.headLock.AssertLocked(lState) if fbo.head == (ImmutableRootMetadata{}) { return errors.New("Unexpected nil head in setHeadPredecessorLoc...
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "setHeadPredecessorLocked", "(", "ctx", "context", ".", "Context", ",", "lState", "*", "kbfssync", ".", "LockState", ",", "md", "ImmutableRootMetadata", ")", "error", "{", "fbo", ".", "mdWriterLock", ".", "Asser...
// setHeadPredecessorLocked is for when we're unstaging updates.
[ "setHeadPredecessorLocked", "is", "for", "when", "we", "re", "unstaging", "updates", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L1940-L1977
161,424
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
setHeadConflictResolvedLocked
func (fbo *folderBranchOps) setHeadConflictResolvedLocked(ctx context.Context, lState *kbfssync.LockState, md ImmutableRootMetadata) error { fbo.mdWriterLock.AssertLocked(lState) fbo.headLock.AssertLocked(lState) if fbo.head.MergedStatus() != kbfsmd.Unmerged { return errors.New("Unexpected merged head in setHeadC...
go
func (fbo *folderBranchOps) setHeadConflictResolvedLocked(ctx context.Context, lState *kbfssync.LockState, md ImmutableRootMetadata) error { fbo.mdWriterLock.AssertLocked(lState) fbo.headLock.AssertLocked(lState) if fbo.head.MergedStatus() != kbfsmd.Unmerged { return errors.New("Unexpected merged head in setHeadC...
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "setHeadConflictResolvedLocked", "(", "ctx", "context", ".", "Context", ",", "lState", "*", "kbfssync", ".", "LockState", ",", "md", "ImmutableRootMetadata", ")", "error", "{", "fbo", ".", "mdWriterLock", ".", "...
// setHeadConflictResolvedLocked is for when we're setting the merged // update with resolved conflicts.
[ "setHeadConflictResolvedLocked", "is", "for", "when", "we", "re", "setting", "the", "merged", "update", "with", "resolved", "conflicts", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L1981-L1993
161,425
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
getMDForRead
func (fbo *folderBranchOps) getMDForRead( ctx context.Context, lState *kbfssync.LockState, rtype mdReadType) ( md ImmutableRootMetadata, err error) { if rtype != mdReadNeedIdentify && rtype != mdReadNoIdentify { panic("Invalid rtype in getMDLockedForRead") } md = fbo.getTrustedHead(ctx, lState, mdCommit) if md...
go
func (fbo *folderBranchOps) getMDForRead( ctx context.Context, lState *kbfssync.LockState, rtype mdReadType) ( md ImmutableRootMetadata, err error) { if rtype != mdReadNeedIdentify && rtype != mdReadNoIdentify { panic("Invalid rtype in getMDLockedForRead") } md = fbo.getTrustedHead(ctx, lState, mdCommit) if md...
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "getMDForRead", "(", "ctx", "context", ".", "Context", ",", "lState", "*", "kbfssync", ".", "LockState", ",", "rtype", "mdReadType", ")", "(", "md", "ImmutableRootMetadata", ",", "err", "error", ")", "{", "i...
// getMDForRead returns an existing md for a read operation. Note that // mds will not be fetched here.
[ "getMDForRead", "returns", "an", "existing", "md", "for", "a", "read", "operation", ".", "Note", "that", "mds", "will", "not", "be", "fetched", "here", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L2034-L2050
161,426
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
GetTLFHandle
func (fbo *folderBranchOps) GetTLFHandle(ctx context.Context, _ Node) ( *tlfhandle.Handle, error) { lState := makeFBOLockState() md, _ := fbo.getHead(ctx, lState, mdNoCommit) return md.GetTlfHandle(), nil }
go
func (fbo *folderBranchOps) GetTLFHandle(ctx context.Context, _ Node) ( *tlfhandle.Handle, error) { lState := makeFBOLockState() md, _ := fbo.getHead(ctx, lState, mdNoCommit) return md.GetTlfHandle(), nil }
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "GetTLFHandle", "(", "ctx", "context", ".", "Context", ",", "_", "Node", ")", "(", "*", "tlfhandle", ".", "Handle", ",", "error", ")", "{", "lState", ":=", "makeFBOLockState", "(", ")", "\n", "md", ",", ...
// GetTLFHandle implements the KBFSOps interface for folderBranchOps.
[ "GetTLFHandle", "implements", "the", "KBFSOps", "interface", "for", "folderBranchOps", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L2053-L2058
161,427
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
getMDForWriteOrRekeyLocked
func (fbo *folderBranchOps) getMDForWriteOrRekeyLocked( ctx context.Context, lState *kbfssync.LockState, mdType mdUpdateType) ( md ImmutableRootMetadata, err error) { defer func() { if err != nil || mdType == mdRekey { return } err = fbo.identifyOnce(ctx, md.ReadOnly()) }() md = fbo.getTrustedHead(ctx, l...
go
func (fbo *folderBranchOps) getMDForWriteOrRekeyLocked( ctx context.Context, lState *kbfssync.LockState, mdType mdUpdateType) ( md ImmutableRootMetadata, err error) { defer func() { if err != nil || mdType == mdRekey { return } err = fbo.identifyOnce(ctx, md.ReadOnly()) }() md = fbo.getTrustedHead(ctx, l...
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "getMDForWriteOrRekeyLocked", "(", "ctx", "context", ".", "Context", ",", "lState", "*", "kbfssync", ".", "LockState", ",", "mdType", "mdUpdateType", ")", "(", "md", "ImmutableRootMetadata", ",", "err", "error", ...
// getMDForWriteOrRekeyLocked can fetch MDs, identify them and // contains the fancy logic. For reading use getMDLockedForRead. // Here we actually can fetch things from the server. // rekeys are untrusted.
[ "getMDForWriteOrRekeyLocked", "can", "fetch", "MDs", "identify", "them", "and", "contains", "the", "fancy", "logic", ".", "For", "reading", "use", "getMDLockedForRead", ".", "Here", "we", "actually", "can", "fetch", "things", "from", "the", "server", ".", "rekey...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L2064-L2140
161,428
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
getMostRecentFullyMergedMD
func (fbo *folderBranchOps) getMostRecentFullyMergedMD(ctx context.Context) ( ImmutableRootMetadata, error) { mergedRev, err := fbo.getJournalPredecessorRevision(ctx) if err != nil { return ImmutableRootMetadata{}, err } if mergedRev == kbfsmd.RevisionUninitialized { // No unflushed journal entries, so use th...
go
func (fbo *folderBranchOps) getMostRecentFullyMergedMD(ctx context.Context) ( ImmutableRootMetadata, error) { mergedRev, err := fbo.getJournalPredecessorRevision(ctx) if err != nil { return ImmutableRootMetadata{}, err } if mergedRev == kbfsmd.RevisionUninitialized { // No unflushed journal entries, so use th...
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "getMostRecentFullyMergedMD", "(", "ctx", "context", ".", "Context", ")", "(", "ImmutableRootMetadata", ",", "error", ")", "{", "mergedRev", ",", "err", ":=", "fbo", ".", "getJournalPredecessorRevision", "(", "ctx...
// getMostRecentFullyMergedMD is a helper method that returns the most // recent merged MD that has been flushed to the server. This could // be different from the current local head if journaling is on. If // the journal is on a branch, it returns an error.
[ "getMostRecentFullyMergedMD", "is", "a", "helper", "method", "that", "returns", "the", "most", "recent", "merged", "MD", "that", "has", "been", "flushed", "to", "the", "server", ".", "This", "could", "be", "different", "from", "the", "current", "local", "head"...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L2171-L2194
161,429
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
getMDForRekeyWriteLocked
func (fbo *folderBranchOps) getMDForRekeyWriteLocked( ctx context.Context, lState *kbfssync.LockState) ( rmd *RootMetadata, lastWriterVerifyingKey kbfscrypto.VerifyingKey, wasRekeySet bool, err error) { fbo.mdWriterLock.AssertLocked(lState) md, err := fbo.getMDForWriteOrRekeyLocked(ctx, lState, mdRekey) if err !...
go
func (fbo *folderBranchOps) getMDForRekeyWriteLocked( ctx context.Context, lState *kbfssync.LockState) ( rmd *RootMetadata, lastWriterVerifyingKey kbfscrypto.VerifyingKey, wasRekeySet bool, err error) { fbo.mdWriterLock.AssertLocked(lState) md, err := fbo.getMDForWriteOrRekeyLocked(ctx, lState, mdRekey) if err !...
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "getMDForRekeyWriteLocked", "(", "ctx", "context", ".", "Context", ",", "lState", "*", "kbfssync", ".", "LockState", ")", "(", "rmd", "*", "RootMetadata", ",", "lastWriterVerifyingKey", "kbfscrypto", ".", "Verifyi...
// getMDForRekeyWriteLocked returns a nil `rmd` if it is a team TLF, // since that can't be rekeyed by KBFS.
[ "getMDForRekeyWriteLocked", "returns", "a", "nil", "rmd", "if", "it", "is", "a", "team", "TLF", "since", "that", "can", "t", "be", "rekeyed", "by", "KBFS", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L2311-L2354
161,430
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
ResetRootBlock
func ResetRootBlock(ctx context.Context, config Config, rmd *RootMetadata) (data.Block, data.BlockInfo, data.ReadyBlockData, error) { newDblock := data.NewDirBlock() chargedTo, err := chargedToForTLF( ctx, config.KBPKI(), config.KBPKI(), config, rmd.GetTlfHandle()) if err != nil { return nil, data.BlockInfo{}, ...
go
func ResetRootBlock(ctx context.Context, config Config, rmd *RootMetadata) (data.Block, data.BlockInfo, data.ReadyBlockData, error) { newDblock := data.NewDirBlock() chargedTo, err := chargedToForTLF( ctx, config.KBPKI(), config.KBPKI(), config, rmd.GetTlfHandle()) if err != nil { return nil, data.BlockInfo{}, ...
[ "func", "ResetRootBlock", "(", "ctx", "context", ".", "Context", ",", "config", "Config", ",", "rmd", "*", "RootMetadata", ")", "(", "data", ".", "Block", ",", "data", ".", "BlockInfo", ",", "data", ".", "ReadyBlockData", ",", "error", ")", "{", "newDblo...
// ResetRootBlock creates a new empty dir block and sets the given // metadata's root block to it.
[ "ResetRootBlock", "creates", "a", "new", "empty", "dir", "block", "and", "sets", "the", "given", "metadata", "s", "root", "block", "to", "it", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L2406-L2444
161,431
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
SetInitialHeadToNew
func (fbo *folderBranchOps) SetInitialHeadToNew( ctx context.Context, id tlf.ID, handle *tlfhandle.Handle) (err error) { startTime, timer := fbo.startOp(ctx, "SetInitialHeadToNew %s", id) defer func() { fbo.endOp( ctx, startTime, timer, "SetInitialHeadToNew %s done: %+v", id, err) }() rmd, err := makeInitial...
go
func (fbo *folderBranchOps) SetInitialHeadToNew( ctx context.Context, id tlf.ID, handle *tlfhandle.Handle) (err error) { startTime, timer := fbo.startOp(ctx, "SetInitialHeadToNew %s", id) defer func() { fbo.endOp( ctx, startTime, timer, "SetInitialHeadToNew %s done: %+v", id, err) }() rmd, err := makeInitial...
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "SetInitialHeadToNew", "(", "ctx", "context", ".", "Context", ",", "id", "tlf", ".", "ID", ",", "handle", "*", "tlfhandle", ".", "Handle", ")", "(", "err", "error", ")", "{", "startTime", ",", "timer", "...
// SetInitialHeadToNew creates a brand-new ImmutableRootMetadata // object and sets the head to that. This is trusted.
[ "SetInitialHeadToNew", "creates", "a", "brand", "-", "new", "ImmutableRootMetadata", "object", "and", "sets", "the", "head", "to", "that", ".", "This", "is", "trusted", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L2794-L2833
161,432
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
statEntry
func (fbo *folderBranchOps) statEntry(ctx context.Context, node Node) ( de data.DirEntry, err error) { defer func() { err = fbo.transformReadError(ctx, node, err) }() err = fbo.checkNodeForRead(ctx, node) if err != nil { return data.DirEntry{}, err } nodePath, err := fbo.pathFromNodeForRead(node) if err !=...
go
func (fbo *folderBranchOps) statEntry(ctx context.Context, node Node) ( de data.DirEntry, err error) { defer func() { err = fbo.transformReadError(ctx, node, err) }() err = fbo.checkNodeForRead(ctx, node) if err != nil { return data.DirEntry{}, err } nodePath, err := fbo.pathFromNodeForRead(node) if err !=...
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "statEntry", "(", "ctx", "context", ".", "Context", ",", "node", "Node", ")", "(", "de", "data", ".", "DirEntry", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "err", "=", "fbo", "."...
// statEntry is like Stat, but it returns a DirEntry. This is used by // tests.
[ "statEntry", "is", "like", "Stat", "but", "it", "returns", "a", "DirEntry", ".", "This", "is", "used", "by", "tests", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L3301-L3351
161,433
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
isRevisionConflict
func isRevisionConflict(err error) bool { if err == nil { return false } _, isConflictRevision := err.(kbfsmd.ServerErrorConflictRevision) _, isConflictPrevRoot := err.(kbfsmd.ServerErrorConflictPrevRoot) _, isConflictDiskUsage := err.(kbfsmd.ServerErrorConflictDiskUsage) _, isConditionFailed := err.(kbfsmd.Ser...
go
func isRevisionConflict(err error) bool { if err == nil { return false } _, isConflictRevision := err.(kbfsmd.ServerErrorConflictRevision) _, isConflictPrevRoot := err.(kbfsmd.ServerErrorConflictPrevRoot) _, isConflictDiskUsage := err.(kbfsmd.ServerErrorConflictDiskUsage) _, isConditionFailed := err.(kbfsmd.Ser...
[ "func", "isRevisionConflict", "(", "err", "error", ")", "bool", "{", "if", "err", "==", "nil", "{", "return", "false", "\n", "}", "\n", "_", ",", "isConflictRevision", ":=", "err", ".", "(", "kbfsmd", ".", "ServerErrorConflictRevision", ")", "\n", "_", "...
// Returns true if the passed error indicates a revision conflict.
[ "Returns", "true", "if", "the", "passed", "error", "indicates", "a", "revision", "conflict", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L3476-L3489
161,434
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
PathType
func (fbo *folderBranchOps) PathType() tlfhandle.PathType { switch fbo.folderBranch.Tlf.Type() { case tlf.Public: return tlfhandle.PublicPathType case tlf.Private: return tlfhandle.PrivatePathType case tlf.SingleTeam: return tlfhandle.SingleTeamPathType default: panic(fmt.Sprintf("Unknown TLF type: %s", fb...
go
func (fbo *folderBranchOps) PathType() tlfhandle.PathType { switch fbo.folderBranch.Tlf.Type() { case tlf.Public: return tlfhandle.PublicPathType case tlf.Private: return tlfhandle.PrivatePathType case tlf.SingleTeam: return tlfhandle.SingleTeamPathType default: panic(fmt.Sprintf("Unknown TLF type: %s", fb...
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "PathType", "(", ")", "tlfhandle", ".", "PathType", "{", "switch", "fbo", ".", "folderBranch", ".", "Tlf", ".", "Type", "(", ")", "{", "case", "tlf", ".", "Public", ":", "return", "tlfhandle", ".", "Publ...
// PathType returns path type
[ "PathType", "returns", "path", "type" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L4076-L4087
161,435
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
canonicalPath
func (fbo *folderBranchOps) canonicalPath(ctx context.Context, dir Node, name string) (string, error) { dirPath, err := fbo.pathFromNodeForRead(dir) if err != nil { return "", err } return tlfhandle.BuildCanonicalPath( fbo.PathType(), dirPath.String(), name), nil }
go
func (fbo *folderBranchOps) canonicalPath(ctx context.Context, dir Node, name string) (string, error) { dirPath, err := fbo.pathFromNodeForRead(dir) if err != nil { return "", err } return tlfhandle.BuildCanonicalPath( fbo.PathType(), dirPath.String(), name), nil }
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "canonicalPath", "(", "ctx", "context", ".", "Context", ",", "dir", "Node", ",", "name", "string", ")", "(", "string", ",", "error", ")", "{", "dirPath", ",", "err", ":=", "fbo", ".", "pathFromNodeForRead"...
// canonicalPath returns full canonical path for dir node and name.
[ "canonicalPath", "returns", "full", "canonical", "path", "for", "dir", "node", "and", "name", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L4090-L4097
161,436
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
notifyAndSyncOrSignal
func (fbo *folderBranchOps) notifyAndSyncOrSignal( ctx context.Context, lState *kbfssync.LockState, undoFn dirCacheUndoFn, nodesToDirty []Node, op op, md ReadOnlyRootMetadata) (err error) { fbo.dirOps = append(fbo.dirOps, cachedDirOp{op, nodesToDirty}) var addedNodes []Node for _, n := range nodesToDirty { added...
go
func (fbo *folderBranchOps) notifyAndSyncOrSignal( ctx context.Context, lState *kbfssync.LockState, undoFn dirCacheUndoFn, nodesToDirty []Node, op op, md ReadOnlyRootMetadata) (err error) { fbo.dirOps = append(fbo.dirOps, cachedDirOp{op, nodesToDirty}) var addedNodes []Node for _, n := range nodesToDirty { added...
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "notifyAndSyncOrSignal", "(", "ctx", "context", ".", "Context", ",", "lState", "*", "kbfssync", ".", "LockState", ",", "undoFn", "dirCacheUndoFn", ",", "nodesToDirty", "[", "]", "Node", ",", "op", "op", ",", ...
// notifyAndSyncOrSignal caches an op in memory and dirties the // relevant node, and then sends a notification for it. If batching // is on, it signals the write; otherwise it syncs the change. It // should only be called as the final instruction that can fail in a // method.
[ "notifyAndSyncOrSignal", "caches", "an", "op", "in", "memory", "and", "dirties", "the", "relevant", "node", "and", "then", "sends", "a", "notification", "for", "it", ".", "If", "batching", "is", "on", "it", "signals", "the", "write", ";", "otherwise", "it", ...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L4548-L4581
161,437
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
unrefEntryLocked
func (fbo *folderBranchOps) unrefEntryLocked(ctx context.Context, lState *kbfssync.LockState, kmd libkey.KeyMetadata, ro op, dir data.Path, de data.DirEntry, name string) error { fbo.mdWriterLock.AssertLocked(lState) if de.Type == data.Sym { return nil } unrefsToAdd := make(map[data.BlockPointer]bool) fbo.pre...
go
func (fbo *folderBranchOps) unrefEntryLocked(ctx context.Context, lState *kbfssync.LockState, kmd libkey.KeyMetadata, ro op, dir data.Path, de data.DirEntry, name string) error { fbo.mdWriterLock.AssertLocked(lState) if de.Type == data.Sym { return nil } unrefsToAdd := make(map[data.BlockPointer]bool) fbo.pre...
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "unrefEntryLocked", "(", "ctx", "context", ".", "Context", ",", "lState", "*", "kbfssync", ".", "LockState", ",", "kmd", "libkey", ".", "KeyMetadata", ",", "ro", "op", ",", "dir", "data", ".", "Path", ",",...
// unrefEntry modifies md to unreference all relevant blocks for the // given entry.
[ "unrefEntry", "modifies", "md", "to", "unreference", "all", "relevant", "blocks", "for", "the", "given", "entry", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L4694-L4745
161,438
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
SyncAll
func (fbo *folderBranchOps) SyncAll( ctx context.Context, folderBranch data.FolderBranch) (err error) { startTime, timer := fbo.startOp(ctx, "SyncAll") defer func() { fbo.endOp(ctx, startTime, timer, "SyncAll done: %+v", err) }() if folderBranch != fbo.folderBranch { return WrongOpsError{fbo.folderBranch, fol...
go
func (fbo *folderBranchOps) SyncAll( ctx context.Context, folderBranch data.FolderBranch) (err error) { startTime, timer := fbo.startOp(ctx, "SyncAll") defer func() { fbo.endOp(ctx, startTime, timer, "SyncAll done: %+v", err) }() if folderBranch != fbo.folderBranch { return WrongOpsError{fbo.folderBranch, fol...
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "SyncAll", "(", "ctx", "context", ".", "Context", ",", "folderBranch", "data", ".", "FolderBranch", ")", "(", "err", "error", ")", "{", "startTime", ",", "timer", ":=", "fbo", ".", "startOp", "(", "ctx", ...
// SyncAll implements the KBFSOps interface for folderBranchOps.
[ "SyncAll", "implements", "the", "KBFSOps", "interface", "for", "folderBranchOps", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L5931-L5946
161,439
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
notifyBatchLocked
func (fbo *folderBranchOps) notifyBatchLocked( ctx context.Context, lState *kbfssync.LockState, md ImmutableRootMetadata) error { fbo.headLock.AssertLocked(lState) for _, op := range md.data.Changes.Ops { err := fbo.notifyOneOpLocked(ctx, lState, op, md.ReadOnly(), false) if err != nil { return err } } ...
go
func (fbo *folderBranchOps) notifyBatchLocked( ctx context.Context, lState *kbfssync.LockState, md ImmutableRootMetadata) error { fbo.headLock.AssertLocked(lState) for _, op := range md.data.Changes.Ops { err := fbo.notifyOneOpLocked(ctx, lState, op, md.ReadOnly(), false) if err != nil { return err } } ...
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "notifyBatchLocked", "(", "ctx", "context", ".", "Context", ",", "lState", "*", "kbfssync", ".", "LockState", ",", "md", "ImmutableRootMetadata", ")", "error", "{", "fbo", ".", "headLock", ".", "AssertLocked", ...
// notifyBatchLocked sends out a notification for all the ops in md.
[ "notifyBatchLocked", "sends", "out", "a", "notification", "for", "all", "the", "ops", "in", "md", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L5987-L5999
161,440
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
searchForNode
func (fbo *folderBranchOps) searchForNode(ctx context.Context, ptr data.BlockPointer, md ReadOnlyRootMetadata) (Node, error) { // Record which pointers are new to this update, and thus worth // searching. newPtrs := make(map[data.BlockPointer]bool) for _, op := range md.data.Changes.Ops { for _, update := range ...
go
func (fbo *folderBranchOps) searchForNode(ctx context.Context, ptr data.BlockPointer, md ReadOnlyRootMetadata) (Node, error) { // Record which pointers are new to this update, and thus worth // searching. newPtrs := make(map[data.BlockPointer]bool) for _, op := range md.data.Changes.Ops { for _, update := range ...
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "searchForNode", "(", "ctx", "context", ".", "Context", ",", "ptr", "data", ".", "BlockPointer", ",", "md", "ReadOnlyRootMetadata", ")", "(", "Node", ",", "error", ")", "{", "// Record which pointers are new to th...
// searchForNode tries to figure out the path to the given // blockPointer, using only the block updates that happened as part of // a given MD update operation.
[ "searchForNode", "tries", "to", "figure", "out", "the", "path", "to", "the", "given", "blockPointer", "using", "only", "the", "block", "updates", "that", "happened", "as", "part", "of", "a", "given", "MD", "update", "operation", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L6004-L6030
161,441
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
getAndApplyMDUpdates
func (fbo *folderBranchOps) getAndApplyMDUpdates(ctx context.Context, lState *kbfssync.LockState, lockBeforeGet *keybase1.LockID, applyFunc applyMDUpdatesFunc) error { // first look up all MD revisions newer than my current head start := fbo.getLatestMergedRevision(lState) + 1 rmds, err := getMergedMDUpdates(ctx, ...
go
func (fbo *folderBranchOps) getAndApplyMDUpdates(ctx context.Context, lState *kbfssync.LockState, lockBeforeGet *keybase1.LockID, applyFunc applyMDUpdatesFunc) error { // first look up all MD revisions newer than my current head start := fbo.getLatestMergedRevision(lState) + 1 rmds, err := getMergedMDUpdates(ctx, ...
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "getAndApplyMDUpdates", "(", "ctx", "context", ".", "Context", ",", "lState", "*", "kbfssync", ".", "LockState", ",", "lockBeforeGet", "*", "keybase1", ".", "LockID", ",", "applyFunc", "applyMDUpdatesFunc", ")", ...
// Assumes all necessary locking is either already done by caller, or // is done by applyFunc.
[ "Assumes", "all", "necessary", "locking", "is", "either", "already", "done", "by", "caller", "or", "is", "done", "by", "applyFunc", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L6635-L6651
161,442
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
getUnmergedMDUpdates
func (fbo *folderBranchOps) getUnmergedMDUpdates( ctx context.Context, lState *kbfssync.LockState) ( kbfsmd.Revision, []ImmutableRootMetadata, error) { // acquire mdWriterLock to read the current branch ID. unmergedBID := func() kbfsmd.BranchID { fbo.mdWriterLock.Lock(lState) defer fbo.mdWriterLock.Unlock(lStat...
go
func (fbo *folderBranchOps) getUnmergedMDUpdates( ctx context.Context, lState *kbfssync.LockState) ( kbfsmd.Revision, []ImmutableRootMetadata, error) { // acquire mdWriterLock to read the current branch ID. unmergedBID := func() kbfsmd.BranchID { fbo.mdWriterLock.Lock(lState) defer fbo.mdWriterLock.Unlock(lStat...
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "getUnmergedMDUpdates", "(", "ctx", "context", ".", "Context", ",", "lState", "*", "kbfssync", ".", "LockState", ")", "(", "kbfsmd", ".", "Revision", ",", "[", "]", "ImmutableRootMetadata", ",", "error", ")", ...
// getUnmergedMDUpdates returns a slice of the unmerged MDs for this // TLF's current unmerged branch and unmerged branch, between the // merge point for the branch and the current head. The returned MDs // are the same instances that are stored in the MD cache, so they // should be modified with care.
[ "getUnmergedMDUpdates", "returns", "a", "slice", "of", "the", "unmerged", "MDs", "for", "this", "TLF", "s", "current", "unmerged", "branch", "and", "unmerged", "branch", "between", "the", "merge", "point", "for", "the", "branch", "and", "the", "current", "head...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L6700-L6711
161,443
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
undoUnmergedMDUpdatesLocked
func (fbo *folderBranchOps) undoUnmergedMDUpdatesLocked( ctx context.Context, lState *kbfssync.LockState) ([]data.BlockPointer, error) { fbo.mdWriterLock.AssertLocked(lState) currHead, unmergedRmds, err := fbo.getUnmergedMDUpdatesLocked(ctx, lState) if err != nil { return nil, err } err = fbo.undoMDUpdatesLoc...
go
func (fbo *folderBranchOps) undoUnmergedMDUpdatesLocked( ctx context.Context, lState *kbfssync.LockState) ([]data.BlockPointer, error) { fbo.mdWriterLock.AssertLocked(lState) currHead, unmergedRmds, err := fbo.getUnmergedMDUpdatesLocked(ctx, lState) if err != nil { return nil, err } err = fbo.undoMDUpdatesLoc...
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "undoUnmergedMDUpdatesLocked", "(", "ctx", "context", ".", "Context", ",", "lState", "*", "kbfssync", ".", "LockState", ")", "(", "[", "]", "data", ".", "BlockPointer", ",", "error", ")", "{", "fbo", ".", ...
// Returns a list of block pointers that were created during the // staged era.
[ "Returns", "a", "list", "of", "block", "pointers", "that", "were", "created", "during", "the", "staged", "era", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L6724-L6797
161,444
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
finalizeResolution
func (fbo *folderBranchOps) finalizeResolution(ctx context.Context, lState *kbfssync.LockState, md *RootMetadata, bps blockPutState, newOps []op, blocksToDelete []kbfsblock.ID) error { // Take the writer lock. fbo.mdWriterLock.Lock(lState) defer fbo.mdWriterLock.Unlock(lState) return fbo.finalizeResolutionLocked(...
go
func (fbo *folderBranchOps) finalizeResolution(ctx context.Context, lState *kbfssync.LockState, md *RootMetadata, bps blockPutState, newOps []op, blocksToDelete []kbfsblock.ID) error { // Take the writer lock. fbo.mdWriterLock.Lock(lState) defer fbo.mdWriterLock.Unlock(lState) return fbo.finalizeResolutionLocked(...
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "finalizeResolution", "(", "ctx", "context", ".", "Context", ",", "lState", "*", "kbfssync", ".", "LockState", ",", "md", "*", "RootMetadata", ",", "bps", "blockPutState", ",", "newOps", "[", "]", "op", ",",...
// finalizeResolution caches all the blocks, and writes the new MD to // the merged branch, failing if there is a conflict. It also sends // out the given newOps notifications locally. This is used for // completing conflict resolution.
[ "finalizeResolution", "caches", "all", "the", "blocks", "and", "writes", "the", "new", "MD", "to", "the", "merged", "branch", "failing", "if", "there", "is", "a", "conflict", ".", "It", "also", "sends", "out", "the", "given", "newOps", "notifications", "loca...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L7857-L7865
161,445
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
TeamAbandoned
func (fbo *folderBranchOps) TeamAbandoned( ctx context.Context, tid keybase1.TeamID) { ctx, cancelFunc := fbo.newCtxWithFBOID() defer cancelFunc() fbo.log.CDebugf(ctx, "Abandoning team %s", tid) fbo.locallyFinalizeTLF(ctx) }
go
func (fbo *folderBranchOps) TeamAbandoned( ctx context.Context, tid keybase1.TeamID) { ctx, cancelFunc := fbo.newCtxWithFBOID() defer cancelFunc() fbo.log.CDebugf(ctx, "Abandoning team %s", tid) fbo.locallyFinalizeTLF(ctx) }
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "TeamAbandoned", "(", "ctx", "context", ".", "Context", ",", "tid", "keybase1", ".", "TeamID", ")", "{", "ctx", ",", "cancelFunc", ":=", "fbo", ".", "newCtxWithFBOID", "(", ")", "\n", "defer", "cancelFunc", ...
// TeamAbandoned implements the KBFSOps interface for folderBranchOps.
[ "TeamAbandoned", "implements", "the", "KBFSOps", "interface", "for", "folderBranchOps", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L8106-L8112
161,446
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
MigrateToImplicitTeam
func (fbo *folderBranchOps) MigrateToImplicitTeam( ctx context.Context, id tlf.ID) (err error) { // Only MasterBranch FBOs may be migrated. fb := data.FolderBranch{Tlf: id, Branch: data.MasterBranch} if fb != fbo.folderBranch { // TODO: log instead of panic? panic(WrongOpsError{fbo.folderBranch, fb}) } fbo.l...
go
func (fbo *folderBranchOps) MigrateToImplicitTeam( ctx context.Context, id tlf.ID) (err error) { // Only MasterBranch FBOs may be migrated. fb := data.FolderBranch{Tlf: id, Branch: data.MasterBranch} if fb != fbo.folderBranch { // TODO: log instead of panic? panic(WrongOpsError{fbo.folderBranch, fb}) } fbo.l...
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "MigrateToImplicitTeam", "(", "ctx", "context", ".", "Context", ",", "id", "tlf", ".", "ID", ")", "(", "err", "error", ")", "{", "// Only MasterBranch FBOs may be migrated.", "fb", ":=", "data", ".", "FolderBran...
// MigrateToImplicitTeam implements the KBFSOps interface for folderBranchOps.
[ "MigrateToImplicitTeam", "implements", "the", "KBFSOps", "interface", "for", "folderBranchOps", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L8143-L8222
161,447
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
GetEditHistory
func (fbo *folderBranchOps) GetEditHistory( ctx context.Context, _ data.FolderBranch) ( tlfHistory keybase1.FSFolderEditHistory, err error) { // Wait for any outstanding edit requests. if err := fbo.editActivity.Wait(ctx); err != nil { return keybase1.FSFolderEditHistory{}, err } lState := makeFBOLockState() ...
go
func (fbo *folderBranchOps) GetEditHistory( ctx context.Context, _ data.FolderBranch) ( tlfHistory keybase1.FSFolderEditHistory, err error) { // Wait for any outstanding edit requests. if err := fbo.editActivity.Wait(ctx); err != nil { return keybase1.FSFolderEditHistory{}, err } lState := makeFBOLockState() ...
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "GetEditHistory", "(", "ctx", "context", ".", "Context", ",", "_", "data", ".", "FolderBranch", ")", "(", "tlfHistory", "keybase1", ".", "FSFolderEditHistory", ",", "err", "error", ")", "{", "// Wait for any out...
// GetEditHistory implements the KBFSOps interface for folderBranchOps
[ "GetEditHistory", "implements", "the", "KBFSOps", "interface", "for", "folderBranchOps" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L8291-L8303
161,448
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
ClearPrivateFolderMD
func (fbo *folderBranchOps) ClearPrivateFolderMD(ctx context.Context) { func() { // Cancel the edits goroutine and forget the old history, evem // for public folders, since some of the state in the history // is dependent on your login state. fbo.editsLock.Lock() defer fbo.editsLock.Unlock() if fbo.cancelE...
go
func (fbo *folderBranchOps) ClearPrivateFolderMD(ctx context.Context) { func() { // Cancel the edits goroutine and forget the old history, evem // for public folders, since some of the state in the history // is dependent on your login state. fbo.editsLock.Lock() defer fbo.editsLock.Unlock() if fbo.cancelE...
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "ClearPrivateFolderMD", "(", "ctx", "context", ".", "Context", ")", "{", "func", "(", ")", "{", "// Cancel the edits goroutine and forget the old history, evem", "// for public folders, since some of the state in the history", ...
// ClearPrivateFolderMD implements the KBFSOps interface for // folderBranchOps.
[ "ClearPrivateFolderMD", "implements", "the", "KBFSOps", "interface", "for", "folderBranchOps", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L8312-L8372
161,449
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
ForceFastForward
func (fbo *folderBranchOps) ForceFastForward(ctx context.Context) { lState := makeFBOLockState() fbo.headLock.RLock(lState) defer fbo.headLock.RUnlock(lState) if fbo.head != (ImmutableRootMetadata{}) { // We're already up to date. return } if !fbo.hasBeenCleared { // No reason to fast-forward here if it has...
go
func (fbo *folderBranchOps) ForceFastForward(ctx context.Context) { lState := makeFBOLockState() fbo.headLock.RLock(lState) defer fbo.headLock.RUnlock(lState) if fbo.head != (ImmutableRootMetadata{}) { // We're already up to date. return } if !fbo.hasBeenCleared { // No reason to fast-forward here if it has...
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "ForceFastForward", "(", "ctx", "context", ".", "Context", ")", "{", "lState", ":=", "makeFBOLockState", "(", ")", "\n", "fbo", ".", "headLock", ".", "RLock", "(", "lState", ")", "\n", "defer", "fbo", ".",...
// ForceFastForward implements the KBFSOps interface for // folderBranchOps.
[ "ForceFastForward", "implements", "the", "KBFSOps", "interface", "for", "folderBranchOps", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L8376-L8456
161,450
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
Reset
func (fbo *folderBranchOps) Reset( ctx context.Context, handle *tlfhandle.Handle) error { currHandle, err := fbo.GetTLFHandle(ctx, nil) if err != nil { return err } equal, err := currHandle.Equals(fbo.config.Codec(), *handle) if err != nil { return err } if !equal { return errors.Errorf("Can't reset %#v g...
go
func (fbo *folderBranchOps) Reset( ctx context.Context, handle *tlfhandle.Handle) error { currHandle, err := fbo.GetTLFHandle(ctx, nil) if err != nil { return err } equal, err := currHandle.Equals(fbo.config.Codec(), *handle) if err != nil { return err } if !equal { return errors.Errorf("Can't reset %#v g...
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "Reset", "(", "ctx", "context", ".", "Context", ",", "handle", "*", "tlfhandle", ".", "Handle", ")", "error", "{", "currHandle", ",", "err", ":=", "fbo", ".", "GetTLFHandle", "(", "ctx", ",", "nil", ")",...
// Reset implements the KBFSOps interface for folderBranchOps.
[ "Reset", "implements", "the", "KBFSOps", "interface", "for", "folderBranchOps", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L8459-L8509
161,451
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
GetSyncConfig
func (fbo *folderBranchOps) GetSyncConfig( ctx context.Context, tlfID tlf.ID) (keybase1.FolderSyncConfig, error) { if tlfID != fbo.id() || fbo.branch() != data.MasterBranch { return keybase1.FolderSyncConfig{}, WrongOpsError{ fbo.folderBranch, data.FolderBranch{ Tlf: tlfID, Branch: data.MasterBranch, ...
go
func (fbo *folderBranchOps) GetSyncConfig( ctx context.Context, tlfID tlf.ID) (keybase1.FolderSyncConfig, error) { if tlfID != fbo.id() || fbo.branch() != data.MasterBranch { return keybase1.FolderSyncConfig{}, WrongOpsError{ fbo.folderBranch, data.FolderBranch{ Tlf: tlfID, Branch: data.MasterBranch, ...
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "GetSyncConfig", "(", "ctx", "context", ".", "Context", ",", "tlfID", "tlf", ".", "ID", ")", "(", "keybase1", ".", "FolderSyncConfig", ",", "error", ")", "{", "if", "tlfID", "!=", "fbo", ".", "id", "(", ...
// GetSyncConfig implements the KBFSOps interface for folderBranchOps.
[ "GetSyncConfig", "implements", "the", "KBFSOps", "interface", "for", "folderBranchOps", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L8512-L8567
161,452
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
InvalidateNodeAndChildren
func (fbo *folderBranchOps) InvalidateNodeAndChildren( ctx context.Context, node Node) (err error) { startTime, timer := fbo.startOp(ctx, "InvalidateNodeAndChildren %p", node) defer func() { fbo.endOp( ctx, startTime, timer, "InvalidateNodeAndChildren %p done: %+v", node, err) }() lState := makeFBOLockSta...
go
func (fbo *folderBranchOps) InvalidateNodeAndChildren( ctx context.Context, node Node) (err error) { startTime, timer := fbo.startOp(ctx, "InvalidateNodeAndChildren %p", node) defer func() { fbo.endOp( ctx, startTime, timer, "InvalidateNodeAndChildren %p done: %+v", node, err) }() lState := makeFBOLockSta...
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "InvalidateNodeAndChildren", "(", "ctx", "context", ".", "Context", ",", "node", "Node", ")", "(", "err", "error", ")", "{", "startTime", ",", "timer", ":=", "fbo", ".", "startOp", "(", "ctx", ",", "\"", ...
// InvalidateNodeAndChildren implements the KBFSOps interface for // folderBranchOps.
[ "InvalidateNodeAndChildren", "implements", "the", "KBFSOps", "interface", "for", "folderBranchOps", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L8877-L8897
161,453
keybase/client
go/kbfs/libkbfs/folder_branch_ops.go
NewNotificationChannel
func (fbo *folderBranchOps) NewNotificationChannel( ctx context.Context, handle *tlfhandle.Handle, convID chat1.ConversationID, channelName string) { monitoringCh := fbo.getEditMonitoringChannel() if monitoringCh == nil { fbo.vlog.CLogf( ctx, libkb.VLog1, "Ignoring new notification channel while edits are u...
go
func (fbo *folderBranchOps) NewNotificationChannel( ctx context.Context, handle *tlfhandle.Handle, convID chat1.ConversationID, channelName string) { monitoringCh := fbo.getEditMonitoringChannel() if monitoringCh == nil { fbo.vlog.CLogf( ctx, libkb.VLog1, "Ignoring new notification channel while edits are u...
[ "func", "(", "fbo", "*", "folderBranchOps", ")", "NewNotificationChannel", "(", "ctx", "context", ".", "Context", ",", "handle", "*", "tlfhandle", ".", "Handle", ",", "convID", "chat1", ".", "ConversationID", ",", "channelName", "string", ")", "{", "monitoring...
// NewNotificationChannel implements the KBFSOps interface for // folderBranchOps.
[ "NewNotificationChannel", "implements", "the", "KBFSOps", "interface", "for", "folderBranchOps", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/folder_branch_ops.go#L8907-L8929
161,454
keybase/client
go/client/json_api_common.go
encodeReply
func encodeReply(call Call, reply Reply, wr io.Writer, indent bool) error { // copy jsonrpc fields from call to reply reply.Jsonrpc = call.Jsonrpc reply.ID = call.ID enc := json.NewEncoder(wr) if indent { enc.SetIndent("", " ") } return enc.Encode(reply) }
go
func encodeReply(call Call, reply Reply, wr io.Writer, indent bool) error { // copy jsonrpc fields from call to reply reply.Jsonrpc = call.Jsonrpc reply.ID = call.ID enc := json.NewEncoder(wr) if indent { enc.SetIndent("", " ") } return enc.Encode(reply) }
[ "func", "encodeReply", "(", "call", "Call", ",", "reply", "Reply", ",", "wr", "io", ".", "Writer", ",", "indent", "bool", ")", "error", "{", "// copy jsonrpc fields from call to reply", "reply", ".", "Jsonrpc", "=", "call", ".", "Jsonrpc", "\n", "reply", "."...
// encodeReply JSON encodes all replies.
[ "encodeReply", "JSON", "encodes", "all", "replies", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/client/json_api_common.go#L226-L236
161,455
keybase/client
go/client/json_api_common.go
unmarshalOptions
func unmarshalOptions(c Call, opts Checker) error { if len(c.Params.Options) == 0 { // still check the options in case any fields are required. return opts.Check() } if err := json.Unmarshal(c.Params.Options, opts); err != nil { return err } return opts.Check() }
go
func unmarshalOptions(c Call, opts Checker) error { if len(c.Params.Options) == 0 { // still check the options in case any fields are required. return opts.Check() } if err := json.Unmarshal(c.Params.Options, opts); err != nil { return err } return opts.Check() }
[ "func", "unmarshalOptions", "(", "c", "Call", ",", "opts", "Checker", ")", "error", "{", "if", "len", "(", "c", ".", "Params", ".", "Options", ")", "==", "0", "{", "// still check the options in case any fields are required.", "return", "opts", ".", "Check", "...
// unmarshalOptions unmarshals any options in Call into opts, // and verify they pass the Checker checks.
[ "unmarshalOptions", "unmarshals", "any", "options", "in", "Call", "into", "opts", "and", "verify", "they", "pass", "the", "Checker", "checks", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/client/json_api_common.go#L240-L249
161,456
keybase/client
go/protocol/kbgitkbfs1/disk_block_cache.go
GetBlock
func (c DiskBlockCacheClient) GetBlock(ctx context.Context, __arg GetBlockArg) (res GetBlockRes, err error) { err = c.Cli.Call(ctx, "kbgitkbfs.1.DiskBlockCache.GetBlock", []interface{}{__arg}, &res) return }
go
func (c DiskBlockCacheClient) GetBlock(ctx context.Context, __arg GetBlockArg) (res GetBlockRes, err error) { err = c.Cli.Call(ctx, "kbgitkbfs.1.DiskBlockCache.GetBlock", []interface{}{__arg}, &res) return }
[ "func", "(", "c", "DiskBlockCacheClient", ")", "GetBlock", "(", "ctx", "context", ".", "Context", ",", "__arg", "GetBlockArg", ")", "(", "res", "GetBlockRes", ",", "err", "error", ")", "{", "err", "=", "c", ".", "Cli", ".", "Call", "(", "ctx", ",", "...
// GetBlock gets a block from the disk cache.
[ "GetBlock", "gets", "a", "block", "from", "the", "disk", "cache", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/kbgitkbfs1/disk_block_cache.go#L207-L210
161,457
keybase/client
go/protocol/kbgitkbfs1/disk_block_cache.go
GetPrefetchStatus
func (c DiskBlockCacheClient) GetPrefetchStatus(ctx context.Context, __arg GetPrefetchStatusArg) (res PrefetchStatus, err error) { err = c.Cli.Call(ctx, "kbgitkbfs.1.DiskBlockCache.GetPrefetchStatus", []interface{}{__arg}, &res) return }
go
func (c DiskBlockCacheClient) GetPrefetchStatus(ctx context.Context, __arg GetPrefetchStatusArg) (res PrefetchStatus, err error) { err = c.Cli.Call(ctx, "kbgitkbfs.1.DiskBlockCache.GetPrefetchStatus", []interface{}{__arg}, &res) return }
[ "func", "(", "c", "DiskBlockCacheClient", ")", "GetPrefetchStatus", "(", "ctx", "context", ".", "Context", ",", "__arg", "GetPrefetchStatusArg", ")", "(", "res", "PrefetchStatus", ",", "err", "error", ")", "{", "err", "=", "c", ".", "Cli", ".", "Call", "("...
// GetPrefetchStatus gets the prefetch status from the disk cache.
[ "GetPrefetchStatus", "gets", "the", "prefetch", "status", "from", "the", "disk", "cache", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/kbgitkbfs1/disk_block_cache.go#L213-L216
161,458
keybase/client
go/protocol/kbgitkbfs1/disk_block_cache.go
PutBlock
func (c DiskBlockCacheClient) PutBlock(ctx context.Context, __arg PutBlockArg) (err error) { err = c.Cli.Call(ctx, "kbgitkbfs.1.DiskBlockCache.PutBlock", []interface{}{__arg}, nil) return }
go
func (c DiskBlockCacheClient) PutBlock(ctx context.Context, __arg PutBlockArg) (err error) { err = c.Cli.Call(ctx, "kbgitkbfs.1.DiskBlockCache.PutBlock", []interface{}{__arg}, nil) return }
[ "func", "(", "c", "DiskBlockCacheClient", ")", "PutBlock", "(", "ctx", "context", ".", "Context", ",", "__arg", "PutBlockArg", ")", "(", "err", "error", ")", "{", "err", "=", "c", ".", "Cli", ".", "Call", "(", "ctx", ",", "\"", "\"", ",", "[", "]",...
// PutBlock puts a block into the disk cache.
[ "PutBlock", "puts", "a", "block", "into", "the", "disk", "cache", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/kbgitkbfs1/disk_block_cache.go#L219-L222
161,459
keybase/client
go/protocol/kbgitkbfs1/disk_block_cache.go
DeleteBlocks
func (c DiskBlockCacheClient) DeleteBlocks(ctx context.Context, blockIDs [][]byte) (res DeleteBlocksRes, err error) { __arg := DeleteBlocksArg{BlockIDs: blockIDs} err = c.Cli.Call(ctx, "kbgitkbfs.1.DiskBlockCache.DeleteBlocks", []interface{}{__arg}, &res) return }
go
func (c DiskBlockCacheClient) DeleteBlocks(ctx context.Context, blockIDs [][]byte) (res DeleteBlocksRes, err error) { __arg := DeleteBlocksArg{BlockIDs: blockIDs} err = c.Cli.Call(ctx, "kbgitkbfs.1.DiskBlockCache.DeleteBlocks", []interface{}{__arg}, &res) return }
[ "func", "(", "c", "DiskBlockCacheClient", ")", "DeleteBlocks", "(", "ctx", "context", ".", "Context", ",", "blockIDs", "[", "]", "[", "]", "byte", ")", "(", "res", "DeleteBlocksRes", ",", "err", "error", ")", "{", "__arg", ":=", "DeleteBlocksArg", "{", "...
// DeleteBlocks deletes a set of blocks from the disk cache.
[ "DeleteBlocks", "deletes", "a", "set", "of", "blocks", "from", "the", "disk", "cache", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/kbgitkbfs1/disk_block_cache.go#L225-L229
161,460
keybase/client
go/protocol/kbgitkbfs1/disk_block_cache.go
UpdateBlockMetadata
func (c DiskBlockCacheClient) UpdateBlockMetadata(ctx context.Context, __arg UpdateBlockMetadataArg) (err error) { err = c.Cli.Call(ctx, "kbgitkbfs.1.DiskBlockCache.UpdateBlockMetadata", []interface{}{__arg}, nil) return }
go
func (c DiskBlockCacheClient) UpdateBlockMetadata(ctx context.Context, __arg UpdateBlockMetadataArg) (err error) { err = c.Cli.Call(ctx, "kbgitkbfs.1.DiskBlockCache.UpdateBlockMetadata", []interface{}{__arg}, nil) return }
[ "func", "(", "c", "DiskBlockCacheClient", ")", "UpdateBlockMetadata", "(", "ctx", "context", ".", "Context", ",", "__arg", "UpdateBlockMetadataArg", ")", "(", "err", "error", ")", "{", "err", "=", "c", ".", "Cli", ".", "Call", "(", "ctx", ",", "\"", "\""...
// UpdateBlockMetadata updates the metadata for a block in the disk cache.
[ "UpdateBlockMetadata", "updates", "the", "metadata", "for", "a", "block", "in", "the", "disk", "cache", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/kbgitkbfs1/disk_block_cache.go#L232-L235
161,461
keybase/client
go/client/cmd_wallet_history.go
filterNote
func (c *cmdWalletHistory) filterNote(note string) string { lines := strings.Split(strings.TrimSpace(note), "\n") if len(lines) < 1 { return "" } return strings.TrimSpace(lines[0]) }
go
func (c *cmdWalletHistory) filterNote(note string) string { lines := strings.Split(strings.TrimSpace(note), "\n") if len(lines) < 1 { return "" } return strings.TrimSpace(lines[0]) }
[ "func", "(", "c", "*", "cmdWalletHistory", ")", "filterNote", "(", "note", "string", ")", "string", "{", "lines", ":=", "strings", ".", "Split", "(", "strings", ".", "TrimSpace", "(", "note", ")", ",", "\"", "\\n", "\"", ")", "\n", "if", "len", "(", ...
// Pare down the note so that it's less likely to contain tricks. // Such as newlines and fake transactions. // Shows only the first line.
[ "Pare", "down", "the", "note", "so", "that", "it", "s", "less", "likely", "to", "contain", "tricks", ".", "Such", "as", "newlines", "and", "fake", "transactions", ".", "Shows", "only", "the", "first", "line", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/client/cmd_wallet_history.go#L97-L103
161,462
keybase/client
go/client/cmd_status.go
execToString
func (c *CmdStatus) execToString(bin string, args []string) (string, error) { result, err := exec.Command(bin, args...).Output() if err != nil { return "", err } if result == nil { return "", fmt.Errorf("Nil result") } return strings.TrimSpace(string(result)), nil }
go
func (c *CmdStatus) execToString(bin string, args []string) (string, error) { result, err := exec.Command(bin, args...).Output() if err != nil { return "", err } if result == nil { return "", fmt.Errorf("Nil result") } return strings.TrimSpace(string(result)), nil }
[ "func", "(", "c", "*", "CmdStatus", ")", "execToString", "(", "bin", "string", ",", "args", "[", "]", "string", ")", "(", "string", ",", "error", ")", "{", "result", ",", "err", ":=", "exec", ".", "Command", "(", "bin", ",", "args", "...", ")", "...
// execToString returns the space-trimmed output of a command or an error.
[ "execToString", "returns", "the", "space", "-", "trimmed", "output", "of", "a", "command", "or", "an", "error", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/client/cmd_status.go#L404-L413
161,463
keybase/client
go/kbfs/libfuse/mounter.go
Mount
func (m *mounter) Mount() (err error) { defer func() { if err != nil { msg := fmt.Sprintf("KBFS failed to FUSE mount at %s: %s", m.options.MountPoint, err) fmt.Println(msg) m.log.Warning(msg) } }() m.c, err = fuseMountDir(m.options.MountPoint, m.options.PlatformParams) // Exit if we were successful or...
go
func (m *mounter) Mount() (err error) { defer func() { if err != nil { msg := fmt.Sprintf("KBFS failed to FUSE mount at %s: %s", m.options.MountPoint, err) fmt.Println(msg) m.log.Warning(msg) } }() m.c, err = fuseMountDir(m.options.MountPoint, m.options.PlatformParams) // Exit if we were successful or...
[ "func", "(", "m", "*", "mounter", ")", "Mount", "(", ")", "(", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "if", "err", "!=", "nil", "{", "msg", ":=", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "m", ".", "options", ".", "Mount...
// fuseMount tries to mount the mountpoint. // On a force mount then unmount, re-mount if unsuccessful
[ "fuseMount", "tries", "to", "mount", "the", "mountpoint", ".", "On", "a", "force", "mount", "then", "unmount", "re", "-", "mount", "if", "unsuccessful" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libfuse/mounter.go#L35-L63
161,464
keybase/client
go/kbfs/libkbfs/block_getter.go
getBlock
func (bg *realBlockGetter) getBlock( ctx context.Context, kmd libkey.KeyMetadata, blockPtr data.BlockPointer, block data.Block, cacheType DiskBlockCacheType) error { bserv := bg.config.BlockServer() buf, blockServerHalf, err := bserv.Get( ctx, kmd.TlfID(), blockPtr.ID, blockPtr.Context, cacheType) if err != nil ...
go
func (bg *realBlockGetter) getBlock( ctx context.Context, kmd libkey.KeyMetadata, blockPtr data.BlockPointer, block data.Block, cacheType DiskBlockCacheType) error { bserv := bg.config.BlockServer() buf, blockServerHalf, err := bserv.Get( ctx, kmd.TlfID(), blockPtr.ID, blockPtr.Context, cacheType) if err != nil ...
[ "func", "(", "bg", "*", "realBlockGetter", ")", "getBlock", "(", "ctx", "context", ".", "Context", ",", "kmd", "libkey", ".", "KeyMetadata", ",", "blockPtr", "data", ".", "BlockPointer", ",", "block", "data", ".", "Block", ",", "cacheType", "DiskBlockCacheTy...
// getBlock implements the interface for realBlockGetter.
[ "getBlock", "implements", "the", "interface", "for", "realBlockGetter", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/block_getter.go#L32-L52
161,465
keybase/client
go/kbfs/libkbfs/node_cache.go
forgetLocked
func (ncs *nodeCacheStandard) forgetLocked(core *nodeCore) { ref := core.pathNode.Ref() entry, ok := ncs.nodes[ref] if !ok { return } if entry.core != core { return } entry.refCount-- if entry.refCount <= 0 { delete(ncs.nodes, ref) } }
go
func (ncs *nodeCacheStandard) forgetLocked(core *nodeCore) { ref := core.pathNode.Ref() entry, ok := ncs.nodes[ref] if !ok { return } if entry.core != core { return } entry.refCount-- if entry.refCount <= 0 { delete(ncs.nodes, ref) } }
[ "func", "(", "ncs", "*", "nodeCacheStandard", ")", "forgetLocked", "(", "core", "*", "nodeCore", ")", "{", "ref", ":=", "core", ".", "pathNode", ".", "Ref", "(", ")", "\n\n", "entry", ",", "ok", ":=", "ncs", ".", "nodes", "[", "ref", "]", "\n", "if...
// lock must be locked for writing by the caller
[ "lock", "must", "be", "locked", "for", "writing", "by", "the", "caller" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/node_cache.go#L40-L55
161,466
keybase/client
go/kbfs/libkbfs/node_cache.go
newChildForParentLocked
func (ncs *nodeCacheStandard) newChildForParentLocked(parent Node) (*nodeStandard, error) { nodeStandard, ok := parent.Unwrap().(*nodeStandard) if !ok { return nil, ParentNodeNotFoundError{data.BlockRef{}} } ref := nodeStandard.core.pathNode.Ref() entry, ok := ncs.nodes[ref] if !ok { return nil, ParentNodeNo...
go
func (ncs *nodeCacheStandard) newChildForParentLocked(parent Node) (*nodeStandard, error) { nodeStandard, ok := parent.Unwrap().(*nodeStandard) if !ok { return nil, ParentNodeNotFoundError{data.BlockRef{}} } ref := nodeStandard.core.pathNode.Ref() entry, ok := ncs.nodes[ref] if !ok { return nil, ParentNodeNo...
[ "func", "(", "ncs", "*", "nodeCacheStandard", ")", "newChildForParentLocked", "(", "parent", "Node", ")", "(", "*", "nodeStandard", ",", "error", ")", "{", "nodeStandard", ",", "ok", ":=", "parent", ".", "Unwrap", "(", ")", ".", "(", "*", "nodeStandard", ...
// lock must be held for writing by the caller
[ "lock", "must", "be", "held", "for", "writing", "by", "the", "caller" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/node_cache.go#L65-L80
161,467
keybase/client
go/kbfs/libkbfs/node_cache.go
GetOrCreate
func (ncs *nodeCacheStandard) GetOrCreate( ptr data.BlockPointer, name string, parent Node, et data.EntryType) ( n Node, err error) { var rootWrappers []func(Node) Node defer func() { if n != nil { n = ncs.wrapNodeStandard(n, rootWrappers, parent) } }() if !ptr.IsValid() { // Temporary code to track dow...
go
func (ncs *nodeCacheStandard) GetOrCreate( ptr data.BlockPointer, name string, parent Node, et data.EntryType) ( n Node, err error) { var rootWrappers []func(Node) Node defer func() { if n != nil { n = ncs.wrapNodeStandard(n, rootWrappers, parent) } }() if !ptr.IsValid() { // Temporary code to track dow...
[ "func", "(", "ncs", "*", "nodeCacheStandard", ")", "GetOrCreate", "(", "ptr", "data", ".", "BlockPointer", ",", "name", "string", ",", "parent", "Node", ",", "et", "data", ".", "EntryType", ")", "(", "n", "Node", ",", "err", "error", ")", "{", "var", ...
// GetOrCreate implements the NodeCache interface for nodeCacheStandard.
[ "GetOrCreate", "implements", "the", "NodeCache", "interface", "for", "nodeCacheStandard", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/node_cache.go#L99-L149
161,468
keybase/client
go/kbfs/libkbfs/node_cache.go
Get
func (ncs *nodeCacheStandard) Get(ref data.BlockRef) (n Node) { if ref == (data.BlockRef{}) { return nil } // Temporary code to track down bad block pointers. Remove (or // return an error) when not needed anymore. if !ref.IsValid() { panic(InvalidBlockRefError{ref}) } var rootWrappers []func(Node) Node v...
go
func (ncs *nodeCacheStandard) Get(ref data.BlockRef) (n Node) { if ref == (data.BlockRef{}) { return nil } // Temporary code to track down bad block pointers. Remove (or // return an error) when not needed anymore. if !ref.IsValid() { panic(InvalidBlockRefError{ref}) } var rootWrappers []func(Node) Node v...
[ "func", "(", "ncs", "*", "nodeCacheStandard", ")", "Get", "(", "ref", "data", ".", "BlockRef", ")", "(", "n", "Node", ")", "{", "if", "ref", "==", "(", "data", ".", "BlockRef", "{", "}", ")", "{", "return", "nil", "\n", "}", "\n\n", "// Temporary c...
// Get implements the NodeCache interface for nodeCacheStandard.
[ "Get", "implements", "the", "NodeCache", "interface", "for", "nodeCacheStandard", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/node_cache.go#L152-L181
161,469
keybase/client
go/kbfs/libkbfs/node_cache.go
UpdatePointer
func (ncs *nodeCacheStandard) UpdatePointer( oldRef data.BlockRef, newPtr data.BlockPointer) (updatedNode NodeID) { if oldRef == (data.BlockRef{}) && newPtr == (data.BlockPointer{}) { return nil } if !oldRef.IsValid() { panic(fmt.Sprintf("invalid oldRef %s with newPtr %s", oldRef, newPtr)) } if !newPtr.IsVa...
go
func (ncs *nodeCacheStandard) UpdatePointer( oldRef data.BlockRef, newPtr data.BlockPointer) (updatedNode NodeID) { if oldRef == (data.BlockRef{}) && newPtr == (data.BlockPointer{}) { return nil } if !oldRef.IsValid() { panic(fmt.Sprintf("invalid oldRef %s with newPtr %s", oldRef, newPtr)) } if !newPtr.IsVa...
[ "func", "(", "ncs", "*", "nodeCacheStandard", ")", "UpdatePointer", "(", "oldRef", "data", ".", "BlockRef", ",", "newPtr", "data", ".", "BlockPointer", ")", "(", "updatedNode", "NodeID", ")", "{", "if", "oldRef", "==", "(", "data", ".", "BlockRef", "{", ...
// UpdatePointer implements the NodeCache interface for nodeCacheStandard.
[ "UpdatePointer", "implements", "the", "NodeCache", "interface", "for", "nodeCacheStandard", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/node_cache.go#L184-L214
161,470
keybase/client
go/kbfs/libkbfs/node_cache.go
Move
func (ncs *nodeCacheStandard) Move( ref data.BlockRef, newParent Node, newName string) (undoFn func(), err error) { if ref == (data.BlockRef{}) { return nil, nil } // Temporary code to track down bad block pointers. Remove (or // return an error) when not needed anymore. if !ref.IsValid() { panic(InvalidBloc...
go
func (ncs *nodeCacheStandard) Move( ref data.BlockRef, newParent Node, newName string) (undoFn func(), err error) { if ref == (data.BlockRef{}) { return nil, nil } // Temporary code to track down bad block pointers. Remove (or // return an error) when not needed anymore. if !ref.IsValid() { panic(InvalidBloc...
[ "func", "(", "ncs", "*", "nodeCacheStandard", ")", "Move", "(", "ref", "data", ".", "BlockRef", ",", "newParent", "Node", ",", "newName", "string", ")", "(", "undoFn", "func", "(", ")", ",", "err", "error", ")", "{", "if", "ref", "==", "(", "data", ...
// Move implements the NodeCache interface for nodeCacheStandard.
[ "Move", "implements", "the", "NodeCache", "interface", "for", "nodeCacheStandard", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/node_cache.go#L217-L255
161,471
keybase/client
go/kbfs/libkbfs/node_cache.go
Unlink
func (ncs *nodeCacheStandard) Unlink( ref data.BlockRef, oldPath data.Path, oldDe data.DirEntry) (undoFn func()) { if ref == (data.BlockRef{}) { return nil } // Temporary code to track down bad block pointers. Remove (or // return an error) when not needed anymore. if !ref.IsValid() { panic(InvalidBlockRefEr...
go
func (ncs *nodeCacheStandard) Unlink( ref data.BlockRef, oldPath data.Path, oldDe data.DirEntry) (undoFn func()) { if ref == (data.BlockRef{}) { return nil } // Temporary code to track down bad block pointers. Remove (or // return an error) when not needed anymore. if !ref.IsValid() { panic(InvalidBlockRefEr...
[ "func", "(", "ncs", "*", "nodeCacheStandard", ")", "Unlink", "(", "ref", "data", ".", "BlockRef", ",", "oldPath", "data", ".", "Path", ",", "oldDe", "data", ".", "DirEntry", ")", "(", "undoFn", "func", "(", ")", ")", "{", "if", "ref", "==", "(", "d...
// Unlink implements the NodeCache interface for nodeCacheStandard.
[ "Unlink", "implements", "the", "NodeCache", "interface", "for", "nodeCacheStandard", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/node_cache.go#L258-L296
161,472
keybase/client
go/kbfs/libkbfs/node_cache.go
IsUnlinked
func (ncs *nodeCacheStandard) IsUnlinked(node Node) bool { ncs.lock.RLock() defer ncs.lock.RUnlock() ns, ok := node.Unwrap().(*nodeStandard) if !ok { return false } return ns.core.cachedPath.IsValid() }
go
func (ncs *nodeCacheStandard) IsUnlinked(node Node) bool { ncs.lock.RLock() defer ncs.lock.RUnlock() ns, ok := node.Unwrap().(*nodeStandard) if !ok { return false } return ns.core.cachedPath.IsValid() }
[ "func", "(", "ncs", "*", "nodeCacheStandard", ")", "IsUnlinked", "(", "node", "Node", ")", "bool", "{", "ncs", ".", "lock", ".", "RLock", "(", ")", "\n", "defer", "ncs", ".", "lock", ".", "RUnlock", "(", ")", "\n\n", "ns", ",", "ok", ":=", "node", ...
// IsUnlinked implements the NodeCache interface for // nodeCacheStandard.
[ "IsUnlinked", "implements", "the", "NodeCache", "interface", "for", "nodeCacheStandard", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/node_cache.go#L300-L310
161,473
keybase/client
go/kbfs/libkbfs/node_cache.go
UnlinkedDirEntry
func (ncs *nodeCacheStandard) UnlinkedDirEntry(node Node) data.DirEntry { ncs.lock.RLock() defer ncs.lock.RUnlock() ns, ok := node.Unwrap().(*nodeStandard) if !ok { return data.DirEntry{} } return ns.core.cachedDe }
go
func (ncs *nodeCacheStandard) UnlinkedDirEntry(node Node) data.DirEntry { ncs.lock.RLock() defer ncs.lock.RUnlock() ns, ok := node.Unwrap().(*nodeStandard) if !ok { return data.DirEntry{} } return ns.core.cachedDe }
[ "func", "(", "ncs", "*", "nodeCacheStandard", ")", "UnlinkedDirEntry", "(", "node", "Node", ")", "data", ".", "DirEntry", "{", "ncs", ".", "lock", ".", "RLock", "(", ")", "\n", "defer", "ncs", ".", "lock", ".", "RUnlock", "(", ")", "\n\n", "ns", ",",...
// UnlinkedDirEntry implements the NodeCache interface for // nodeCacheStandard.
[ "UnlinkedDirEntry", "implements", "the", "NodeCache", "interface", "for", "nodeCacheStandard", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/node_cache.go#L314-L324
161,474
keybase/client
go/kbfs/libkbfs/node_cache.go
UpdateUnlinkedDirEntry
func (ncs *nodeCacheStandard) UpdateUnlinkedDirEntry( node Node, newDe data.DirEntry) { ncs.lock.Lock() defer ncs.lock.Unlock() ns, ok := node.Unwrap().(*nodeStandard) if !ok { return } ns.core.cachedDe = newDe }
go
func (ncs *nodeCacheStandard) UpdateUnlinkedDirEntry( node Node, newDe data.DirEntry) { ncs.lock.Lock() defer ncs.lock.Unlock() ns, ok := node.Unwrap().(*nodeStandard) if !ok { return } ns.core.cachedDe = newDe }
[ "func", "(", "ncs", "*", "nodeCacheStandard", ")", "UpdateUnlinkedDirEntry", "(", "node", "Node", ",", "newDe", "data", ".", "DirEntry", ")", "{", "ncs", ".", "lock", ".", "Lock", "(", ")", "\n", "defer", "ncs", ".", "lock", ".", "Unlock", "(", ")", ...
// UpdateUnlinkedDirEntry implements the NodeCache interface for // nodeCacheStandard.
[ "UpdateUnlinkedDirEntry", "implements", "the", "NodeCache", "interface", "for", "nodeCacheStandard", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/node_cache.go#L328-L339
161,475
keybase/client
go/kbfs/libkbfs/node_cache.go
PathFromNode
func (ncs *nodeCacheStandard) PathFromNode(node Node) (p data.Path) { ncs.lock.RLock() defer ncs.lock.RUnlock() ns, ok := node.Unwrap().(*nodeStandard) if !ok { p.Path = nil return } for ns != nil { core := ns.core if core.parent == nil && len(core.cachedPath.Path) > 0 { // The node was unlinked, but...
go
func (ncs *nodeCacheStandard) PathFromNode(node Node) (p data.Path) { ncs.lock.RLock() defer ncs.lock.RUnlock() ns, ok := node.Unwrap().(*nodeStandard) if !ok { p.Path = nil return } for ns != nil { core := ns.core if core.parent == nil && len(core.cachedPath.Path) > 0 { // The node was unlinked, but...
[ "func", "(", "ncs", "*", "nodeCacheStandard", ")", "PathFromNode", "(", "node", "Node", ")", "(", "p", "data", ".", "Path", ")", "{", "ncs", ".", "lock", ".", "RLock", "(", ")", "\n", "defer", "ncs", ".", "lock", ".", "RUnlock", "(", ")", "\n\n", ...
// PathFromNode implements the NodeCache interface for nodeCacheStandard.
[ "PathFromNode", "implements", "the", "NodeCache", "interface", "for", "nodeCacheStandard", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/node_cache.go#L342-L386
161,476
keybase/client
go/kbfs/libkbfs/node_cache.go
AllNodes
func (ncs *nodeCacheStandard) AllNodes() (nodes []Node) { ncs.lock.RLock() defer ncs.lock.RUnlock() nodes = make([]Node, 0, len(ncs.nodes)) for _, entry := range ncs.nodes { nodes = append(nodes, ncs.makeNodeStandardForEntryLocked(entry)) } return nodes }
go
func (ncs *nodeCacheStandard) AllNodes() (nodes []Node) { ncs.lock.RLock() defer ncs.lock.RUnlock() nodes = make([]Node, 0, len(ncs.nodes)) for _, entry := range ncs.nodes { nodes = append(nodes, ncs.makeNodeStandardForEntryLocked(entry)) } return nodes }
[ "func", "(", "ncs", "*", "nodeCacheStandard", ")", "AllNodes", "(", ")", "(", "nodes", "[", "]", "Node", ")", "{", "ncs", ".", "lock", ".", "RLock", "(", ")", "\n", "defer", "ncs", ".", "lock", ".", "RUnlock", "(", ")", "\n", "nodes", "=", "make"...
// AllNodes implements the NodeCache interface for nodeCacheStandard.
[ "AllNodes", "implements", "the", "NodeCache", "interface", "for", "nodeCacheStandard", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/node_cache.go#L389-L397
161,477
keybase/client
go/kbfs/libkbfs/node_cache.go
AllNodeChildren
func (ncs *nodeCacheStandard) AllNodeChildren(n Node) (nodes []Node) { ncs.lock.RLock() defer ncs.lock.RUnlock() nodes = make([]Node, 0, len(ncs.nodes)) entryIDs := make(map[NodeID]bool) for _, entry := range ncs.nodes { var pathIDs []NodeID parent := entry.core.parent for parent != nil { // If the node's...
go
func (ncs *nodeCacheStandard) AllNodeChildren(n Node) (nodes []Node) { ncs.lock.RLock() defer ncs.lock.RUnlock() nodes = make([]Node, 0, len(ncs.nodes)) entryIDs := make(map[NodeID]bool) for _, entry := range ncs.nodes { var pathIDs []NodeID parent := entry.core.parent for parent != nil { // If the node's...
[ "func", "(", "ncs", "*", "nodeCacheStandard", ")", "AllNodeChildren", "(", "n", "Node", ")", "(", "nodes", "[", "]", "Node", ")", "{", "ncs", ".", "lock", ".", "RLock", "(", ")", "\n", "defer", "ncs", ".", "lock", ".", "RUnlock", "(", ")", "\n", ...
// AllNodeChildren implements the NodeCache interface for nodeCacheStandard.
[ "AllNodeChildren", "implements", "the", "NodeCache", "interface", "for", "nodeCacheStandard", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/node_cache.go#L400-L433
161,478
keybase/client
go/kbfs/libfs/mode.go
IsWriter
func IsWriter(ctx context.Context, kbpki libkbfs.KBPKI, osg idutil.OfflineStatusGetter, h *tlfhandle.Handle) (bool, error) { session, err := idutil.GetCurrentSessionIfPossible( ctx, kbpki, h.Type() == tlf.Public) // We are using GetCurrentUserInfoIfPossible here so err is only non-nil if // a real problem happene...
go
func IsWriter(ctx context.Context, kbpki libkbfs.KBPKI, osg idutil.OfflineStatusGetter, h *tlfhandle.Handle) (bool, error) { session, err := idutil.GetCurrentSessionIfPossible( ctx, kbpki, h.Type() == tlf.Public) // We are using GetCurrentUserInfoIfPossible here so err is only non-nil if // a real problem happene...
[ "func", "IsWriter", "(", "ctx", "context", ".", "Context", ",", "kbpki", "libkbfs", ".", "KBPKI", ",", "osg", "idutil", ".", "OfflineStatusGetter", ",", "h", "*", "tlfhandle", ".", "Handle", ")", "(", "bool", ",", "error", ")", "{", "session", ",", "er...
// IsWriter returns whether or not the currently logged-in user is a // valid writer for the folder described by `h`.
[ "IsWriter", "returns", "whether", "or", "not", "the", "currently", "logged", "-", "in", "user", "is", "a", "valid", "writer", "for", "the", "folder", "described", "by", "h", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libfs/mode.go#L20-L47
161,479
keybase/client
go/kbfs/libfs/mode.go
WritePermMode
func WritePermMode( ctx context.Context, node libkbfs.Node, original os.FileMode, kbpki libkbfs.KBPKI, osg idutil.OfflineStatusGetter, h *tlfhandle.Handle) (os.FileMode, error) { original &^= os.FileMode(0222) // clear write perm bits if node != nil && node.Readonly(ctx) { return original, nil } isWriter, er...
go
func WritePermMode( ctx context.Context, node libkbfs.Node, original os.FileMode, kbpki libkbfs.KBPKI, osg idutil.OfflineStatusGetter, h *tlfhandle.Handle) (os.FileMode, error) { original &^= os.FileMode(0222) // clear write perm bits if node != nil && node.Readonly(ctx) { return original, nil } isWriter, er...
[ "func", "WritePermMode", "(", "ctx", "context", ".", "Context", ",", "node", "libkbfs", ".", "Node", ",", "original", "os", ".", "FileMode", ",", "kbpki", "libkbfs", ".", "KBPKI", ",", "osg", "idutil", ".", "OfflineStatusGetter", ",", "h", "*", "tlfhandle"...
// WritePermMode fills in original based on whether or not the // currently logged-in user is a valid writer for the folder described // by `h`.
[ "WritePermMode", "fills", "in", "original", "based", "on", "whether", "or", "not", "the", "currently", "logged", "-", "in", "user", "is", "a", "valid", "writer", "for", "the", "folder", "described", "by", "h", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libfs/mode.go#L52-L71
161,480
keybase/client
go/kbfs/libkbfs/journal_md_ops.go
convertImmutableBareRMDToIRMD
func (j journalMDOps) convertImmutableBareRMDToIRMD(ctx context.Context, ibrmd ImmutableBareRootMetadata, handle *tlfhandle.Handle, uid keybase1.UID, key kbfscrypto.VerifyingKey) ( ImmutableRootMetadata, error) { // TODO: Avoid having to do this type assertion. brmd, ok := ibrmd.RootMetadata.(kbfsmd.MutableRootMet...
go
func (j journalMDOps) convertImmutableBareRMDToIRMD(ctx context.Context, ibrmd ImmutableBareRootMetadata, handle *tlfhandle.Handle, uid keybase1.UID, key kbfscrypto.VerifyingKey) ( ImmutableRootMetadata, error) { // TODO: Avoid having to do this type assertion. brmd, ok := ibrmd.RootMetadata.(kbfsmd.MutableRootMet...
[ "func", "(", "j", "journalMDOps", ")", "convertImmutableBareRMDToIRMD", "(", "ctx", "context", ".", "Context", ",", "ibrmd", "ImmutableBareRootMetadata", ",", "handle", "*", "tlfhandle", ".", "Handle", ",", "uid", "keybase1", ".", "UID", ",", "key", "kbfscrypto"...
// convertImmutableBareRMDToIRMD decrypts the bare MD into a // full-fledged RMD. The MD is assumed to have been read from the // journal.
[ "convertImmutableBareRMDToIRMD", "decrypts", "the", "bare", "MD", "into", "a", "full", "-", "fledged", "RMD", ".", "The", "MD", "is", "assumed", "to", "have", "been", "read", "from", "the", "journal", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/journal_md_ops.go#L47-L72
161,481
keybase/client
go/kbfs/libkbfs/journal_md_ops.go
GetIDForHandle
func (j journalMDOps) GetIDForHandle( ctx context.Context, handle *tlfhandle.Handle) (id tlf.ID, err error) { id, err = j.MDOps.GetIDForHandle(ctx, handle) if err != nil { return tlf.NullID, err } if id == tlf.NullID { return id, nil } // Create the journal if needed, while we have access to `handle`. _, _ ...
go
func (j journalMDOps) GetIDForHandle( ctx context.Context, handle *tlfhandle.Handle) (id tlf.ID, err error) { id, err = j.MDOps.GetIDForHandle(ctx, handle) if err != nil { return tlf.NullID, err } if id == tlf.NullID { return id, nil } // Create the journal if needed, while we have access to `handle`. _, _ ...
[ "func", "(", "j", "journalMDOps", ")", "GetIDForHandle", "(", "ctx", "context", ".", "Context", ",", "handle", "*", "tlfhandle", ".", "Handle", ")", "(", "id", "tlf", ".", "ID", ",", "err", "error", ")", "{", "id", ",", "err", "=", "j", ".", "MDOps...
// GetIDForHandle implements the MDOps interface for journalMDOps.
[ "GetIDForHandle", "implements", "the", "MDOps", "interface", "for", "journalMDOps", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/journal_md_ops.go#L234-L246
161,482
keybase/client
go/libkb/user.go
GetActivePGPKeys
func (u *User) GetActivePGPKeys(sibkey bool) (ret []*PGPKeyBundle) { if ckf := u.GetComputedKeyFamily(); ckf != nil { ret = ckf.GetActivePGPKeys(sibkey) } return }
go
func (u *User) GetActivePGPKeys(sibkey bool) (ret []*PGPKeyBundle) { if ckf := u.GetComputedKeyFamily(); ckf != nil { ret = ckf.GetActivePGPKeys(sibkey) } return }
[ "func", "(", "u", "*", "User", ")", "GetActivePGPKeys", "(", "sibkey", "bool", ")", "(", "ret", "[", "]", "*", "PGPKeyBundle", ")", "{", "if", "ckf", ":=", "u", ".", "GetComputedKeyFamily", "(", ")", ";", "ckf", "!=", "nil", "{", "ret", "=", "ckf",...
// GetActivePGPKeys looks into the user's ComputedKeyFamily and // returns only the active PGP keys. If you want only sibkeys, then // specify sibkey=true.
[ "GetActivePGPKeys", "looks", "into", "the", "user", "s", "ComputedKeyFamily", "and", "returns", "only", "the", "active", "PGP", "keys", ".", "If", "you", "want", "only", "sibkeys", "then", "specify", "sibkey", "=", "true", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/user.go#L222-L227
161,483
keybase/client
go/libkb/user.go
FilterActivePGPKeys
func (u *User) FilterActivePGPKeys(sibkey bool, query string) []*PGPKeyBundle { keys := u.GetActivePGPKeys(sibkey) var res []*PGPKeyBundle for _, k := range keys { if KeyMatchesQuery(k, query, false) { res = append(res, k) } } return res }
go
func (u *User) FilterActivePGPKeys(sibkey bool, query string) []*PGPKeyBundle { keys := u.GetActivePGPKeys(sibkey) var res []*PGPKeyBundle for _, k := range keys { if KeyMatchesQuery(k, query, false) { res = append(res, k) } } return res }
[ "func", "(", "u", "*", "User", ")", "FilterActivePGPKeys", "(", "sibkey", "bool", ",", "query", "string", ")", "[", "]", "*", "PGPKeyBundle", "{", "keys", ":=", "u", ".", "GetActivePGPKeys", "(", "sibkey", ")", "\n", "var", "res", "[", "]", "*", "PGP...
// FilterActivePGPKeys returns the active pgp keys that match // query.
[ "FilterActivePGPKeys", "returns", "the", "active", "pgp", "keys", "that", "match", "query", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/user.go#L231-L240
161,484
keybase/client
go/libkb/user.go
AllSyncedSecretKeys
func (u *User) AllSyncedSecretKeys(m MetaContext) (keys []*SKB, err error) { defer m.Trace("User#AllSyncedSecretKeys", func() error { return err })() m.Dump() ss, err := m.SyncSecretsForUID(u.GetUID()) if err != nil { return nil, err } ckf := u.GetComputedKeyFamily() if ckf == nil { m.Debug("| short-circui...
go
func (u *User) AllSyncedSecretKeys(m MetaContext) (keys []*SKB, err error) { defer m.Trace("User#AllSyncedSecretKeys", func() error { return err })() m.Dump() ss, err := m.SyncSecretsForUID(u.GetUID()) if err != nil { return nil, err } ckf := u.GetComputedKeyFamily() if ckf == nil { m.Debug("| short-circui...
[ "func", "(", "u", "*", "User", ")", "AllSyncedSecretKeys", "(", "m", "MetaContext", ")", "(", "keys", "[", "]", "*", "SKB", ",", "err", "error", ")", "{", "defer", "m", ".", "Trace", "(", "\"", "\"", ",", "func", "(", ")", "error", "{", "return",...
// AllSyncedSecretKeys returns all the PGP key blocks that were // synced to API server. LoginContext can be nil if this isn't // used while logging in, signing up.
[ "AllSyncedSecretKeys", "returns", "all", "the", "PGP", "key", "blocks", "that", "were", "synced", "to", "API", "server", ".", "LoginContext", "can", "be", "nil", "if", "this", "isn", "t", "used", "while", "logging", "in", "signing", "up", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/user.go#L428-L445
161,485
keybase/client
go/libkb/user.go
GetHighLinkSeqnos
func (u *User) GetHighLinkSeqnos(mctx MetaContext) (res []keybase1.Seqno, err error) { sigChain := u.sigChain() if sigChain == nil { return nil, fmt.Errorf("no user sigchain") } for _, c := range sigChain.chainLinks { high, err := c.IsHighUserLink(mctx, u.GetUID()) if err != nil { return nil, fmt.Errorf("e...
go
func (u *User) GetHighLinkSeqnos(mctx MetaContext) (res []keybase1.Seqno, err error) { sigChain := u.sigChain() if sigChain == nil { return nil, fmt.Errorf("no user sigchain") } for _, c := range sigChain.chainLinks { high, err := c.IsHighUserLink(mctx, u.GetUID()) if err != nil { return nil, fmt.Errorf("e...
[ "func", "(", "u", "*", "User", ")", "GetHighLinkSeqnos", "(", "mctx", "MetaContext", ")", "(", "res", "[", "]", "keybase1", ".", "Seqno", ",", "err", "error", ")", "{", "sigChain", ":=", "u", ".", "sigChain", "(", ")", "\n", "if", "sigChain", "==", ...
// GetHighLinkSeqnos gets the list of all high links in the user's sigchain ascending.
[ "GetHighLinkSeqnos", "gets", "the", "list", "of", "all", "high", "links", "in", "the", "user", "s", "sigchain", "ascending", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/user.go#L495-L510
161,486
keybase/client
go/libkb/user.go
localDelegateKey
func (u *User) localDelegateKey(key GenericKey, sigID keybase1.SigID, kid keybase1.KID, isSibkey bool, isEldest bool, merkleHashMeta keybase1.HashMeta, firstAppearedUnverified keybase1.Seqno) (err error) { if err = u.keyFamily.LocalDelegate(key); err != nil { return } if u.sigChain() == nil { err = NoSigChainErr...
go
func (u *User) localDelegateKey(key GenericKey, sigID keybase1.SigID, kid keybase1.KID, isSibkey bool, isEldest bool, merkleHashMeta keybase1.HashMeta, firstAppearedUnverified keybase1.Seqno) (err error) { if err = u.keyFamily.LocalDelegate(key); err != nil { return } if u.sigChain() == nil { err = NoSigChainErr...
[ "func", "(", "u", "*", "User", ")", "localDelegateKey", "(", "key", "GenericKey", ",", "sigID", "keybase1", ".", "SigID", ",", "kid", "keybase1", ".", "KID", ",", "isSibkey", "bool", ",", "isEldest", "bool", ",", "merkleHashMeta", "keybase1", ".", "HashMet...
// localDelegateKey takes the given GenericKey and provisions it locally so that // we can use the key without needing a refresh from the server. The eventual // refresh we do get from the server will clobber our work here.
[ "localDelegateKey", "takes", "the", "given", "GenericKey", "and", "provisions", "it", "locally", "so", "that", "we", "can", "use", "the", "key", "without", "needing", "a", "refresh", "from", "the", "server", ".", "The", "eventual", "refresh", "we", "do", "ge...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/user.go#L645-L659
161,487
keybase/client
go/libkb/user.go
SigChainBump
func (u *User) SigChainBump(linkID LinkID, sigID keybase1.SigID, isHighDelegator bool) { u.SigChainBumpMT(MerkleTriple{LinkID: linkID, SigID: sigID}, isHighDelegator) }
go
func (u *User) SigChainBump(linkID LinkID, sigID keybase1.SigID, isHighDelegator bool) { u.SigChainBumpMT(MerkleTriple{LinkID: linkID, SigID: sigID}, isHighDelegator) }
[ "func", "(", "u", "*", "User", ")", "SigChainBump", "(", "linkID", "LinkID", ",", "sigID", "keybase1", ".", "SigID", ",", "isHighDelegator", "bool", ")", "{", "u", ".", "SigChainBumpMT", "(", "MerkleTriple", "{", "LinkID", ":", "linkID", ",", "SigID", ":...
// SigChainBump is called during a multikey post to update the correct seqno, hash, and // high skip. When a delegator posts a high link, they specify isHighDelegator=true // in order to set the new high skip pointer to the delegator's link, so subsequent // keys in the multikey will supply the correct high skip.
[ "SigChainBump", "is", "called", "during", "a", "multikey", "post", "to", "update", "the", "correct", "seqno", "hash", "and", "high", "skip", ".", "When", "a", "delegator", "posts", "a", "high", "link", "they", "specify", "isHighDelegator", "=", "true", "in",...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/user.go#L680-L682
161,488
keybase/client
go/libkb/user.go
HasDeviceInCurrentInstall
func (u *User) HasDeviceInCurrentInstall(did keybase1.DeviceID) bool { ckf := u.GetComputedKeyFamily() if ckf == nil { return false } _, err := ckf.GetSibkeyForDevice(did) if err != nil { return false } return true }
go
func (u *User) HasDeviceInCurrentInstall(did keybase1.DeviceID) bool { ckf := u.GetComputedKeyFamily() if ckf == nil { return false } _, err := ckf.GetSibkeyForDevice(did) if err != nil { return false } return true }
[ "func", "(", "u", "*", "User", ")", "HasDeviceInCurrentInstall", "(", "did", "keybase1", ".", "DeviceID", ")", "bool", "{", "ckf", ":=", "u", ".", "GetComputedKeyFamily", "(", ")", "\n", "if", "ckf", "==", "nil", "{", "return", "false", "\n", "}", "\n\...
// Returns whether or not the current install has an active device // sibkey.
[ "Returns", "whether", "or", "not", "the", "current", "install", "has", "an", "active", "device", "sibkey", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/user.go#L720-L731
161,489
keybase/client
go/libkb/user.go
PartialCopy
func (u User) PartialCopy() *User { ret := &User{ Contextified: NewContextified(u.G()), id: u.id, name: u.name, leaf: u.leaf, dirty: false, } if ckf := u.GetComputedKeyFamily(); ckf != nil { ret.ckfShallowCopy = ckf.ShallowCopy() ret.keyFamily = ckf.kf } else if u.keyF...
go
func (u User) PartialCopy() *User { ret := &User{ Contextified: NewContextified(u.G()), id: u.id, name: u.name, leaf: u.leaf, dirty: false, } if ckf := u.GetComputedKeyFamily(); ckf != nil { ret.ckfShallowCopy = ckf.ShallowCopy() ret.keyFamily = ckf.kf } else if u.keyF...
[ "func", "(", "u", "User", ")", "PartialCopy", "(", ")", "*", "User", "{", "ret", ":=", "&", "User", "{", "Contextified", ":", "NewContextified", "(", "u", ".", "G", "(", ")", ")", ",", "id", ":", "u", ".", "id", ",", "name", ":", "u", ".", "n...
// PartialCopy copies some fields of the User object, but not all. // For instance, it doesn't copy the SigChain or IDTable, and it only // makes a shallow copy of the ComputedKeyFamily.
[ "PartialCopy", "copies", "some", "fields", "of", "the", "User", "object", "but", "not", "all", ".", "For", "instance", "it", "doesn", "t", "copy", "the", "SigChain", "or", "IDTable", "and", "it", "only", "makes", "a", "shallow", "copy", "of", "the", "Com...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/user.go#L900-L915
161,490
keybase/client
go/protocol/keybase1/identify.go
ResolveImplicitTeam
func (c IdentifyClient) ResolveImplicitTeam(ctx context.Context, __arg ResolveImplicitTeamArg) (res Folder, err error) { err = c.Cli.Call(ctx, "keybase.1.identify.resolveImplicitTeam", []interface{}{__arg}, &res) return }
go
func (c IdentifyClient) ResolveImplicitTeam(ctx context.Context, __arg ResolveImplicitTeamArg) (res Folder, err error) { err = c.Cli.Call(ctx, "keybase.1.identify.resolveImplicitTeam", []interface{}{__arg}, &res) return }
[ "func", "(", "c", "IdentifyClient", ")", "ResolveImplicitTeam", "(", "ctx", "context", ".", "Context", ",", "__arg", "ResolveImplicitTeamArg", ")", "(", "res", "Folder", ",", "err", "error", ")", "{", "err", "=", "c", ".", "Cli", ".", "Call", "(", "ctx",...
// resolveImplicitTeam returns a TLF display name given a teamID. The publicness // of the team is inferred from the TeamID.
[ "resolveImplicitTeam", "returns", "a", "TLF", "display", "name", "given", "a", "teamID", ".", "The", "publicness", "of", "the", "team", "is", "inferred", "from", "the", "TeamID", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/keybase1/identify.go#L351-L354
161,491
keybase/client
go/client/cmd_log_profile.go
NewCmdLogProfile
func NewCmdLogProfile(cl *libcmdline.CommandLine, g *libkb.GlobalContext) cli.Command { return cli.Command{ Name: "profile", Usage: "Analyze timed traces from logs.", Action: func(c *cli.Context) { cl.ChooseCommand(&CmdLogProfile{Contextified: libkb.NewContextified(g)}, "profile", c) }, Flags: []cli.Flag...
go
func NewCmdLogProfile(cl *libcmdline.CommandLine, g *libkb.GlobalContext) cli.Command { return cli.Command{ Name: "profile", Usage: "Analyze timed traces from logs.", Action: func(c *cli.Context) { cl.ChooseCommand(&CmdLogProfile{Contextified: libkb.NewContextified(g)}, "profile", c) }, Flags: []cli.Flag...
[ "func", "NewCmdLogProfile", "(", "cl", "*", "libcmdline", ".", "CommandLine", ",", "g", "*", "libkb", ".", "GlobalContext", ")", "cli", ".", "Command", "{", "return", "cli", ".", "Command", "{", "Name", ":", "\"", "\"", ",", "Usage", ":", "\"", "\"", ...
// This is a devel-only cmd which can be used to see how long different // g.CTraceTimed calls are taking.
[ "This", "is", "a", "devel", "-", "only", "cmd", "which", "can", "be", "used", "to", "see", "how", "long", "different", "g", ".", "CTraceTimed", "calls", "are", "taking", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/client/cmd_log_profile.go#L15-L29
161,492
keybase/client
go/kbfs/libkbfs/keybase_service_measured.go
NewKeybaseServiceMeasured
func NewKeybaseServiceMeasured(delegate KeybaseService, r metrics.Registry) KeybaseServiceMeasured { resolveTimer := metrics.GetOrRegisterTimer("KeybaseService.Resolve", r) identifyTimer := metrics.GetOrRegisterTimer("KeybaseService.Identify", r) normalizeSocialAssertionTimer := metrics.GetOrRegisterTimer("KeybaseSe...
go
func NewKeybaseServiceMeasured(delegate KeybaseService, r metrics.Registry) KeybaseServiceMeasured { resolveTimer := metrics.GetOrRegisterTimer("KeybaseService.Resolve", r) identifyTimer := metrics.GetOrRegisterTimer("KeybaseService.Identify", r) normalizeSocialAssertionTimer := metrics.GetOrRegisterTimer("KeybaseSe...
[ "func", "NewKeybaseServiceMeasured", "(", "delegate", "KeybaseService", ",", "r", "metrics", ".", "Registry", ")", "KeybaseServiceMeasured", "{", "resolveTimer", ":=", "metrics", ".", "GetOrRegisterTimer", "(", "\"", "\"", ",", "r", ")", "\n", "identifyTimer", ":=...
// NewKeybaseServiceMeasured creates and returns a new KeybaseServiceMeasured // instance with the given delegate and registry.
[ "NewKeybaseServiceMeasured", "creates", "and", "returns", "a", "new", "KeybaseServiceMeasured", "instance", "with", "the", "given", "delegate", "and", "registry", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/keybase_service_measured.go#L50-L99
161,493
keybase/client
go/kbfs/libkbfs/keybase_service_measured.go
Resolve
func (k KeybaseServiceMeasured) Resolve( ctx context.Context, assertion string, offline keybase1.OfflineAvailability) ( name kbname.NormalizedUsername, uid keybase1.UserOrTeamID, err error) { k.resolveTimer.Time(func() { name, uid, err = k.delegate.Resolve(ctx, assertion, offline) }) return name, uid, err }
go
func (k KeybaseServiceMeasured) Resolve( ctx context.Context, assertion string, offline keybase1.OfflineAvailability) ( name kbname.NormalizedUsername, uid keybase1.UserOrTeamID, err error) { k.resolveTimer.Time(func() { name, uid, err = k.delegate.Resolve(ctx, assertion, offline) }) return name, uid, err }
[ "func", "(", "k", "KeybaseServiceMeasured", ")", "Resolve", "(", "ctx", "context", ".", "Context", ",", "assertion", "string", ",", "offline", "keybase1", ".", "OfflineAvailability", ")", "(", "name", "kbname", ".", "NormalizedUsername", ",", "uid", "keybase1", ...
// Resolve implements the KeybaseService interface for KeybaseServiceMeasured.
[ "Resolve", "implements", "the", "KeybaseService", "interface", "for", "KeybaseServiceMeasured", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/keybase_service_measured.go#L102-L110
161,494
keybase/client
go/kbfs/libkbfs/keybase_service_measured.go
Identify
func (k KeybaseServiceMeasured) Identify( ctx context.Context, assertion, reason string, offline keybase1.OfflineAvailability) ( name kbname.NormalizedUsername, id keybase1.UserOrTeamID, err error) { k.identifyTimer.Time(func() { name, id, err = k.delegate.Identify(ctx, assertion, reason, offline) }) return nam...
go
func (k KeybaseServiceMeasured) Identify( ctx context.Context, assertion, reason string, offline keybase1.OfflineAvailability) ( name kbname.NormalizedUsername, id keybase1.UserOrTeamID, err error) { k.identifyTimer.Time(func() { name, id, err = k.delegate.Identify(ctx, assertion, reason, offline) }) return nam...
[ "func", "(", "k", "KeybaseServiceMeasured", ")", "Identify", "(", "ctx", "context", ".", "Context", ",", "assertion", ",", "reason", "string", ",", "offline", "keybase1", ".", "OfflineAvailability", ")", "(", "name", "kbname", ".", "NormalizedUsername", ",", "...
// Identify implements the KeybaseService interface for KeybaseServiceMeasured.
[ "Identify", "implements", "the", "KeybaseService", "interface", "for", "KeybaseServiceMeasured", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/keybase_service_measured.go#L113-L121
161,495
keybase/client
go/kbfs/libkbfs/keybase_service_measured.go
NormalizeSocialAssertion
func (k KeybaseServiceMeasured) NormalizeSocialAssertion( ctx context.Context, assertion string) (res keybase1.SocialAssertion, err error) { k.normalizeSocialAssertionTimer.Time(func() { res, err = k.delegate.NormalizeSocialAssertion( ctx, assertion) }) return res, err }
go
func (k KeybaseServiceMeasured) NormalizeSocialAssertion( ctx context.Context, assertion string) (res keybase1.SocialAssertion, err error) { k.normalizeSocialAssertionTimer.Time(func() { res, err = k.delegate.NormalizeSocialAssertion( ctx, assertion) }) return res, err }
[ "func", "(", "k", "KeybaseServiceMeasured", ")", "NormalizeSocialAssertion", "(", "ctx", "context", ".", "Context", ",", "assertion", "string", ")", "(", "res", "keybase1", ".", "SocialAssertion", ",", "err", "error", ")", "{", "k", ".", "normalizeSocialAssertio...
// NormalizeSocialAssertion implements the KeybaseService interface for // KeybaseServiceMeasured.
[ "NormalizeSocialAssertion", "implements", "the", "KeybaseService", "interface", "for", "KeybaseServiceMeasured", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/keybase_service_measured.go#L125-L132
161,496
keybase/client
go/kbfs/libkbfs/keybase_service_measured.go
ResolveIdentifyImplicitTeam
func (k KeybaseServiceMeasured) ResolveIdentifyImplicitTeam( ctx context.Context, assertions, suffix string, tlfType tlf.Type, doIdentifies bool, reason string, offline keybase1.OfflineAvailability) ( info idutil.ImplicitTeamInfo, err error) { k.resolveIdentifyImplicitTeamTimer.Time(func() { info, err = k.delegat...
go
func (k KeybaseServiceMeasured) ResolveIdentifyImplicitTeam( ctx context.Context, assertions, suffix string, tlfType tlf.Type, doIdentifies bool, reason string, offline keybase1.OfflineAvailability) ( info idutil.ImplicitTeamInfo, err error) { k.resolveIdentifyImplicitTeamTimer.Time(func() { info, err = k.delegat...
[ "func", "(", "k", "KeybaseServiceMeasured", ")", "ResolveIdentifyImplicitTeam", "(", "ctx", "context", ".", "Context", ",", "assertions", ",", "suffix", "string", ",", "tlfType", "tlf", ".", "Type", ",", "doIdentifies", "bool", ",", "reason", "string", ",", "o...
// ResolveIdentifyImplicitTeam implements the KeybaseService interface // for KeybaseServiceMeasured.
[ "ResolveIdentifyImplicitTeam", "implements", "the", "KeybaseService", "interface", "for", "KeybaseServiceMeasured", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/keybase_service_measured.go#L136-L145
161,497
keybase/client
go/kbfs/libkbfs/keybase_service_measured.go
ResolveImplicitTeamByID
func (k KeybaseServiceMeasured) ResolveImplicitTeamByID( ctx context.Context, teamID keybase1.TeamID) (name string, err error) { k.resolveImplicitTeamByIDTimer.Time(func() { name, err = k.delegate.ResolveImplicitTeamByID(ctx, teamID) }) return name, err }
go
func (k KeybaseServiceMeasured) ResolveImplicitTeamByID( ctx context.Context, teamID keybase1.TeamID) (name string, err error) { k.resolveImplicitTeamByIDTimer.Time(func() { name, err = k.delegate.ResolveImplicitTeamByID(ctx, teamID) }) return name, err }
[ "func", "(", "k", "KeybaseServiceMeasured", ")", "ResolveImplicitTeamByID", "(", "ctx", "context", ".", "Context", ",", "teamID", "keybase1", ".", "TeamID", ")", "(", "name", "string", ",", "err", "error", ")", "{", "k", ".", "resolveImplicitTeamByIDTimer", "....
// ResolveImplicitTeamByID implements the KeybaseService interface for // KeybaseServiceMeasured.
[ "ResolveImplicitTeamByID", "implements", "the", "KeybaseService", "interface", "for", "KeybaseServiceMeasured", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/keybase_service_measured.go#L149-L155
161,498
keybase/client
go/kbfs/libkbfs/keybase_service_measured.go
LoadUserPlusKeys
func (k KeybaseServiceMeasured) LoadUserPlusKeys( ctx context.Context, uid keybase1.UID, pollForKID keybase1.KID, offline keybase1.OfflineAvailability) (userInfo idutil.UserInfo, err error) { k.loadUserPlusKeysTimer.Time(func() { userInfo, err = k.delegate.LoadUserPlusKeys( ctx, uid, pollForKID, offline) }) r...
go
func (k KeybaseServiceMeasured) LoadUserPlusKeys( ctx context.Context, uid keybase1.UID, pollForKID keybase1.KID, offline keybase1.OfflineAvailability) (userInfo idutil.UserInfo, err error) { k.loadUserPlusKeysTimer.Time(func() { userInfo, err = k.delegate.LoadUserPlusKeys( ctx, uid, pollForKID, offline) }) r...
[ "func", "(", "k", "KeybaseServiceMeasured", ")", "LoadUserPlusKeys", "(", "ctx", "context", ".", "Context", ",", "uid", "keybase1", ".", "UID", ",", "pollForKID", "keybase1", ".", "KID", ",", "offline", "keybase1", ".", "OfflineAvailability", ")", "(", "userIn...
// LoadUserPlusKeys implements the KeybaseService interface for KeybaseServiceMeasured.
[ "LoadUserPlusKeys", "implements", "the", "KeybaseService", "interface", "for", "KeybaseServiceMeasured", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/keybase_service_measured.go#L158-L166
161,499
keybase/client
go/kbfs/libkbfs/keybase_service_measured.go
LoadTeamPlusKeys
func (k KeybaseServiceMeasured) LoadTeamPlusKeys(ctx context.Context, tid keybase1.TeamID, tlfType tlf.Type, desiredKeyGen kbfsmd.KeyGen, desiredUser keybase1.UserVersion, desiredKey kbfscrypto.VerifyingKey, desiredRole keybase1.TeamRole, offline keybase1.OfflineAvailability) ( teamInfo idutil.TeamInfo, err error) ...
go
func (k KeybaseServiceMeasured) LoadTeamPlusKeys(ctx context.Context, tid keybase1.TeamID, tlfType tlf.Type, desiredKeyGen kbfsmd.KeyGen, desiredUser keybase1.UserVersion, desiredKey kbfscrypto.VerifyingKey, desiredRole keybase1.TeamRole, offline keybase1.OfflineAvailability) ( teamInfo idutil.TeamInfo, err error) ...
[ "func", "(", "k", "KeybaseServiceMeasured", ")", "LoadTeamPlusKeys", "(", "ctx", "context", ".", "Context", ",", "tid", "keybase1", ".", "TeamID", ",", "tlfType", "tlf", ".", "Type", ",", "desiredKeyGen", "kbfsmd", ".", "KeyGen", ",", "desiredUser", "keybase1"...
// LoadTeamPlusKeys implements the KeybaseService interface for KeybaseServiceMeasured.
[ "LoadTeamPlusKeys", "implements", "the", "KeybaseService", "interface", "for", "KeybaseServiceMeasured", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/keybase_service_measured.go#L169-L180