id
int32
0
167k
repo
stringlengths
5
54
path
stringlengths
4
155
func_name
stringlengths
1
118
original_string
stringlengths
52
85.5k
language
stringclasses
1 value
code
stringlengths
52
85.5k
code_tokens
listlengths
21
1.41k
docstring
stringlengths
6
2.61k
docstring_tokens
listlengths
3
215
sha
stringlengths
40
40
url
stringlengths
85
252
159,400
keybase/client
go/kbfs/libkbfs/disk_block_cache_remote.go
DeleteUnmarked
func (dbcr *DiskBlockCacheRemote) DeleteUnmarked( _ context.Context, _ tlf.ID, _ string, _ DiskBlockCacheType) error { panic("DeleteUnmarked() not implemented in DiskBlockCacheRemote") }
go
func (dbcr *DiskBlockCacheRemote) DeleteUnmarked( _ context.Context, _ tlf.ID, _ string, _ DiskBlockCacheType) error { panic("DeleteUnmarked() not implemented in DiskBlockCacheRemote") }
[ "func", "(", "dbcr", "*", "DiskBlockCacheRemote", ")", "DeleteUnmarked", "(", "_", "context", ".", "Context", ",", "_", "tlf", ".", "ID", ",", "_", "string", ",", "_", "DiskBlockCacheType", ")", "error", "{", "panic", "(", "\"", "\"", ")", "\n", "}" ]
// DeleteUnmarked implements the DiskBlockCache interface for // DiskBlockCacheRemote.
[ "DeleteUnmarked", "implements", "the", "DiskBlockCache", "interface", "for", "DiskBlockCacheRemote", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/disk_block_cache_remote.go#L233-L236
159,401
keybase/client
go/kbfs/libkbfs/disk_block_cache_remote.go
AddHomeTLF
func (dbcr *DiskBlockCacheRemote) AddHomeTLF(ctx context.Context, tlfID tlf.ID) error { // Let the local cache care about home TLFs. return nil }
go
func (dbcr *DiskBlockCacheRemote) AddHomeTLF(ctx context.Context, tlfID tlf.ID) error { // Let the local cache care about home TLFs. return nil }
[ "func", "(", "dbcr", "*", "DiskBlockCacheRemote", ")", "AddHomeTLF", "(", "ctx", "context", ".", "Context", ",", "tlfID", "tlf", ".", "ID", ")", "error", "{", "// Let the local cache care about home TLFs.", "return", "nil", "\n", "}" ]
// AddHomeTLF implements the DiskBlockCache interface for DiskBlockCacheRemote.
[ "AddHomeTLF", "implements", "the", "DiskBlockCache", "interface", "for", "DiskBlockCacheRemote", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/disk_block_cache_remote.go#L239-L243
159,402
keybase/client
go/kbfs/libkbfs/disk_block_cache_remote.go
GetTlfSize
func (dbcr *DiskBlockCacheRemote) GetTlfSize( _ context.Context, _ tlf.ID, _ DiskBlockCacheType) (uint64, error) { panic("GetTlfSize() not implemented in DiskBlockCacheRemote") }
go
func (dbcr *DiskBlockCacheRemote) GetTlfSize( _ context.Context, _ tlf.ID, _ DiskBlockCacheType) (uint64, error) { panic("GetTlfSize() not implemented in DiskBlockCacheRemote") }
[ "func", "(", "dbcr", "*", "DiskBlockCacheRemote", ")", "GetTlfSize", "(", "_", "context", ".", "Context", ",", "_", "tlf", ".", "ID", ",", "_", "DiskBlockCacheType", ")", "(", "uint64", ",", "error", ")", "{", "panic", "(", "\"", "\"", ")", "\n", "}"...
// GetTlfSize implements the DiskBlockCache interface for // DiskBlockCacheRemote.
[ "GetTlfSize", "implements", "the", "DiskBlockCache", "interface", "for", "DiskBlockCacheRemote", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/disk_block_cache_remote.go#L254-L257
159,403
keybase/client
go/kbfs/libkbfs/disk_block_cache_remote.go
GetTlfIDs
func (dbcr *DiskBlockCacheRemote) GetTlfIDs( _ context.Context, _ DiskBlockCacheType) ([]tlf.ID, error) { panic("GetTlfIDs() not implemented in DiskBlockCacheRemote") }
go
func (dbcr *DiskBlockCacheRemote) GetTlfIDs( _ context.Context, _ DiskBlockCacheType) ([]tlf.ID, error) { panic("GetTlfIDs() not implemented in DiskBlockCacheRemote") }
[ "func", "(", "dbcr", "*", "DiskBlockCacheRemote", ")", "GetTlfIDs", "(", "_", "context", ".", "Context", ",", "_", "DiskBlockCacheType", ")", "(", "[", "]", "tlf", ".", "ID", ",", "error", ")", "{", "panic", "(", "\"", "\"", ")", "\n", "}" ]
// GetTlfIDs implements the DiskBlockCache interface for // DiskBlockCacheRemote.
[ "GetTlfIDs", "implements", "the", "DiskBlockCache", "interface", "for", "DiskBlockCacheRemote", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/disk_block_cache_remote.go#L261-L264
159,404
keybase/client
go/git/get.go
formatUniqueRepoID
func formatUniqueRepoID(teamID keybase1.TeamID, repoID keybase1.RepoID) string { return string(teamID) + "_" + string(repoID) }
go
func formatUniqueRepoID(teamID keybase1.TeamID, repoID keybase1.RepoID) string { return string(teamID) + "_" + string(repoID) }
[ "func", "formatUniqueRepoID", "(", "teamID", "keybase1", ".", "TeamID", ",", "repoID", "keybase1", ".", "RepoID", ")", "string", "{", "return", "string", "(", "teamID", ")", "+", "\"", "\"", "+", "string", "(", "repoID", ")", "\n", "}" ]
// The GUI needs a way to refer to repos
[ "The", "GUI", "needs", "a", "way", "to", "refer", "to", "repos" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/git/get.go#L66-L68
159,405
keybase/client
go/git/get.go
folderFromTeamID
func folderFromTeamID(ctx context.Context, g *libkb.GlobalContext, teamID keybase1.TeamID, isImplicit bool) (keybase1.Folder, error) { if isImplicit { return folderFromTeamIDImplicit(ctx, g, teamID) } return folderFromTeamIDNamed(ctx, g, teamID) }
go
func folderFromTeamID(ctx context.Context, g *libkb.GlobalContext, teamID keybase1.TeamID, isImplicit bool) (keybase1.Folder, error) { if isImplicit { return folderFromTeamIDImplicit(ctx, g, teamID) } return folderFromTeamIDNamed(ctx, g, teamID) }
[ "func", "folderFromTeamID", "(", "ctx", "context", ".", "Context", ",", "g", "*", "libkb", ".", "GlobalContext", ",", "teamID", "keybase1", ".", "TeamID", ",", "isImplicit", "bool", ")", "(", "keybase1", ".", "Folder", ",", "error", ")", "{", "if", "isIm...
// Implicit teams need to be converted back into the folder that matches their // display name. Regular teams become a regular team folder.
[ "Implicit", "teams", "need", "to", "be", "converted", "back", "into", "the", "folder", "that", "matches", "their", "display", "name", ".", "Regular", "teams", "become", "a", "regular", "team", "folder", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/git/get.go#L72-L77
159,406
keybase/client
go/git/get.go
folderFromTeamIDImplicit
func folderFromTeamIDImplicit(ctx context.Context, g *libkb.GlobalContext, teamID keybase1.TeamID) (keybase1.Folder, error) { team, err := teams.Load(ctx, g, keybase1.LoadTeamArg{ ID: teamID, Public: teamID.IsPublic(), }) if err != nil { return keybase1.Folder{}, err } if !team.IsImplicit() { return k...
go
func folderFromTeamIDImplicit(ctx context.Context, g *libkb.GlobalContext, teamID keybase1.TeamID) (keybase1.Folder, error) { team, err := teams.Load(ctx, g, keybase1.LoadTeamArg{ ID: teamID, Public: teamID.IsPublic(), }) if err != nil { return keybase1.Folder{}, err } if !team.IsImplicit() { return k...
[ "func", "folderFromTeamIDImplicit", "(", "ctx", "context", ".", "Context", ",", "g", "*", "libkb", ".", "GlobalContext", ",", "teamID", "keybase1", ".", "TeamID", ")", "(", "keybase1", ".", "Folder", ",", "error", ")", "{", "team", ",", "err", ":=", "tea...
// folderFromTeamIDImplicit converts from a teamID for implicit teams
[ "folderFromTeamIDImplicit", "converts", "from", "a", "teamID", "for", "implicit", "teams" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/git/get.go#L92-L121
159,407
keybase/client
go/git/get.go
getMetadataInner
func getMetadataInner(ctx context.Context, g *libkb.GlobalContext, folder *keybase1.Folder) ([]keybase1.GitRepoResult, error) { mctx := libkb.NewMetaContext(ctx, g) teamer := NewTeamer(g) apiArg := libkb.APIArg{ Endpoint: "kbfs/git/team/get", SessionType: libkb.APISessionTypeREQUIRED, Args: libkb.HT...
go
func getMetadataInner(ctx context.Context, g *libkb.GlobalContext, folder *keybase1.Folder) ([]keybase1.GitRepoResult, error) { mctx := libkb.NewMetaContext(ctx, g) teamer := NewTeamer(g) apiArg := libkb.APIArg{ Endpoint: "kbfs/git/team/get", SessionType: libkb.APISessionTypeREQUIRED, Args: libkb.HT...
[ "func", "getMetadataInner", "(", "ctx", "context", ".", "Context", ",", "g", "*", "libkb", ".", "GlobalContext", ",", "folder", "*", "keybase1", ".", "Folder", ")", "(", "[", "]", "keybase1", ".", "GitRepoResult", ",", "error", ")", "{", "mctx", ":=", ...
// If folder is nil, get for all folders.
[ "If", "folder", "is", "nil", "get", "for", "all", "folders", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/git/get.go#L124-L210
159,408
keybase/client
go/libkb/gpg_cli.go
CanExec
func (g *GpgCLI) CanExec() (bool, error) { err := g.Configure() if IsExecError(err) { return false, nil } if err != nil { return false, err } return true, nil }
go
func (g *GpgCLI) CanExec() (bool, error) { err := g.Configure() if IsExecError(err) { return false, nil } if err != nil { return false, err } return true, nil }
[ "func", "(", "g", "*", "GpgCLI", ")", "CanExec", "(", ")", "(", "bool", ",", "error", ")", "{", "err", ":=", "g", ".", "Configure", "(", ")", "\n", "if", "IsExecError", "(", "err", ")", "{", "return", "false", ",", "nil", "\n", "}", "\n", "if",...
// CanExec returns true if a gpg executable exists.
[ "CanExec", "returns", "true", "if", "a", "gpg", "executable", "exists", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/gpg_cli.go#L75-L84
159,409
keybase/client
go/minterm/minterm_windows.go
getReadWriter
func (m *MinTerm) getReadWriter() io.ReadWriter { return WindowsReadWriter{r: m.termIn, w: logger.OutputWriterFromFile(m.termOut)} }
go
func (m *MinTerm) getReadWriter() io.ReadWriter { return WindowsReadWriter{r: m.termIn, w: logger.OutputWriterFromFile(m.termOut)} }
[ "func", "(", "m", "*", "MinTerm", ")", "getReadWriter", "(", ")", "io", ".", "ReadWriter", "{", "return", "WindowsReadWriter", "{", "r", ":", "m", ".", "termIn", ",", "w", ":", "logger", ".", "OutputWriterFromFile", "(", "m", ".", "termOut", ")", "}", ...
// Use a Windows output writer to eat control codes that look ugly on legacy terminals. // As a bonus, we can do color prompts this way.
[ "Use", "a", "Windows", "output", "writer", "to", "eat", "control", "codes", "that", "look", "ugly", "on", "legacy", "terminals", ".", "As", "a", "bonus", "we", "can", "do", "color", "prompts", "this", "way", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/minterm/minterm_windows.go#L57-L59
159,410
keybase/client
go/libkb/per_user_key.go
derivePrevKey
func (s *PerUserKeySeed) derivePrevKey() (res NaclSecretBoxKey, err error) { return s.DeriveSymmetricKey(DeriveReasonPUKPrev) }
go
func (s *PerUserKeySeed) derivePrevKey() (res NaclSecretBoxKey, err error) { return s.DeriveSymmetricKey(DeriveReasonPUKPrev) }
[ "func", "(", "s", "*", "PerUserKeySeed", ")", "derivePrevKey", "(", ")", "(", "res", "NaclSecretBoxKey", ",", "err", "error", ")", "{", "return", "s", ".", "DeriveSymmetricKey", "(", "DeriveReasonPUKPrev", ")", "\n", "}" ]
// derivePrevKey derives the symmetric key used to secretbox the previous generation seed.
[ "derivePrevKey", "derives", "the", "symmetric", "key", "used", "to", "secretbox", "the", "previous", "generation", "seed", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/per_user_key.go#L52-L54
159,411
keybase/client
go/libkb/per_user_key.go
openPerUserKeyPrev
func openPerUserKeyPrev(sbox PerUserKeyPrev, symmetricKey NaclSecretBoxKey) (PerUserKeySeed, error) { var res PerUserKeySeed // decode b64 msgpacked, err := base64.StdEncoding.DecodeString(string(sbox)) if err != nil { return res, err } // decode msgpack mh := codec.MsgpackHandle{WriteExt: true} dec := code...
go
func openPerUserKeyPrev(sbox PerUserKeyPrev, symmetricKey NaclSecretBoxKey) (PerUserKeySeed, error) { var res PerUserKeySeed // decode b64 msgpacked, err := base64.StdEncoding.DecodeString(string(sbox)) if err != nil { return res, err } // decode msgpack mh := codec.MsgpackHandle{WriteExt: true} dec := code...
[ "func", "openPerUserKeyPrev", "(", "sbox", "PerUserKeyPrev", ",", "symmetricKey", "NaclSecretBoxKey", ")", "(", "PerUserKeySeed", ",", "error", ")", "{", "var", "res", "PerUserKeySeed", "\n\n", "// decode b64", "msgpacked", ",", "err", ":=", "base64", ".", "StdEnc...
// Opens the output of NewPerUserKeyPrev
[ "Opens", "the", "output", "of", "NewPerUserKeyPrev" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/per_user_key.go#L116-L165
159,412
keybase/client
go/libkb/per_user_key.go
NewPerUserKeyring
func NewPerUserKeyring(g *GlobalContext, uid keybase1.UID) (*PerUserKeyring, error) { if uid.IsNil() { return nil, fmt.Errorf("NewPerUserKeyring called with nil uid") } return &PerUserKeyring{ Contextified: NewContextified(g), uid: uid, generations: make(perUserKeyMap), seqgen: make(perUser...
go
func NewPerUserKeyring(g *GlobalContext, uid keybase1.UID) (*PerUserKeyring, error) { if uid.IsNil() { return nil, fmt.Errorf("NewPerUserKeyring called with nil uid") } return &PerUserKeyring{ Contextified: NewContextified(g), uid: uid, generations: make(perUserKeyMap), seqgen: make(perUser...
[ "func", "NewPerUserKeyring", "(", "g", "*", "GlobalContext", ",", "uid", "keybase1", ".", "UID", ")", "(", "*", "PerUserKeyring", ",", "error", ")", "{", "if", "uid", ".", "IsNil", "(", ")", "{", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"",...
// NewPerUserKeyring makes a new per-user-key keyring for a given UID.
[ "NewPerUserKeyring", "makes", "a", "new", "per", "-", "user", "-", "key", "keyring", "for", "a", "given", "UID", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/per_user_key.go#L188-L198
159,413
keybase/client
go/libkb/per_user_key.go
PrepareBoxForNewDevice
func (s *PerUserKeyring) PrepareBoxForNewDevice(m MetaContext, receiverKey NaclDHKeyPair, senderKey NaclDHKeyPair) (box keybase1.PerUserKeyBox, err error) { s.Lock() defer s.Unlock() gen := s.currentGenerationLocked() if gen < 1 { return box, errors.New("PerUserKeyring#PrepareBoxForNewDevice no keys loaded") }...
go
func (s *PerUserKeyring) PrepareBoxForNewDevice(m MetaContext, receiverKey NaclDHKeyPair, senderKey NaclDHKeyPair) (box keybase1.PerUserKeyBox, err error) { s.Lock() defer s.Unlock() gen := s.currentGenerationLocked() if gen < 1 { return box, errors.New("PerUserKeyring#PrepareBoxForNewDevice no keys loaded") }...
[ "func", "(", "s", "*", "PerUserKeyring", ")", "PrepareBoxForNewDevice", "(", "m", "MetaContext", ",", "receiverKey", "NaclDHKeyPair", ",", "senderKey", "NaclDHKeyPair", ")", "(", "box", "keybase1", ".", "PerUserKeyBox", ",", "err", "error", ")", "{", "s", ".",...
// PrepareBoxForNewDevice encrypts the latest shared key seed for a new device. // The returned box should be pushed to the server.
[ "PrepareBoxForNewDevice", "encrypts", "the", "latest", "shared", "key", "seed", "for", "a", "new", "device", ".", "The", "returned", "box", "should", "be", "pushed", "to", "the", "server", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/per_user_key.go#L206-L221
159,414
keybase/client
go/libkb/per_user_key.go
PrepareBoxesForDevices
func (s *PerUserKeyring) PrepareBoxesForDevices(m MetaContext, contents PerUserKeySeed, generation keybase1.PerUserKeyGeneration, receiverKeys []NaclDHKeyPair, senderKey GenericKey) (boxes []keybase1.PerUserKeyBox, err error) { // Do not lock self because we do not use self. if contents.IsBlank() { return nil, e...
go
func (s *PerUserKeyring) PrepareBoxesForDevices(m MetaContext, contents PerUserKeySeed, generation keybase1.PerUserKeyGeneration, receiverKeys []NaclDHKeyPair, senderKey GenericKey) (boxes []keybase1.PerUserKeyBox, err error) { // Do not lock self because we do not use self. if contents.IsBlank() { return nil, e...
[ "func", "(", "s", "*", "PerUserKeyring", ")", "PrepareBoxesForDevices", "(", "m", "MetaContext", ",", "contents", "PerUserKeySeed", ",", "generation", "keybase1", ".", "PerUserKeyGeneration", ",", "receiverKeys", "[", "]", "NaclDHKeyPair", ",", "senderKey", "Generic...
// Encrypt seed for receiverKeys. Use senderKey to encrypt. // Does not use the keyring at all. Attached for organizational purposes. // Used when creating a new seed.
[ "Encrypt", "seed", "for", "receiverKeys", ".", "Use", "senderKey", "to", "encrypt", ".", "Does", "not", "use", "the", "keyring", "at", "all", ".", "Attached", "for", "organizational", "purposes", ".", "Used", "when", "creating", "a", "new", "seed", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/per_user_key.go#L226-L248
159,415
keybase/client
go/libkb/per_user_key.go
PreparePrev
func (s *PerUserKeyring) PreparePrev(m MetaContext, newSeed PerUserKeySeed, newGeneration keybase1.PerUserKeyGeneration) (PerUserKeyPrev, error) { s.Lock() defer s.Unlock() if newSeed.IsBlank() { return "", errors.New("attempt to prev with blank per-user-key") } currentGen := s.currentGenerationLocked() if c...
go
func (s *PerUserKeyring) PreparePrev(m MetaContext, newSeed PerUserKeySeed, newGeneration keybase1.PerUserKeyGeneration) (PerUserKeyPrev, error) { s.Lock() defer s.Unlock() if newSeed.IsBlank() { return "", errors.New("attempt to prev with blank per-user-key") } currentGen := s.currentGenerationLocked() if c...
[ "func", "(", "s", "*", "PerUserKeyring", ")", "PreparePrev", "(", "m", "MetaContext", ",", "newSeed", "PerUserKeySeed", ",", "newGeneration", "keybase1", ".", "PerUserKeyGeneration", ")", "(", "PerUserKeyPrev", ",", "error", ")", "{", "s", ".", "Lock", "(", ...
// Prepares a prev secretbox containing generation n-1 encrypted for generation n. // Asserts that the current generation is n-1. // The `generation` parameter is n.
[ "Prepares", "a", "prev", "secretbox", "containing", "generation", "n", "-", "1", "encrypted", "for", "generation", "n", ".", "Asserts", "that", "the", "current", "generation", "is", "n", "-", "1", ".", "The", "generation", "parameter", "is", "n", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/per_user_key.go#L253-L278
159,416
keybase/client
go/libkb/per_user_key.go
AddKey
func (s *PerUserKeyring) AddKey(m MetaContext, generation keybase1.PerUserKeyGeneration, seqno keybase1.Seqno, seed PerUserKeySeed) error { s.Lock() defer s.Unlock() m.Debug("PerUserKeyring#AddKey(generation: %v, seqno:%v)", generation, seqno) if seed.IsBlank() { return errors.New("attempt to add blank per-user...
go
func (s *PerUserKeyring) AddKey(m MetaContext, generation keybase1.PerUserKeyGeneration, seqno keybase1.Seqno, seed PerUserKeySeed) error { s.Lock() defer s.Unlock() m.Debug("PerUserKeyring#AddKey(generation: %v, seqno:%v)", generation, seqno) if seed.IsBlank() { return errors.New("attempt to add blank per-user...
[ "func", "(", "s", "*", "PerUserKeyring", ")", "AddKey", "(", "m", "MetaContext", ",", "generation", "keybase1", ".", "PerUserKeyGeneration", ",", "seqno", "keybase1", ".", "Seqno", ",", "seed", "PerUserKeySeed", ")", "error", "{", "s", ".", "Lock", "(", ")...
// AddKey registers a full key locally.
[ "AddKey", "registers", "a", "full", "key", "locally", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/per_user_key.go#L281-L312
159,417
keybase/client
go/libkb/per_user_key.go
CurrentGeneration
func (s *PerUserKeyring) CurrentGeneration() keybase1.PerUserKeyGeneration { s.Lock() defer s.Unlock() return s.currentGenerationLocked() }
go
func (s *PerUserKeyring) CurrentGeneration() keybase1.PerUserKeyGeneration { s.Lock() defer s.Unlock() return s.currentGenerationLocked() }
[ "func", "(", "s", "*", "PerUserKeyring", ")", "CurrentGeneration", "(", ")", "keybase1", ".", "PerUserKeyGeneration", "{", "s", ".", "Lock", "(", ")", "\n", "defer", "s", ".", "Unlock", "(", ")", "\n", "return", "s", ".", "currentGenerationLocked", "(", ...
// CurrentGeneration returns what generation we're on. The version possible // Version is 1. Version 0 implies no keys are available.
[ "CurrentGeneration", "returns", "what", "generation", "we", "re", "on", ".", "The", "version", "possible", "Version", "is", "1", ".", "Version", "0", "implies", "no", "keys", "are", "available", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/per_user_key.go#L320-L324
159,418
keybase/client
go/libkb/per_user_key.go
GetEncryptionKeyByGeneration
func (s *PerUserKeyring) GetEncryptionKeyByGeneration(m MetaContext, gen keybase1.PerUserKeyGeneration) (*NaclDHKeyPair, error) { s.Lock() defer s.Unlock() return s.getEncryptionKeyByGenerationLocked(m, gen) }
go
func (s *PerUserKeyring) GetEncryptionKeyByGeneration(m MetaContext, gen keybase1.PerUserKeyGeneration) (*NaclDHKeyPair, error) { s.Lock() defer s.Unlock() return s.getEncryptionKeyByGenerationLocked(m, gen) }
[ "func", "(", "s", "*", "PerUserKeyring", ")", "GetEncryptionKeyByGeneration", "(", "m", "MetaContext", ",", "gen", "keybase1", ".", "PerUserKeyGeneration", ")", "(", "*", "NaclDHKeyPair", ",", "error", ")", "{", "s", ".", "Lock", "(", ")", "\n", "defer", "...
// Get the encryption key of a generation.
[ "Get", "the", "encryption", "key", "of", "a", "generation", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/per_user_key.go#L372-L377
159,419
keybase/client
go/libkb/per_user_key.go
GetEncryptionKeyBySeqno
func (s *PerUserKeyring) GetEncryptionKeyBySeqno(m MetaContext, seqno keybase1.Seqno) (*NaclDHKeyPair, error) { s.Lock() defer s.Unlock() gen, ok := s.seqgen[seqno] if !ok { return nil, fmt.Errorf("no encrypted key for seqno %v", seqno) } return s.getEncryptionKeyByGenerationLocked(m, gen) }
go
func (s *PerUserKeyring) GetEncryptionKeyBySeqno(m MetaContext, seqno keybase1.Seqno) (*NaclDHKeyPair, error) { s.Lock() defer s.Unlock() gen, ok := s.seqgen[seqno] if !ok { return nil, fmt.Errorf("no encrypted key for seqno %v", seqno) } return s.getEncryptionKeyByGenerationLocked(m, gen) }
[ "func", "(", "s", "*", "PerUserKeyring", ")", "GetEncryptionKeyBySeqno", "(", "m", "MetaContext", ",", "seqno", "keybase1", ".", "Seqno", ")", "(", "*", "NaclDHKeyPair", ",", "error", ")", "{", "s", ".", "Lock", "(", ")", "\n", "defer", "s", ".", "Unlo...
// Get the encryption key at the user sigchain seqno.
[ "Get", "the", "encryption", "key", "at", "the", "user", "sigchain", "seqno", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/per_user_key.go#L391-L400
159,420
keybase/client
go/libkb/per_user_key.go
GetEncryptionKeyByKID
func (s *PerUserKeyring) GetEncryptionKeyByKID(m MetaContext, kid keybase1.KID) (*NaclDHKeyPair, error) { s.Lock() defer s.Unlock() for _, key := range s.generations { if key.encKey.GetKID().Equal(kid) { return key.encKey, nil } } return nil, NotFoundError{Msg: fmt.Sprintf("no per-user encryption key found...
go
func (s *PerUserKeyring) GetEncryptionKeyByKID(m MetaContext, kid keybase1.KID) (*NaclDHKeyPair, error) { s.Lock() defer s.Unlock() for _, key := range s.generations { if key.encKey.GetKID().Equal(kid) { return key.encKey, nil } } return nil, NotFoundError{Msg: fmt.Sprintf("no per-user encryption key found...
[ "func", "(", "s", "*", "PerUserKeyring", ")", "GetEncryptionKeyByKID", "(", "m", "MetaContext", ",", "kid", "keybase1", ".", "KID", ")", "(", "*", "NaclDHKeyPair", ",", "error", ")", "{", "s", ".", "Lock", "(", ")", "\n", "defer", "s", ".", "Unlock", ...
// GetEncryptionKeyByKID finds an encryption key that matches kid.
[ "GetEncryptionKeyByKID", "finds", "an", "encryption", "key", "that", "matches", "kid", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/per_user_key.go#L414-L424
159,421
keybase/client
go/libkb/per_user_key.go
Sync
func (s *PerUserKeyring) Sync(m MetaContext) (err error) { return s.syncAsConfiguredDevice(m, nil) }
go
func (s *PerUserKeyring) Sync(m MetaContext) (err error) { return s.syncAsConfiguredDevice(m, nil) }
[ "func", "(", "s", "*", "PerUserKeyring", ")", "Sync", "(", "m", "MetaContext", ")", "(", "err", "error", ")", "{", "return", "s", ".", "syncAsConfiguredDevice", "(", "m", ",", "nil", ")", "\n", "}" ]
// Sync our PerUserKeyring with the server. It will either add all new // keys since our last update, or not at all if there was an error. // Pass it a standard Go network context.
[ "Sync", "our", "PerUserKeyring", "with", "the", "server", ".", "It", "will", "either", "add", "all", "new", "keys", "since", "our", "last", "update", "or", "not", "at", "all", "if", "there", "was", "an", "error", ".", "Pass", "it", "a", "standard", "Go...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/per_user_key.go#L429-L431
159,422
keybase/client
go/libkb/per_user_key.go
checkPublic
func (c *perUserKeyChecker) checkPublic(key importedPerUserKey, generation keybase1.PerUserKeyGeneration) error { // sig key if expectedSigKID, ok := c.expectedPUKSigKIDs[generation]; ok { if !expectedSigKID.SecureEqual(key.sigKey.GetKID()) { return fmt.Errorf("import per-user-key: wrong sigKID expected %v", exp...
go
func (c *perUserKeyChecker) checkPublic(key importedPerUserKey, generation keybase1.PerUserKeyGeneration) error { // sig key if expectedSigKID, ok := c.expectedPUKSigKIDs[generation]; ok { if !expectedSigKID.SecureEqual(key.sigKey.GetKID()) { return fmt.Errorf("import per-user-key: wrong sigKID expected %v", exp...
[ "func", "(", "c", "*", "perUserKeyChecker", ")", "checkPublic", "(", "key", "importedPerUserKey", ",", "generation", "keybase1", ".", "PerUserKeyGeneration", ")", "error", "{", "// sig key", "if", "expectedSigKID", ",", "ok", ":=", "c", ".", "expectedPUKSigKIDs", ...
// checkPublic checks that a key matches the KIDs published by the user.
[ "checkPublic", "checks", "that", "a", "key", "matches", "the", "KIDs", "published", "by", "the", "user", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/per_user_key.go#L602-L622
159,423
keybase/client
go/libkb/per_user_key.go
importPerUserKeyBox
func importPerUserKeyBox(box *keybase1.PerUserKeyBox, decryptionKey GenericKey, wantedGeneration keybase1.PerUserKeyGeneration, checker *perUserKeyChecker) (*importedPerUserKey, error) { if box == nil { return nil, NewPerUserKeyImportError("per-user-key box nil") } if box.Generation != wantedGeneration { return...
go
func importPerUserKeyBox(box *keybase1.PerUserKeyBox, decryptionKey GenericKey, wantedGeneration keybase1.PerUserKeyGeneration, checker *perUserKeyChecker) (*importedPerUserKey, error) { if box == nil { return nil, NewPerUserKeyImportError("per-user-key box nil") } if box.Generation != wantedGeneration { return...
[ "func", "importPerUserKeyBox", "(", "box", "*", "keybase1", ".", "PerUserKeyBox", ",", "decryptionKey", "GenericKey", ",", "wantedGeneration", "keybase1", ".", "PerUserKeyGeneration", ",", "checker", "*", "perUserKeyChecker", ")", "(", "*", "importedPerUserKey", ",", ...
// Decrypt, expand, and check a per-user-key from a Box.
[ "Decrypt", "expand", "and", "check", "a", "per", "-", "user", "-", "key", "from", "a", "Box", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/per_user_key.go#L696-L730
159,424
keybase/client
go/libkb/per_user_key.go
importPerUserKeyPrev
func importPerUserKeyPrev(generation keybase1.PerUserKeyGeneration, prev perUserKeyPrevResp, decryptionKey NaclSecretBoxKey, wantedGeneration keybase1.PerUserKeyGeneration, checker *perUserKeyChecker) (*importedPerUserKey, error) { if generation != prev.Generation { return nil, fmt.Errorf("import per-user-key mism...
go
func importPerUserKeyPrev(generation keybase1.PerUserKeyGeneration, prev perUserKeyPrevResp, decryptionKey NaclSecretBoxKey, wantedGeneration keybase1.PerUserKeyGeneration, checker *perUserKeyChecker) (*importedPerUserKey, error) { if generation != prev.Generation { return nil, fmt.Errorf("import per-user-key mism...
[ "func", "importPerUserKeyPrev", "(", "generation", "keybase1", ".", "PerUserKeyGeneration", ",", "prev", "perUserKeyPrevResp", ",", "decryptionKey", "NaclSecretBoxKey", ",", "wantedGeneration", "keybase1", ".", "PerUserKeyGeneration", ",", "checker", "*", "perUserKeyChecker...
// Decrypt, expand, and check a per-user-key from a SecretBox.
[ "Decrypt", "expand", "and", "check", "a", "per", "-", "user", "-", "key", "from", "a", "SecretBox", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/per_user_key.go#L733-L757
159,425
keybase/client
go/kbfs/idutil/local.go
MakeLocalUsers
func MakeLocalUsers(users []kbname.NormalizedUsername) []LocalUser { localUsers := make([]LocalUser, len(users)) for i := 0; i < len(users); i++ { verifyingKey := MakeLocalUserVerifyingKeyOrBust(users[i]) cryptPublicKey := MakeLocalUserCryptPublicKeyOrBust(users[i]) localUsers[i] = LocalUser{ UserInfo: UserI...
go
func MakeLocalUsers(users []kbname.NormalizedUsername) []LocalUser { localUsers := make([]LocalUser, len(users)) for i := 0; i < len(users); i++ { verifyingKey := MakeLocalUserVerifyingKeyOrBust(users[i]) cryptPublicKey := MakeLocalUserCryptPublicKeyOrBust(users[i]) localUsers[i] = LocalUser{ UserInfo: UserI...
[ "func", "MakeLocalUsers", "(", "users", "[", "]", "kbname", ".", "NormalizedUsername", ")", "[", "]", "LocalUser", "{", "localUsers", ":=", "make", "(", "[", "]", "LocalUser", ",", "len", "(", "users", ")", ")", "\n", "for", "i", ":=", "0", ";", "i",...
// MakeLocalUsers is a helper function to generate a list of // LocalUsers suitable to use with KeybaseDaemonLocal.
[ "MakeLocalUsers", "is", "a", "helper", "function", "to", "generate", "a", "list", "of", "LocalUsers", "suitable", "to", "use", "with", "KeybaseDaemonLocal", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/idutil/local.go#L41-L61
159,426
keybase/client
go/kbfs/idutil/local.go
GetPublicKeys
func (lu *LocalUser) GetPublicKeys() []keybase1.PublicKey { sibkeys := verifyingKeysToPublicKeys(lu.VerifyingKeys) subkeys := cryptPublicKeysToPublicKeys(lu.CryptPublicKeys) return append(sibkeys, subkeys...) }
go
func (lu *LocalUser) GetPublicKeys() []keybase1.PublicKey { sibkeys := verifyingKeysToPublicKeys(lu.VerifyingKeys) subkeys := cryptPublicKeysToPublicKeys(lu.CryptPublicKeys) return append(sibkeys, subkeys...) }
[ "func", "(", "lu", "*", "LocalUser", ")", "GetPublicKeys", "(", ")", "[", "]", "keybase1", ".", "PublicKey", "{", "sibkeys", ":=", "verifyingKeysToPublicKeys", "(", "lu", ".", "VerifyingKeys", ")", "\n", "subkeys", ":=", "cryptPublicKeysToPublicKeys", "(", "lu...
// GetPublicKeys returns all of this LocalUser's public encryption keys.
[ "GetPublicKeys", "returns", "all", "of", "this", "LocalUser", "s", "public", "encryption", "keys", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/idutil/local.go#L88-L92
159,427
keybase/client
go/kbfs/idutil/local.go
DeepCopy
func (lu LocalUser) DeepCopy() LocalUser { luCopy := lu luCopy.VerifyingKeys = make( []kbfscrypto.VerifyingKey, len(lu.VerifyingKeys)) copy(luCopy.VerifyingKeys, lu.VerifyingKeys) luCopy.CryptPublicKeys = make( []kbfscrypto.CryptPublicKey, len(lu.CryptPublicKeys)) copy(luCopy.CryptPublicKeys, lu.CryptPublicK...
go
func (lu LocalUser) DeepCopy() LocalUser { luCopy := lu luCopy.VerifyingKeys = make( []kbfscrypto.VerifyingKey, len(lu.VerifyingKeys)) copy(luCopy.VerifyingKeys, lu.VerifyingKeys) luCopy.CryptPublicKeys = make( []kbfscrypto.CryptPublicKey, len(lu.CryptPublicKeys)) copy(luCopy.CryptPublicKeys, lu.CryptPublicK...
[ "func", "(", "lu", "LocalUser", ")", "DeepCopy", "(", ")", "LocalUser", "{", "luCopy", ":=", "lu", "\n\n", "luCopy", ".", "VerifyingKeys", "=", "make", "(", "[", "]", "kbfscrypto", ".", "VerifyingKey", ",", "len", "(", "lu", ".", "VerifyingKeys", ")", ...
// DeepCopy returns a deep copy of this `LocalUser`.
[ "DeepCopy", "returns", "a", "deep", "copy", "of", "this", "LocalUser", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/idutil/local.go#L95-L131
159,428
keybase/client
go/kbfs/idutil/local.go
MakeLocalUserSigningKeyOrBust
func MakeLocalUserSigningKeyOrBust( name kbname.NormalizedUsername) kbfscrypto.SigningKey { return kbfscrypto.MakeFakeSigningKeyOrBust( string(name) + " signing key") }
go
func MakeLocalUserSigningKeyOrBust( name kbname.NormalizedUsername) kbfscrypto.SigningKey { return kbfscrypto.MakeFakeSigningKeyOrBust( string(name) + " signing key") }
[ "func", "MakeLocalUserSigningKeyOrBust", "(", "name", "kbname", ".", "NormalizedUsername", ")", "kbfscrypto", ".", "SigningKey", "{", "return", "kbfscrypto", ".", "MakeFakeSigningKeyOrBust", "(", "string", "(", "name", ")", "+", "\"", "\"", ")", "\n", "}" ]
// Helper functions to get a various keys for a local user. Each // function will return the same key will always be returned for a // given user. // MakeLocalUserSigningKeyOrBust returns a unique signing key for this user.
[ "Helper", "functions", "to", "get", "a", "various", "keys", "for", "a", "local", "user", ".", "Each", "function", "will", "return", "the", "same", "key", "will", "always", "be", "returned", "for", "a", "given", "user", ".", "MakeLocalUserSigningKeyOrBust", "...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/idutil/local.go#L176-L180
159,429
keybase/client
go/kbfs/idutil/local.go
MakeLocalUserCryptPrivateKeyOrBust
func MakeLocalUserCryptPrivateKeyOrBust( name kbname.NormalizedUsername) kbfscrypto.CryptPrivateKey { return kbfscrypto.MakeFakeCryptPrivateKeyOrBust( string(name) + " crypt key") }
go
func MakeLocalUserCryptPrivateKeyOrBust( name kbname.NormalizedUsername) kbfscrypto.CryptPrivateKey { return kbfscrypto.MakeFakeCryptPrivateKeyOrBust( string(name) + " crypt key") }
[ "func", "MakeLocalUserCryptPrivateKeyOrBust", "(", "name", "kbname", ".", "NormalizedUsername", ")", "kbfscrypto", ".", "CryptPrivateKey", "{", "return", "kbfscrypto", ".", "MakeFakeCryptPrivateKeyOrBust", "(", "string", "(", "name", ")", "+", "\"", "\"", ")", "\n",...
// MakeLocalUserCryptPrivateKeyOrBust returns a unique private // encryption key for this user.
[ "MakeLocalUserCryptPrivateKeyOrBust", "returns", "a", "unique", "private", "encryption", "key", "for", "this", "user", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/idutil/local.go#L198-L202
159,430
keybase/client
go/kbfs/idutil/local.go
MakeLocalTLFCryptKeyOrBust
func MakeLocalTLFCryptKeyOrBust( name string, keyGen kbfsmd.KeyGen) kbfscrypto.TLFCryptKey { // Put the key gen first to make it more likely to fit into the // 32-character "random" seed. return kbfscrypto.MakeFakeTLFCryptKeyOrBust( string(name) + " " + string(keyGen) + " crypt key ") }
go
func MakeLocalTLFCryptKeyOrBust( name string, keyGen kbfsmd.KeyGen) kbfscrypto.TLFCryptKey { // Put the key gen first to make it more likely to fit into the // 32-character "random" seed. return kbfscrypto.MakeFakeTLFCryptKeyOrBust( string(name) + " " + string(keyGen) + " crypt key ") }
[ "func", "MakeLocalTLFCryptKeyOrBust", "(", "name", "string", ",", "keyGen", "kbfsmd", ".", "KeyGen", ")", "kbfscrypto", ".", "TLFCryptKey", "{", "// Put the key gen first to make it more likely to fit into the", "// 32-character \"random\" seed.", "return", "kbfscrypto", ".", ...
// MakeLocalTLFCryptKeyOrBust returns a unique private symmetric key // for a TLF.
[ "MakeLocalTLFCryptKeyOrBust", "returns", "a", "unique", "private", "symmetric", "key", "for", "a", "TLF", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/idutil/local.go#L206-L212
159,431
keybase/client
go/libkb/service_info.go
KeybaseServiceInfo
func KeybaseServiceInfo(g *GlobalContext) ServiceInfo { return ServiceInfo{ Version: VersionString(), Label: g.Env.GetLabel(), Pid: os.Getpid(), } }
go
func KeybaseServiceInfo(g *GlobalContext) ServiceInfo { return ServiceInfo{ Version: VersionString(), Label: g.Env.GetLabel(), Pid: os.Getpid(), } }
[ "func", "KeybaseServiceInfo", "(", "g", "*", "GlobalContext", ")", "ServiceInfo", "{", "return", "ServiceInfo", "{", "Version", ":", "VersionString", "(", ")", ",", "Label", ":", "g", ".", "Env", ".", "GetLabel", "(", ")", ",", "Pid", ":", "os", ".", "...
// KeybaseServiceInfo is runtime info for the Keybase service.
[ "KeybaseServiceInfo", "is", "runtime", "info", "for", "the", "Keybase", "service", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/service_info.go#L25-L31
159,432
keybase/client
go/libkb/service_info.go
WriteFile
func (s ServiceInfo) WriteFile(path string, log logger.Logger) error { out, err := json.MarshalIndent(s, "", " ") if err != nil { return err } file := NewFile(path, []byte(out), 0644) return file.Save(log) }
go
func (s ServiceInfo) WriteFile(path string, log logger.Logger) error { out, err := json.MarshalIndent(s, "", " ") if err != nil { return err } file := NewFile(path, []byte(out), 0644) return file.Save(log) }
[ "func", "(", "s", "ServiceInfo", ")", "WriteFile", "(", "path", "string", ",", "log", "logger", ".", "Logger", ")", "error", "{", "out", ",", "err", ":=", "json", ".", "MarshalIndent", "(", "s", ",", "\"", "\"", ",", "\"", "\"", ")", "\n", "if", ...
// WriteFile writes service info as JSON in runtimeDir.
[ "WriteFile", "writes", "service", "info", "as", "JSON", "in", "runtimeDir", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/service_info.go#L46-L54
159,433
keybase/client
go/libkb/service_info.go
WaitForServiceInfoFile
func WaitForServiceInfoFile(path string, label string, pid string, timeout time.Duration, log serviceLog) (*ServiceInfo, error) { if pid == "" { return nil, fmt.Errorf("No pid to wait for") } lookForServiceInfo := func() (*ServiceInfo, error) { serviceInfo, err := LoadServiceInfo(path) if err != nil { retu...
go
func WaitForServiceInfoFile(path string, label string, pid string, timeout time.Duration, log serviceLog) (*ServiceInfo, error) { if pid == "" { return nil, fmt.Errorf("No pid to wait for") } lookForServiceInfo := func() (*ServiceInfo, error) { serviceInfo, err := LoadServiceInfo(path) if err != nil { retu...
[ "func", "WaitForServiceInfoFile", "(", "path", "string", ",", "label", "string", ",", "pid", "string", ",", "timeout", "time", ".", "Duration", ",", "log", "serviceLog", ")", "(", "*", "ServiceInfo", ",", "error", ")", "{", "if", "pid", "==", "\"", "\"",...
// WaitForServiceInfoFile tries to wait for a service info file, which should be // written on successful service startup.
[ "WaitForServiceInfoFile", "tries", "to", "wait", "for", "a", "service", "info", "file", "which", "should", "be", "written", "on", "successful", "service", "startup", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/service_info.go#L80-L118
159,434
keybase/client
go/chat/helper.go
GetChannelTopicName
func (h *Helper) GetChannelTopicName(ctx context.Context, teamID keybase1.TeamID, topicType chat1.TopicType, convID chat1.ConversationID) (topicName string, err error) { defer h.Trace(ctx, func() error { return err }, "ChatHelper.GetChannelTopicName")() h.Debug(ctx, "for teamID:%v convID:%v", teamID.String(), convID...
go
func (h *Helper) GetChannelTopicName(ctx context.Context, teamID keybase1.TeamID, topicType chat1.TopicType, convID chat1.ConversationID) (topicName string, err error) { defer h.Trace(ctx, func() error { return err }, "ChatHelper.GetChannelTopicName")() h.Debug(ctx, "for teamID:%v convID:%v", teamID.String(), convID...
[ "func", "(", "h", "*", "Helper", ")", "GetChannelTopicName", "(", "ctx", "context", ".", "Context", ",", "teamID", "keybase1", ".", "TeamID", ",", "topicType", "chat1", ".", "TopicType", ",", "convID", "chat1", ".", "ConversationID", ")", "(", "topicName", ...
// GetChannelTopicName gets the name of a team channel even if it's not in the inbox.
[ "GetChannelTopicName", "gets", "the", "name", "of", "a", "team", "channel", "even", "if", "it", "s", "not", "in", "the", "inbox", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/chat/helper.go#L181-L212
159,435
keybase/client
go/chat/helper.go
postJoinLeave
func postJoinLeave(ctx context.Context, g *globals.Context, ri func() chat1.RemoteInterface, uid gregor1.UID, convID chat1.ConversationID, body chat1.MessageBody) (err error) { typ, err := body.MessageType() if err != nil { return fmt.Errorf("message type for postJoinLeave: %v", err) } switch typ { case chat1.M...
go
func postJoinLeave(ctx context.Context, g *globals.Context, ri func() chat1.RemoteInterface, uid gregor1.UID, convID chat1.ConversationID, body chat1.MessageBody) (err error) { typ, err := body.MessageType() if err != nil { return fmt.Errorf("message type for postJoinLeave: %v", err) } switch typ { case chat1.M...
[ "func", "postJoinLeave", "(", "ctx", "context", ".", "Context", ",", "g", "*", "globals", ".", "Context", ",", "ri", "func", "(", ")", "chat1", ".", "RemoteInterface", ",", "uid", "gregor1", ".", "UID", ",", "convID", "chat1", ".", "ConversationID", ",",...
// Post a join or leave message. Must be called when the user is in the conv. // Uses a blocking sender.
[ "Post", "a", "join", "or", "leave", "message", ".", "Must", "be", "called", "when", "the", "user", "is", "in", "the", "conv", ".", "Uses", "a", "blocking", "sender", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/chat/helper.go#L683-L736
159,436
keybase/client
go/chat/storage/checkers.go
CheckAndRecordBodyHash
func CheckAndRecordBodyHash(ctx context.Context, g *globals.Context, bodyHash chat1.Hash, uniqueMsgID chat1.MessageID, uniqueConvID chat1.ConversationID) error { bodyHashKey := makeBodyHashIndexKey(bodyHash) bodyHashValue := []byte(fmt.Sprintf("%s:%s", uniqueConvID, uniqueMsgID)) existingVal, found, err := g.LocalCh...
go
func CheckAndRecordBodyHash(ctx context.Context, g *globals.Context, bodyHash chat1.Hash, uniqueMsgID chat1.MessageID, uniqueConvID chat1.ConversationID) error { bodyHashKey := makeBodyHashIndexKey(bodyHash) bodyHashValue := []byte(fmt.Sprintf("%s:%s", uniqueConvID, uniqueMsgID)) existingVal, found, err := g.LocalCh...
[ "func", "CheckAndRecordBodyHash", "(", "ctx", "context", ".", "Context", ",", "g", "*", "globals", ".", "Context", ",", "bodyHash", "chat1", ".", "Hash", ",", "uniqueMsgID", "chat1", ".", "MessageID", ",", "uniqueConvID", "chat1", ".", "ConversationID", ")", ...
// CheckAndRecordBodyHash checks the current message's body hash against all the body hashes we've // seen, to prevent replays. If the header hash is new, add it to the set.
[ "CheckAndRecordBodyHash", "checks", "the", "current", "message", "s", "body", "hash", "against", "all", "the", "body", "hashes", "we", "ve", "seen", "to", "prevent", "replays", ".", "If", "the", "header", "hash", "is", "new", "add", "it", "to", "the", "set...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/chat/storage/checkers.go#L31-L55
159,437
keybase/client
go/chat/storage/checkers.go
CheckAndRecordPrevPointer
func CheckAndRecordPrevPointer(ctx context.Context, g *globals.Context, msgID chat1.MessageID, convID chat1.ConversationID, uniqueHeaderHash chat1.Hash) error { prevKey := makePrevIndexKey(convID, msgID) headerHashVal := makePrevIndexValue(uniqueHeaderHash) existingVal, found, err := g.LocalChatDb.GetRaw(prevKey) /...
go
func CheckAndRecordPrevPointer(ctx context.Context, g *globals.Context, msgID chat1.MessageID, convID chat1.ConversationID, uniqueHeaderHash chat1.Hash) error { prevKey := makePrevIndexKey(convID, msgID) headerHashVal := makePrevIndexValue(uniqueHeaderHash) existingVal, found, err := g.LocalChatDb.GetRaw(prevKey) /...
[ "func", "CheckAndRecordPrevPointer", "(", "ctx", "context", ".", "Context", ",", "g", "*", "globals", ".", "Context", ",", "msgID", "chat1", ".", "MessageID", ",", "convID", "chat1", ".", "ConversationID", ",", "uniqueHeaderHash", "chat1", ".", "Hash", ")", ...
// CheckAndRecordPrevPointer checks the current message's header hash against all the prev pointers we've // ever seen. If the current message is new, add it to the set.
[ "CheckAndRecordPrevPointer", "checks", "the", "current", "message", "s", "header", "hash", "against", "all", "the", "prev", "pointers", "we", "ve", "ever", "seen", ".", "If", "the", "current", "message", "is", "new", "add", "it", "to", "the", "set", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/chat/storage/checkers.go#L71-L98
159,438
keybase/client
go/logger/file.go
SetLogFileConfig
func SetLogFileConfig(lfc *LogFileConfig) error { globalLock.Lock() defer globalLock.Unlock() first := true var w = currentLogFileWriter if w != nil { first = false w.lock.Lock() defer w.lock.Unlock() w.Close() w.config = *lfc } else { w = NewLogFileWriter(*lfc) // Clean up the default logger, if ...
go
func SetLogFileConfig(lfc *LogFileConfig) error { globalLock.Lock() defer globalLock.Unlock() first := true var w = currentLogFileWriter if w != nil { first = false w.lock.Lock() defer w.lock.Unlock() w.Close() w.config = *lfc } else { w = NewLogFileWriter(*lfc) // Clean up the default logger, if ...
[ "func", "SetLogFileConfig", "(", "lfc", "*", "LogFileConfig", ")", "error", "{", "globalLock", ".", "Lock", "(", ")", "\n", "defer", "globalLock", ".", "Unlock", "(", ")", "\n\n", "first", ":=", "true", "\n", "var", "w", "=", "currentLogFileWriter", "\n", ...
// SetLogFileConfig sets the log file config to be used globally.
[ "SetLogFileConfig", "sets", "the", "log", "file", "config", "to", "be", "used", "globally", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/logger/file.go#L36-L72
159,439
keybase/client
go/logger/file.go
scanOldLogFiles
func scanOldLogFiles(path string) ([]string, error) { dname, fname := filepath.Split(path) if dname == "" { dname = "." } dir, err := os.Open(dname) if err != nil { return nil, err } defer dir.Close() ns, err := dir.Readdirnames(-1) if err != nil { return nil, err } names, err := getLogFilenamesOrderBy...
go
func scanOldLogFiles(path string) ([]string, error) { dname, fname := filepath.Split(path) if dname == "" { dname = "." } dir, err := os.Open(dname) if err != nil { return nil, err } defer dir.Close() ns, err := dir.Readdirnames(-1) if err != nil { return nil, err } names, err := getLogFilenamesOrderBy...
[ "func", "scanOldLogFiles", "(", "path", "string", ")", "(", "[", "]", "string", ",", "error", ")", "{", "dname", ",", "fname", ":=", "filepath", ".", "Split", "(", "path", ")", "\n", "if", "dname", "==", "\"", "\"", "{", "dname", "=", "\"", "\"", ...
// scanOldLogFiles finds old archived log files corresponding to the log file path. // Returns the list of such log files sorted with the eldest one first.
[ "scanOldLogFiles", "finds", "old", "archived", "log", "files", "corresponding", "to", "the", "log", "file", "path", ".", "Returns", "the", "list", "of", "such", "log", "files", "sorted", "with", "the", "eldest", "one", "first", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/logger/file.go#L258-L281
159,440
keybase/client
go/kbfs/tlfhandle/identify_util.go
OnError
func (ei *ExtendedIdentify) OnError(ctx context.Context) { if ei.userBreaks == nil { return } // The identify got an error, so just send a nil breaks list so // that the goroutine waiting on the breaks can finish and the // error can be returned. select { case ei.userBreaks <- keybase1.TLFIdentifyFailure{ B...
go
func (ei *ExtendedIdentify) OnError(ctx context.Context) { if ei.userBreaks == nil { return } // The identify got an error, so just send a nil breaks list so // that the goroutine waiting on the breaks can finish and the // error can be returned. select { case ei.userBreaks <- keybase1.TLFIdentifyFailure{ B...
[ "func", "(", "ei", "*", "ExtendedIdentify", ")", "OnError", "(", "ctx", "context", ".", "Context", ")", "{", "if", "ei", ".", "userBreaks", "==", "nil", "{", "return", "\n", "}", "\n\n", "// The identify got an error, so just send a nil breaks list so", "// that t...
// OnError is called when the identify process has encountered a hard // error.
[ "OnError", "is", "called", "when", "the", "identify", "process", "has", "encountered", "a", "hard", "error", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/tlfhandle/identify_util.go#L79-L94
159,441
keybase/client
go/kbfs/tlfhandle/identify_util.go
MakeExtendedIdentify
func MakeExtendedIdentify(ctx context.Context, behavior keybase1.TLFIdentifyBehavior) (context.Context, error) { if _, ok := ctx.Value(ctxExtendedIdentifyKey).(*ExtendedIdentify); ok { return nil, ExtendedIdentifyAlreadyExists{} } if !behavior.WarningInsteadOfErrorOnBrokenTracks() { return libcontext.NewContex...
go
func MakeExtendedIdentify(ctx context.Context, behavior keybase1.TLFIdentifyBehavior) (context.Context, error) { if _, ok := ctx.Value(ctxExtendedIdentifyKey).(*ExtendedIdentify); ok { return nil, ExtendedIdentifyAlreadyExists{} } if !behavior.WarningInsteadOfErrorOnBrokenTracks() { return libcontext.NewContex...
[ "func", "MakeExtendedIdentify", "(", "ctx", "context", ".", "Context", ",", "behavior", "keybase1", ".", "TLFIdentifyBehavior", ")", "(", "context", ".", "Context", ",", "error", ")", "{", "if", "_", ",", "ok", ":=", "ctx", ".", "Value", "(", "ctxExtendedI...
// MakeExtendedIdentify populates a context with an ExtendedIdentify directive.
[ "MakeExtendedIdentify", "populates", "a", "context", "with", "an", "ExtendedIdentify", "directive", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/tlfhandle/identify_util.go#L169-L194
159,442
keybase/client
go/kbfs/tlfhandle/identify_util.go
GetExtendedIdentify
func GetExtendedIdentify(ctx context.Context) (ei *ExtendedIdentify) { if ei, ok := ctx.Value(ctxExtendedIdentifyKey).(*ExtendedIdentify); ok { return ei } return &ExtendedIdentify{ Behavior: keybase1.TLFIdentifyBehavior_DEFAULT_KBFS, } }
go
func GetExtendedIdentify(ctx context.Context) (ei *ExtendedIdentify) { if ei, ok := ctx.Value(ctxExtendedIdentifyKey).(*ExtendedIdentify); ok { return ei } return &ExtendedIdentify{ Behavior: keybase1.TLFIdentifyBehavior_DEFAULT_KBFS, } }
[ "func", "GetExtendedIdentify", "(", "ctx", "context", ".", "Context", ")", "(", "ei", "*", "ExtendedIdentify", ")", "{", "if", "ei", ",", "ok", ":=", "ctx", ".", "Value", "(", "ctxExtendedIdentifyKey", ")", ".", "(", "*", "ExtendedIdentify", ")", ";", "o...
// GetExtendedIdentify returns the extended identify info associated // with the given context.
[ "GetExtendedIdentify", "returns", "the", "extended", "identify", "info", "associated", "with", "the", "given", "context", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/tlfhandle/identify_util.go#L198-L205
159,443
keybase/client
go/kbfs/tlfhandle/identify_util.go
identifyUser
func identifyUser(ctx context.Context, nug idutil.NormalizedUsernameGetter, identifier idutil.Identifier, name kbname.NormalizedUsername, id keybase1.UserOrTeamID, t tlf.Type, offline keybase1.OfflineAvailability) error { // Check to see if identify should be skipped altogether. ei := GetExtendedIdentify(ctx) if ...
go
func identifyUser(ctx context.Context, nug idutil.NormalizedUsernameGetter, identifier idutil.Identifier, name kbname.NormalizedUsername, id keybase1.UserOrTeamID, t tlf.Type, offline keybase1.OfflineAvailability) error { // Check to see if identify should be skipped altogether. ei := GetExtendedIdentify(ctx) if ...
[ "func", "identifyUser", "(", "ctx", "context", ".", "Context", ",", "nug", "idutil", ".", "NormalizedUsernameGetter", ",", "identifier", "idutil", ".", "Identifier", ",", "name", "kbname", ".", "NormalizedUsername", ",", "id", "keybase1", ".", "UserOrTeamID", ",...
// identifyUser is the preferred way to run identifies.
[ "identifyUser", "is", "the", "preferred", "way", "to", "run", "identifies", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/tlfhandle/identify_util.go#L220-L291
159,444
keybase/client
go/kbfs/tlfhandle/identify_util.go
identifyUserToChan
func identifyUserToChan( ctx context.Context, nug idutil.NormalizedUsernameGetter, identifier idutil.Identifier, name kbname.NormalizedUsername, id keybase1.UserOrTeamID, t tlf.Type, offline keybase1.OfflineAvailability, errChan chan error) { errChan <- identifyUser(ctx, nug, identifier, name, id, t, offline) }
go
func identifyUserToChan( ctx context.Context, nug idutil.NormalizedUsernameGetter, identifier idutil.Identifier, name kbname.NormalizedUsername, id keybase1.UserOrTeamID, t tlf.Type, offline keybase1.OfflineAvailability, errChan chan error) { errChan <- identifyUser(ctx, nug, identifier, name, id, t, offline) }
[ "func", "identifyUserToChan", "(", "ctx", "context", ".", "Context", ",", "nug", "idutil", ".", "NormalizedUsernameGetter", ",", "identifier", "idutil", ".", "Identifier", ",", "name", "kbname", ".", "NormalizedUsername", ",", "id", "keybase1", ".", "UserOrTeamID"...
// identifyUserToChan calls identifyUser and plugs the result into the error channnel.
[ "identifyUserToChan", "calls", "identifyUser", "and", "plugs", "the", "result", "into", "the", "error", "channnel", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/tlfhandle/identify_util.go#L294-L300
159,445
keybase/client
go/kbfs/tlfhandle/identify_util.go
identifyUsers
func identifyUsers( ctx context.Context, nug idutil.NormalizedUsernameGetter, identifier idutil.Identifier, names map[keybase1.UserOrTeamID]kbname.NormalizedUsername, t tlf.Type, offline keybase1.OfflineAvailability) error { eg, ctx := errgroup.WithContext(ctx) // TODO: limit the number of concurrent identifies?...
go
func identifyUsers( ctx context.Context, nug idutil.NormalizedUsernameGetter, identifier idutil.Identifier, names map[keybase1.UserOrTeamID]kbname.NormalizedUsername, t tlf.Type, offline keybase1.OfflineAvailability) error { eg, ctx := errgroup.WithContext(ctx) // TODO: limit the number of concurrent identifies?...
[ "func", "identifyUsers", "(", "ctx", "context", ".", "Context", ",", "nug", "idutil", ".", "NormalizedUsernameGetter", ",", "identifier", "idutil", ".", "Identifier", ",", "names", "map", "[", "keybase1", ".", "UserOrTeamID", "]", "kbname", ".", "NormalizedUsern...
// identifyUsers identifies the users in the given maps.
[ "identifyUsers", "identifies", "the", "users", "in", "the", "given", "maps", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/tlfhandle/identify_util.go#L303-L321
159,446
keybase/client
go/kbfs/tlfhandle/identify_util.go
IdentifyUserList
func IdentifyUserList(ctx context.Context, nug idutil.NormalizedUsernameGetter, identifier idutil.Identifier, ids []keybase1.UserOrTeamID, t tlf.Type, offline keybase1.OfflineAvailability) error { eg, ctx := errgroup.WithContext(ctx) // TODO: limit the number of concurrent identifies? // TODO: implement concurren...
go
func IdentifyUserList(ctx context.Context, nug idutil.NormalizedUsernameGetter, identifier idutil.Identifier, ids []keybase1.UserOrTeamID, t tlf.Type, offline keybase1.OfflineAvailability) error { eg, ctx := errgroup.WithContext(ctx) // TODO: limit the number of concurrent identifies? // TODO: implement concurren...
[ "func", "IdentifyUserList", "(", "ctx", "context", ".", "Context", ",", "nug", "idutil", ".", "NormalizedUsernameGetter", ",", "identifier", "idutil", ".", "Identifier", ",", "ids", "[", "]", "keybase1", ".", "UserOrTeamID", ",", "t", "tlf", ".", "Type", ","...
// IdentifyUserList identifies the users in the given list. Only use // this when the usernames are not known - like when rekeying.
[ "IdentifyUserList", "identifies", "the", "users", "in", "the", "given", "list", ".", "Only", "use", "this", "when", "the", "usernames", "are", "not", "known", "-", "like", "when", "rekeying", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/tlfhandle/identify_util.go#L325-L342
159,447
keybase/client
go/kbfs/tlfhandle/identify_util.go
identifyUsersForTLF
func identifyUsersForTLF( ctx context.Context, nug idutil.NormalizedUsernameGetter, identifier idutil.Identifier, names map[keybase1.UserOrTeamID]kbname.NormalizedUsername, t tlf.Type, offline keybase1.OfflineAvailability) error { ei := GetExtendedIdentify(ctx) if ei.Behavior == keybase1.TLFIdentifyBehavior_CHAT_...
go
func identifyUsersForTLF( ctx context.Context, nug idutil.NormalizedUsernameGetter, identifier idutil.Identifier, names map[keybase1.UserOrTeamID]kbname.NormalizedUsername, t tlf.Type, offline keybase1.OfflineAvailability) error { ei := GetExtendedIdentify(ctx) if ei.Behavior == keybase1.TLFIdentifyBehavior_CHAT_...
[ "func", "identifyUsersForTLF", "(", "ctx", "context", ".", "Context", ",", "nug", "idutil", ".", "NormalizedUsernameGetter", ",", "identifier", "idutil", ".", "Identifier", ",", "names", "map", "[", "keybase1", ".", "UserOrTeamID", "]", "kbname", ".", "Normalize...
// identifyUsersForTLF is a helper for identifyHandle for easier testing.
[ "identifyUsersForTLF", "is", "a", "helper", "for", "identifyHandle", "for", "easier", "testing", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/tlfhandle/identify_util.go#L345-L366
159,448
keybase/client
go/kbfs/tlfhandle/identify_util.go
IdentifyHandle
func IdentifyHandle( ctx context.Context, nug idutil.NormalizedUsernameGetter, identifier idutil.Identifier, osg idutil.OfflineStatusGetter, h *Handle) error { offline := keybase1.OfflineAvailability_NONE if osg != nil { offline = osg.OfflineAvailabilityForID(h.tlfID) } return identifyUsersForTLF( ctx, nug, ...
go
func IdentifyHandle( ctx context.Context, nug idutil.NormalizedUsernameGetter, identifier idutil.Identifier, osg idutil.OfflineStatusGetter, h *Handle) error { offline := keybase1.OfflineAvailability_NONE if osg != nil { offline = osg.OfflineAvailabilityForID(h.tlfID) } return identifyUsersForTLF( ctx, nug, ...
[ "func", "IdentifyHandle", "(", "ctx", "context", ".", "Context", ",", "nug", "idutil", ".", "NormalizedUsernameGetter", ",", "identifier", "idutil", ".", "Identifier", ",", "osg", "idutil", ".", "OfflineStatusGetter", ",", "h", "*", "Handle", ")", "error", "{"...
// IdentifyHandle identifies the canonical names in the given handle.
[ "IdentifyHandle", "identifies", "the", "canonical", "names", "in", "the", "given", "handle", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/tlfhandle/identify_util.go#L369-L379
159,449
keybase/client
go/kbfs/libdokan/fs.go
NewFS
func NewFS(ctx context.Context, config libkbfs.Config, log logger.Logger) (*FS, error) { if currentUserSIDErr != nil { return nil, currentUserSIDErr } quLog := config.MakeLogger(libkbfs.QuotaUsageLogModule("FS")) f := &FS{ config: config, log: log, vlog: config.MakeVLogger(log), ...
go
func NewFS(ctx context.Context, config libkbfs.Config, log logger.Logger) (*FS, error) { if currentUserSIDErr != nil { return nil, currentUserSIDErr } quLog := config.MakeLogger(libkbfs.QuotaUsageLogModule("FS")) f := &FS{ config: config, log: log, vlog: config.MakeVLogger(log), ...
[ "func", "NewFS", "(", "ctx", "context", ".", "Context", ",", "config", "libkbfs", ".", "Config", ",", "log", "logger", ".", "Logger", ")", "(", "*", "FS", ",", "error", ")", "{", "if", "currentUserSIDErr", "!=", "nil", "{", "return", "nil", ",", "cur...
// NewFS creates an FS
[ "NewFS", "creates", "an", "FS" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libdokan/fs.go#L55-L96
159,450
keybase/client
go/kbfs/libdokan/fs.go
wrapContext
func wrapContext(ctx context.Context, f *FS) context.Context { ctx = context.WithValue(ctx, libfs.CtxAppIDKey, f) logTags := make(logger.CtxLogTags) logTags[CtxIDKey] = CtxOpID ctx = logger.NewContextWithLogTags(ctx, logTags) return ctx }
go
func wrapContext(ctx context.Context, f *FS) context.Context { ctx = context.WithValue(ctx, libfs.CtxAppIDKey, f) logTags := make(logger.CtxLogTags) logTags[CtxIDKey] = CtxOpID ctx = logger.NewContextWithLogTags(ctx, logTags) return ctx }
[ "func", "wrapContext", "(", "ctx", "context", ".", "Context", ",", "f", "*", "FS", ")", "context", ".", "Context", "{", "ctx", "=", "context", ".", "WithValue", "(", "ctx", ",", "libfs", ".", "CtxAppIDKey", ",", "f", ")", "\n", "logTags", ":=", "make...
// Adds log tags etc
[ "Adds", "log", "tags", "etc" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libdokan/fs.go#L99-L105
159,451
keybase/client
go/kbfs/libdokan/fs.go
WithContext
func (f *FS) WithContext(ctx context.Context) (context.Context, context.CancelFunc) { id, err := libkbfs.MakeRandomRequestID() if err != nil { f.log.CErrorf(ctx, "Couldn't make request ID: %v", err) return ctx, func() {} } ctx, cancel := context.WithCancel(ctx) // context.WithDeadline uses clock from `time` ...
go
func (f *FS) WithContext(ctx context.Context) (context.Context, context.CancelFunc) { id, err := libkbfs.MakeRandomRequestID() if err != nil { f.log.CErrorf(ctx, "Couldn't make request ID: %v", err) return ctx, func() {} } ctx, cancel := context.WithCancel(ctx) // context.WithDeadline uses clock from `time` ...
[ "func", "(", "f", "*", "FS", ")", "WithContext", "(", "ctx", "context", ".", "Context", ")", "(", "context", ".", "Context", ",", "context", ".", "CancelFunc", ")", "{", "id", ",", "err", ":=", "libkbfs", ".", "MakeRandomRequestID", "(", ")", "\n", "...
// WithContext creates context for filesystem operations.
[ "WithContext", "creates", "context", "for", "filesystem", "operations", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libdokan/fs.go#L108-L130
159,452
keybase/client
go/kbfs/libdokan/fs.go
GetVolumeInformation
func (f *FS) GetVolumeInformation(ctx context.Context) (dokan.VolumeInformation, error) { // TODO should this be explicitely refused to other users? // As the mount is limited to current session there is little need. return vinfo, nil }
go
func (f *FS) GetVolumeInformation(ctx context.Context) (dokan.VolumeInformation, error) { // TODO should this be explicitely refused to other users? // As the mount is limited to current session there is little need. return vinfo, nil }
[ "func", "(", "f", "*", "FS", ")", "GetVolumeInformation", "(", "ctx", "context", ".", "Context", ")", "(", "dokan", ".", "VolumeInformation", ",", "error", ")", "{", "// TODO should this be explicitely refused to other users?", "// As the mount is limited to current sessi...
// GetVolumeInformation returns information about the whole filesystem for dokan.
[ "GetVolumeInformation", "returns", "information", "about", "the", "whole", "filesystem", "for", "dokan", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libdokan/fs.go#L142-L146
159,453
keybase/client
go/kbfs/libdokan/fs.go
GetDiskFreeSpace
func (f *FS) GetDiskFreeSpace(ctx context.Context) (freeSpace dokan.FreeSpace, err error) { // TODO should this be refused to other users? // As the mount is limited to current session there is little need. f.logEnter(ctx, "FS GetDiskFreeSpace") // Refuse private directories while we are in a error state. if f.rem...
go
func (f *FS) GetDiskFreeSpace(ctx context.Context) (freeSpace dokan.FreeSpace, err error) { // TODO should this be refused to other users? // As the mount is limited to current session there is little need. f.logEnter(ctx, "FS GetDiskFreeSpace") // Refuse private directories while we are in a error state. if f.rem...
[ "func", "(", "f", "*", "FS", ")", "GetDiskFreeSpace", "(", "ctx", "context", ".", "Context", ")", "(", "freeSpace", "dokan", ".", "FreeSpace", ",", "err", "error", ")", "{", "// TODO should this be refused to other users?", "// As the mount is limited to current sessi...
// GetDiskFreeSpace returns information about free space on the volume for dokan.
[ "GetDiskFreeSpace", "returns", "information", "about", "free", "space", "on", "the", "volume", "for", "dokan", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libdokan/fs.go#L156-L190
159,454
keybase/client
go/kbfs/libdokan/fs.go
isCreation
func (oc *openContext) isCreation() bool { switch oc.CreateDisposition { case dokan.FileSupersede, dokan.FileCreate, dokan.FileOpenIf, dokan.FileOverwriteIf: return true } return false }
go
func (oc *openContext) isCreation() bool { switch oc.CreateDisposition { case dokan.FileSupersede, dokan.FileCreate, dokan.FileOpenIf, dokan.FileOverwriteIf: return true } return false }
[ "func", "(", "oc", "*", "openContext", ")", "isCreation", "(", ")", "bool", "{", "switch", "oc", ".", "CreateDisposition", "{", "case", "dokan", ".", "FileSupersede", ",", "dokan", ".", "FileCreate", ",", "dokan", ".", "FileOpenIf", ",", "dokan", ".", "F...
// isCreation checks the flags whether a file creation is wanted.
[ "isCreation", "checks", "the", "flags", "whether", "a", "file", "creation", "is", "wanted", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libdokan/fs.go#L218-L224
159,455
keybase/client
go/kbfs/libdokan/fs.go
isTruncate
func (oc *openContext) isTruncate() bool { switch oc.CreateDisposition { case dokan.FileSupersede, dokan.FileOverwrite, dokan.FileOverwriteIf: return true } return false }
go
func (oc *openContext) isTruncate() bool { switch oc.CreateDisposition { case dokan.FileSupersede, dokan.FileOverwrite, dokan.FileOverwriteIf: return true } return false }
[ "func", "(", "oc", "*", "openContext", ")", "isTruncate", "(", ")", "bool", "{", "switch", "oc", ".", "CreateDisposition", "{", "case", "dokan", ".", "FileSupersede", ",", "dokan", ".", "FileOverwrite", ",", "dokan", ".", "FileOverwriteIf", ":", "return", ...
// isTruncate checks the flags whether a file truncation is wanted.
[ "isTruncate", "checks", "the", "flags", "whether", "a", "file", "truncation", "is", "wanted", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libdokan/fs.go#L234-L240
159,456
keybase/client
go/kbfs/libdokan/fs.go
returnDirNoCleanup
func (oc *openContext) returnDirNoCleanup(f dokan.File) ( dokan.File, dokan.CreateStatus, error) { if err := oc.ReturningDirAllowed(); err != nil { return nil, 0, err } return f, dokan.ExistingDir, nil }
go
func (oc *openContext) returnDirNoCleanup(f dokan.File) ( dokan.File, dokan.CreateStatus, error) { if err := oc.ReturningDirAllowed(); err != nil { return nil, 0, err } return f, dokan.ExistingDir, nil }
[ "func", "(", "oc", "*", "openContext", ")", "returnDirNoCleanup", "(", "f", "dokan", ".", "File", ")", "(", "dokan", ".", "File", ",", "dokan", ".", "CreateStatus", ",", "error", ")", "{", "if", "err", ":=", "oc", ".", "ReturningDirAllowed", "(", ")", ...
// returnDirNoCleanup returns a dir or nothing depending on the open // flags and does not call .Cleanup on error.
[ "returnDirNoCleanup", "returns", "a", "dir", "or", "nothing", "depending", "on", "the", "open", "flags", "and", "does", "not", "call", ".", "Cleanup", "on", "error", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libdokan/fs.go#L249-L255
159,457
keybase/client
go/kbfs/libdokan/fs.go
returnFileNoCleanup
func (oc *openContext) returnFileNoCleanup(f dokan.File) ( dokan.File, dokan.CreateStatus, error) { if err := oc.ReturningFileAllowed(); err != nil { return nil, 0, err } return f, dokan.ExistingFile, nil }
go
func (oc *openContext) returnFileNoCleanup(f dokan.File) ( dokan.File, dokan.CreateStatus, error) { if err := oc.ReturningFileAllowed(); err != nil { return nil, 0, err } return f, dokan.ExistingFile, nil }
[ "func", "(", "oc", "*", "openContext", ")", "returnFileNoCleanup", "(", "f", "dokan", ".", "File", ")", "(", "dokan", ".", "File", ",", "dokan", ".", "CreateStatus", ",", "error", ")", "{", "if", "err", ":=", "oc", ".", "ReturningFileAllowed", "(", ")"...
// returnFileNoCleanup returns a file or nothing depending on the open // flags and does not call .Cleanup on error.
[ "returnFileNoCleanup", "returns", "a", "file", "or", "nothing", "depending", "on", "the", "open", "flags", "and", "does", "not", "call", ".", "Cleanup", "on", "error", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libdokan/fs.go#L259-L265
159,458
keybase/client
go/kbfs/libdokan/fs.go
CreateFile
func (f *FS) CreateFile(ctx context.Context, fi *dokan.FileInfo, cd *dokan.CreateData) (dokan.File, dokan.CreateStatus, error) { // Only allow the current user access if !fi.IsRequestorUserSidEqualTo(currentUserSID) { f.log.CErrorf(ctx, "FS CreateFile - Refusing real access: SID match error") return openFakeRoot(...
go
func (f *FS) CreateFile(ctx context.Context, fi *dokan.FileInfo, cd *dokan.CreateData) (dokan.File, dokan.CreateStatus, error) { // Only allow the current user access if !fi.IsRequestorUserSidEqualTo(currentUserSID) { f.log.CErrorf(ctx, "FS CreateFile - Refusing real access: SID match error") return openFakeRoot(...
[ "func", "(", "f", "*", "FS", ")", "CreateFile", "(", "ctx", "context", ".", "Context", ",", "fi", "*", "dokan", ".", "FileInfo", ",", "cd", "*", "dokan", ".", "CreateData", ")", "(", "dokan", ".", "File", ",", "dokan", ".", "CreateStatus", ",", "er...
// CreateFile called from dokan, may be a file or directory.
[ "CreateFile", "called", "from", "dokan", "may", "be", "a", "file", "or", "directory", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libdokan/fs.go#L280-L287
159,459
keybase/client
go/kbfs/libdokan/fs.go
windowsPathSplit
func windowsPathSplit(raw string) ([]string, error) { if raw == `` { raw = `\` } if raw[0] != '\\' || raw[len(raw)-1] == '*' { return nil, dokan.ErrObjectNameNotFound } return strings.Split(raw[1:], `\`), nil }
go
func windowsPathSplit(raw string) ([]string, error) { if raw == `` { raw = `\` } if raw[0] != '\\' || raw[len(raw)-1] == '*' { return nil, dokan.ErrObjectNameNotFound } return strings.Split(raw[1:], `\`), nil }
[ "func", "windowsPathSplit", "(", "raw", "string", ")", "(", "[", "]", "string", ",", "error", ")", "{", "if", "raw", "==", "``", "{", "raw", "=", "`\\`", "\n", "}", "\n", "if", "raw", "[", "0", "]", "!=", "'\\\\'", "||", "raw", "[", "len", "(",...
// windowsPathSplit handles paths we get from Dokan. // As a special case `` means `\`, it gets generated // on special occasions.
[ "windowsPathSplit", "handles", "paths", "we", "get", "from", "Dokan", ".", "As", "a", "special", "case", "means", "\\", "it", "gets", "generated", "on", "special", "occasions", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libdokan/fs.go#L411-L419
159,460
keybase/client
go/kbfs/libdokan/fs.go
Printf
func (f *FS) Printf(fmt string, args ...interface{}) { f.log.Info("Dokan info: "+fmt, args...) }
go
func (f *FS) Printf(fmt string, args ...interface{}) { f.log.Info("Dokan info: "+fmt, args...) }
[ "func", "(", "f", "*", "FS", ")", "Printf", "(", "fmt", "string", ",", "args", "...", "interface", "{", "}", ")", "{", "f", ".", "log", ".", "Info", "(", "\"", "\"", "+", "fmt", ",", "args", "...", ")", "\n", "}" ]
// Printf prints information from the Dokan library.
[ "Printf", "prints", "information", "from", "the", "Dokan", "library", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libdokan/fs.go#L427-L429
159,461
keybase/client
go/kbfs/libdokan/fs.go
UserChanged
func (f *FS) UserChanged(ctx context.Context, oldName, newName kbname.NormalizedUsername) { f.log.CDebugf(ctx, "User changed: %q -> %q", oldName, newName) f.root.public.userChanged(ctx, oldName, newName) f.root.private.userChanged(ctx, oldName, newName) }
go
func (f *FS) UserChanged(ctx context.Context, oldName, newName kbname.NormalizedUsername) { f.log.CDebugf(ctx, "User changed: %q -> %q", oldName, newName) f.root.public.userChanged(ctx, oldName, newName) f.root.private.userChanged(ctx, oldName, newName) }
[ "func", "(", "f", "*", "FS", ")", "UserChanged", "(", "ctx", "context", ".", "Context", ",", "oldName", ",", "newName", "kbname", ".", "NormalizedUsername", ")", "{", "f", ".", "log", ".", "CDebugf", "(", "ctx", ",", "\"", "\"", ",", "oldName", ",", ...
// UserChanged is called from libfs.
[ "UserChanged", "is", "called", "from", "libfs", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libdokan/fs.go#L658-L662
159,462
keybase/client
go/kbfs/libdokan/fs.go
GetFileInformation
func (r *Root) GetFileInformation(ctx context.Context, fi *dokan.FileInfo) (*dokan.Stat, error) { return defaultDirectoryInformation() }
go
func (r *Root) GetFileInformation(ctx context.Context, fi *dokan.FileInfo) (*dokan.Stat, error) { return defaultDirectoryInformation() }
[ "func", "(", "r", "*", "Root", ")", "GetFileInformation", "(", "ctx", "context", ".", "Context", ",", "fi", "*", "dokan", ".", "FileInfo", ")", "(", "*", "dokan", ".", "Stat", ",", "error", ")", "{", "return", "defaultDirectoryInformation", "(", ")", "...
// GetFileInformation for dokan stats.
[ "GetFileInformation", "for", "dokan", "stats", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libdokan/fs.go#L675-L677
159,463
keybase/client
go/kbfs/libdokan/fs.go
FindFiles
func (r *Root) FindFiles(ctx context.Context, fi *dokan.FileInfo, ignored string, callback func(*dokan.NamedStat) error) error { var ns dokan.NamedStat var err error ns.FileAttributes = dokan.FileAttributeDirectory ename, esize := r.private.fs.remoteStatus.ExtraFileNameAndSize() switch ename { case "": ns.Name ...
go
func (r *Root) FindFiles(ctx context.Context, fi *dokan.FileInfo, ignored string, callback func(*dokan.NamedStat) error) error { var ns dokan.NamedStat var err error ns.FileAttributes = dokan.FileAttributeDirectory ename, esize := r.private.fs.remoteStatus.ExtraFileNameAndSize() switch ename { case "": ns.Name ...
[ "func", "(", "r", "*", "Root", ")", "FindFiles", "(", "ctx", "context", ".", "Context", ",", "fi", "*", "dokan", ".", "FileInfo", ",", "ignored", "string", ",", "callback", "func", "(", "*", "dokan", ".", "NamedStat", ")", "error", ")", "error", "{",...
// FindFiles for dokan readdir.
[ "FindFiles", "for", "dokan", "readdir", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libdokan/fs.go#L680-L715
159,464
keybase/client
go/kbfs/libfs/file_info_file.go
GetFileInfo
func GetFileInfo( ctx context.Context, config libkbfs.Config, dir libkbfs.Node, name string) ( data []byte, t time.Time, err error) { node, ei, err := config.KBFSOps().Lookup(ctx, dir, name) if err != nil { return nil, time.Time{}, err } nmd, err := config.KBFSOps().GetNodeMetadata(ctx, node) if err != nil { ...
go
func GetFileInfo( ctx context.Context, config libkbfs.Config, dir libkbfs.Node, name string) ( data []byte, t time.Time, err error) { node, ei, err := config.KBFSOps().Lookup(ctx, dir, name) if err != nil { return nil, time.Time{}, err } nmd, err := config.KBFSOps().GetNodeMetadata(ctx, node) if err != nil { ...
[ "func", "GetFileInfo", "(", "ctx", "context", ".", "Context", ",", "config", "libkbfs", ".", "Config", ",", "dir", "libkbfs", ".", "Node", ",", "name", "string", ")", "(", "data", "[", "]", "byte", ",", "t", "time", ".", "Time", ",", "err", "error", ...
// GetFileInfo returns serialized JSON containing status information // for a file or directory entry.
[ "GetFileInfo", "returns", "serialized", "JSON", "containing", "status", "information", "for", "a", "file", "or", "directory", "entry", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libfs/file_info_file.go#L22-L38
159,465
keybase/client
go/engine/favorite_list.go
NewFavoriteList
func NewFavoriteList(g *libkb.GlobalContext) *FavoriteList { return &FavoriteList{ Contextified: libkb.NewContextified(g), } }
go
func NewFavoriteList(g *libkb.GlobalContext) *FavoriteList { return &FavoriteList{ Contextified: libkb.NewContextified(g), } }
[ "func", "NewFavoriteList", "(", "g", "*", "libkb", ".", "GlobalContext", ")", "*", "FavoriteList", "{", "return", "&", "FavoriteList", "{", "Contextified", ":", "libkb", ".", "NewContextified", "(", "g", ")", ",", "}", "\n", "}" ]
// NewFavoriteList creates a FavoriteList engine.
[ "NewFavoriteList", "creates", "a", "FavoriteList", "engine", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/engine/favorite_list.go#L18-L22
159,466
keybase/client
go/engine/favorite_list.go
Result
func (e *FavoriteList) Result() keybase1.FavoritesResult { return keybase1.FavoritesResult{ FavoriteFolders: e.result.Favorites, IgnoredFolders: e.result.Ignored, NewFolders: e.result.New, } }
go
func (e *FavoriteList) Result() keybase1.FavoritesResult { return keybase1.FavoritesResult{ FavoriteFolders: e.result.Favorites, IgnoredFolders: e.result.Ignored, NewFolders: e.result.New, } }
[ "func", "(", "e", "*", "FavoriteList", ")", "Result", "(", ")", "keybase1", ".", "FavoritesResult", "{", "return", "keybase1", ".", "FavoritesResult", "{", "FavoriteFolders", ":", "e", ".", "result", ".", "Favorites", ",", "IgnoredFolders", ":", "e", ".", ...
// Favorites returns the list of favorites that Run generated.
[ "Favorites", "returns", "the", "list", "of", "favorites", "that", "Run", "generated", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/engine/favorite_list.go#L89-L95
159,467
keybase/client
go/client/wallet_api_handler.go
newWalletAPIHandler
func newWalletAPIHandler(g *libkb.GlobalContext, indentOutput bool) *walletAPIHandler { return &walletAPIHandler{Contextified: libkb.NewContextified(g), indent: indentOutput} }
go
func newWalletAPIHandler(g *libkb.GlobalContext, indentOutput bool) *walletAPIHandler { return &walletAPIHandler{Contextified: libkb.NewContextified(g), indent: indentOutput} }
[ "func", "newWalletAPIHandler", "(", "g", "*", "libkb", ".", "GlobalContext", ",", "indentOutput", "bool", ")", "*", "walletAPIHandler", "{", "return", "&", "walletAPIHandler", "{", "Contextified", ":", "libkb", ".", "NewContextified", "(", "g", ")", ",", "inde...
// newWalletAPIHandler makes a walletAPIHandler.
[ "newWalletAPIHandler", "makes", "a", "walletAPIHandler", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/client/wallet_api_handler.go#L51-L53
159,468
keybase/client
go/client/wallet_api_handler.go
handle
func (w *walletAPIHandler) handle(ctx context.Context, c Call, wr io.Writer) error { switch c.Params.Version { case 0, 1: return w.handleV1(ctx, c, wr) default: return ErrInvalidVersion{version: c.Params.Version} } }
go
func (w *walletAPIHandler) handle(ctx context.Context, c Call, wr io.Writer) error { switch c.Params.Version { case 0, 1: return w.handleV1(ctx, c, wr) default: return ErrInvalidVersion{version: c.Params.Version} } }
[ "func", "(", "w", "*", "walletAPIHandler", ")", "handle", "(", "ctx", "context", ".", "Context", ",", "c", "Call", ",", "wr", "io", ".", "Writer", ")", "error", "{", "switch", "c", ".", "Params", ".", "Version", "{", "case", "0", ",", "1", ":", "...
// handle processes the Call based on the version.
[ "handle", "processes", "the", "Call", "based", "on", "the", "version", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/client/wallet_api_handler.go#L56-L63
159,469
keybase/client
go/client/wallet_api_handler.go
handleV1
func (w *walletAPIHandler) handleV1(ctx context.Context, c Call, wr io.Writer) error { if !validWalletMethodsV1[c.Method] { return ErrInvalidMethod{name: c.Method, version: 1} } cli, err := GetWalletClient(w.G()) if err != nil { return err } w.cli = cli switch c.Method { case balancesMethod: return w.ba...
go
func (w *walletAPIHandler) handleV1(ctx context.Context, c Call, wr io.Writer) error { if !validWalletMethodsV1[c.Method] { return ErrInvalidMethod{name: c.Method, version: 1} } cli, err := GetWalletClient(w.G()) if err != nil { return err } w.cli = cli switch c.Method { case balancesMethod: return w.ba...
[ "func", "(", "w", "*", "walletAPIHandler", ")", "handleV1", "(", "ctx", "context", ".", "Context", ",", "c", "Call", ",", "wr", "io", ".", "Writer", ")", "error", "{", "if", "!", "validWalletMethodsV1", "[", "c", ".", "Method", "]", "{", "return", "E...
// handleV1 processes Call for version 1 of the wallet JSON API.
[ "handleV1", "processes", "Call", "for", "version", "1", "of", "the", "wallet", "JSON", "API", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/client/wallet_api_handler.go#L94-L129
159,470
keybase/client
go/client/wallet_api_handler.go
balances
func (w *walletAPIHandler) balances(ctx context.Context, c Call, wr io.Writer) error { accounts, err := w.cli.WalletGetAccountsCLILocal(ctx) if err != nil { return w.encodeErr(c, err, wr) } return w.encodeResult(c, accounts, wr) }
go
func (w *walletAPIHandler) balances(ctx context.Context, c Call, wr io.Writer) error { accounts, err := w.cli.WalletGetAccountsCLILocal(ctx) if err != nil { return w.encodeErr(c, err, wr) } return w.encodeResult(c, accounts, wr) }
[ "func", "(", "w", "*", "walletAPIHandler", ")", "balances", "(", "ctx", "context", ".", "Context", ",", "c", "Call", ",", "wr", "io", ".", "Writer", ")", "error", "{", "accounts", ",", "err", ":=", "w", ".", "cli", ".", "WalletGetAccountsCLILocal", "("...
// balances returns the account balances for all accounts owned by the current user.
[ "balances", "returns", "the", "account", "balances", "for", "all", "accounts", "owned", "by", "the", "current", "user", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/client/wallet_api_handler.go#L132-L138
159,471
keybase/client
go/client/wallet_api_handler.go
batch
func (w *walletAPIHandler) batch(ctx context.Context, c Call, wr io.Writer) error { var opts batchOptions if err := unmarshalOptions(c, &opts); err != nil { return w.encodeErr(c, err, wr) } arg := stellar1.BatchLocalArg{ BatchID: opts.BatchID, TimeoutSecs: opts.Timeout, UseMulti: true, } for _, p ...
go
func (w *walletAPIHandler) batch(ctx context.Context, c Call, wr io.Writer) error { var opts batchOptions if err := unmarshalOptions(c, &opts); err != nil { return w.encodeErr(c, err, wr) } arg := stellar1.BatchLocalArg{ BatchID: opts.BatchID, TimeoutSecs: opts.Timeout, UseMulti: true, } for _, p ...
[ "func", "(", "w", "*", "walletAPIHandler", ")", "batch", "(", "ctx", "context", ".", "Context", ",", "c", "Call", ",", "wr", "io", ".", "Writer", ")", "error", "{", "var", "opts", "batchOptions", "\n", "if", "err", ":=", "unmarshalOptions", "(", "c", ...
// batch submits a batch of payments as fast as it can.
[ "batch", "submits", "a", "batch", "of", "payments", "as", "fast", "as", "it", "can", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/client/wallet_api_handler.go#L141-L162
159,472
keybase/client
go/client/wallet_api_handler.go
cancelPayment
func (w *walletAPIHandler) cancelPayment(ctx context.Context, c Call, wr io.Writer) error { var opts txIDOptions if err := unmarshalOptions(c, &opts); err != nil { return w.encodeErr(c, err, wr) } result, err := w.cli.ClaimCLILocal(ctx, stellar1.ClaimCLILocalArg{TxID: opts.TxID}) if err != nil { return w.encod...
go
func (w *walletAPIHandler) cancelPayment(ctx context.Context, c Call, wr io.Writer) error { var opts txIDOptions if err := unmarshalOptions(c, &opts); err != nil { return w.encodeErr(c, err, wr) } result, err := w.cli.ClaimCLILocal(ctx, stellar1.ClaimCLILocalArg{TxID: opts.TxID}) if err != nil { return w.encod...
[ "func", "(", "w", "*", "walletAPIHandler", ")", "cancelPayment", "(", "ctx", "context", ".", "Context", ",", "c", "Call", ",", "wr", "io", ".", "Writer", ")", "error", "{", "var", "opts", "txIDOptions", "\n", "if", "err", ":=", "unmarshalOptions", "(", ...
// cancelPayment cancels a pending relay payment and yanks back the funds.
[ "cancelPayment", "cancels", "a", "pending", "relay", "payment", "and", "yanks", "back", "the", "funds", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/client/wallet_api_handler.go#L165-L175
159,473
keybase/client
go/client/wallet_api_handler.go
details
func (w *walletAPIHandler) details(ctx context.Context, c Call, wr io.Writer) error { var opts txIDOptions if err := unmarshalOptions(c, &opts); err != nil { return w.encodeErr(c, err, wr) } detail, err := w.cli.PaymentDetailCLILocal(ctx, opts.TxID) if err != nil { return w.encodeErr(c, err, wr) } return w.e...
go
func (w *walletAPIHandler) details(ctx context.Context, c Call, wr io.Writer) error { var opts txIDOptions if err := unmarshalOptions(c, &opts); err != nil { return w.encodeErr(c, err, wr) } detail, err := w.cli.PaymentDetailCLILocal(ctx, opts.TxID) if err != nil { return w.encodeErr(c, err, wr) } return w.e...
[ "func", "(", "w", "*", "walletAPIHandler", ")", "details", "(", "ctx", "context", ".", "Context", ",", "c", "Call", ",", "wr", "io", ".", "Writer", ")", "error", "{", "var", "opts", "txIDOptions", "\n", "if", "err", ":=", "unmarshalOptions", "(", "c", ...
// details outputs details for a single transaction.
[ "details", "outputs", "details", "for", "a", "single", "transaction", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/client/wallet_api_handler.go#L178-L188
159,474
keybase/client
go/client/wallet_api_handler.go
getInflation
func (w *walletAPIHandler) getInflation(ctx context.Context, c Call, wr io.Writer) error { var opts accountIDOptions if err := unmarshalOptions(c, &opts); err != nil { return w.encodeErr(c, err, wr) } inflation, err := w.getInflationLocal(ctx, opts.Convert()) if err != nil { return w.encodeErr(c, err, wr) } ...
go
func (w *walletAPIHandler) getInflation(ctx context.Context, c Call, wr io.Writer) error { var opts accountIDOptions if err := unmarshalOptions(c, &opts); err != nil { return w.encodeErr(c, err, wr) } inflation, err := w.getInflationLocal(ctx, opts.Convert()) if err != nil { return w.encodeErr(c, err, wr) } ...
[ "func", "(", "w", "*", "walletAPIHandler", ")", "getInflation", "(", "ctx", "context", ".", "Context", ",", "c", "Call", ",", "wr", "io", ".", "Writer", ")", "error", "{", "var", "opts", "accountIDOptions", "\n", "if", "err", ":=", "unmarshalOptions", "(...
// getInflation gets the inflation destination for an account.
[ "getInflation", "gets", "the", "inflation", "destination", "for", "an", "account", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/client/wallet_api_handler.go#L191-L203
159,475
keybase/client
go/client/wallet_api_handler.go
history
func (w *walletAPIHandler) history(ctx context.Context, c Call, wr io.Writer) error { var opts accountIDOptions if err := unmarshalOptions(c, &opts); err != nil { return w.encodeErr(c, err, wr) } a := opts.Convert() payments, err := w.cli.RecentPaymentsCLILocal(ctx, &a) if err != nil { return w.encodeErr(c, e...
go
func (w *walletAPIHandler) history(ctx context.Context, c Call, wr io.Writer) error { var opts accountIDOptions if err := unmarshalOptions(c, &opts); err != nil { return w.encodeErr(c, err, wr) } a := opts.Convert() payments, err := w.cli.RecentPaymentsCLILocal(ctx, &a) if err != nil { return w.encodeErr(c, e...
[ "func", "(", "w", "*", "walletAPIHandler", ")", "history", "(", "ctx", "context", ".", "Context", ",", "c", "Call", ",", "wr", "io", ".", "Writer", ")", "error", "{", "var", "opts", "accountIDOptions", "\n", "if", "err", ":=", "unmarshalOptions", "(", ...
// history outputs recent payment history for the specified account ID.
[ "history", "outputs", "recent", "payment", "history", "for", "the", "specified", "account", "ID", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/client/wallet_api_handler.go#L206-L217
159,476
keybase/client
go/client/wallet_api_handler.go
lookup
func (w *walletAPIHandler) lookup(ctx context.Context, c Call, wr io.Writer) error { var opts nameOptions if err := unmarshalOptions(c, &opts); err != nil { return w.encodeErr(c, err, wr) } if err := w.registerIdentifyUI(); err != nil { return w.encodeErr(c, err, wr) } result, err := w.cli.LookupCLILocal(ctx...
go
func (w *walletAPIHandler) lookup(ctx context.Context, c Call, wr io.Writer) error { var opts nameOptions if err := unmarshalOptions(c, &opts); err != nil { return w.encodeErr(c, err, wr) } if err := w.registerIdentifyUI(); err != nil { return w.encodeErr(c, err, wr) } result, err := w.cli.LookupCLILocal(ctx...
[ "func", "(", "w", "*", "walletAPIHandler", ")", "lookup", "(", "ctx", "context", ".", "Context", ",", "c", "Call", ",", "wr", "io", ".", "Writer", ")", "error", "{", "var", "opts", "nameOptions", "\n", "if", "err", ":=", "unmarshalOptions", "(", "c", ...
// lookup outputs an account ID for a keybase username or federation address.
[ "lookup", "outputs", "an", "account", "ID", "for", "a", "keybase", "username", "or", "federation", "address", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/client/wallet_api_handler.go#L230-L244
159,477
keybase/client
go/client/wallet_api_handler.go
send
func (w *walletAPIHandler) send(ctx context.Context, c Call, wr io.Writer) error { var opts sendOptions if err := unmarshalOptions(c, &opts); err != nil { return w.encodeErr(c, err, wr) } if err := w.registerIdentifyUI(); err != nil { return w.encodeErr(c, err, wr) } // convert the amount if necessary amou...
go
func (w *walletAPIHandler) send(ctx context.Context, c Call, wr io.Writer) error { var opts sendOptions if err := unmarshalOptions(c, &opts); err != nil { return w.encodeErr(c, err, wr) } if err := w.registerIdentifyUI(); err != nil { return w.encodeErr(c, err, wr) } // convert the amount if necessary amou...
[ "func", "(", "w", "*", "walletAPIHandler", ")", "send", "(", "ctx", "context", ".", "Context", ",", "c", "Call", ",", "wr", "io", ".", "Writer", ")", "error", "{", "var", "opts", "sendOptions", "\n", "if", "err", ":=", "unmarshalOptions", "(", "c", "...
// send sends XLM to an account.
[ "send", "sends", "XLM", "to", "an", "account", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/client/wallet_api_handler.go#L247-L294
159,478
keybase/client
go/client/wallet_api_handler.go
setInflation
func (w *walletAPIHandler) setInflation(ctx context.Context, c Call, wr io.Writer) error { var opts inflationOptions if err := unmarshalOptions(c, &opts); err != nil { return w.encodeErr(c, err, wr) } destination, err := getInflationDestinationAddrFromString(w.cli, opts.AccountIDConvert(), opts.Destination) if ...
go
func (w *walletAPIHandler) setInflation(ctx context.Context, c Call, wr io.Writer) error { var opts inflationOptions if err := unmarshalOptions(c, &opts); err != nil { return w.encodeErr(c, err, wr) } destination, err := getInflationDestinationAddrFromString(w.cli, opts.AccountIDConvert(), opts.Destination) if ...
[ "func", "(", "w", "*", "walletAPIHandler", ")", "setInflation", "(", "ctx", "context", ".", "Context", ",", "c", "Call", ",", "wr", "io", ".", "Writer", ")", "error", "{", "var", "opts", "inflationOptions", "\n", "if", "err", ":=", "unmarshalOptions", "(...
// setInflation sets the inflation destination for an account.
[ "setInflation", "sets", "the", "inflation", "destination", "for", "an", "account", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/client/wallet_api_handler.go#L297-L323
159,479
keybase/client
go/client/wallet_api_handler.go
Check
func (c *accountIDOptions) Check() error { _, err := strkey.Decode(strkey.VersionByteAccountID, c.AccountID) if err != nil { return ErrInvalidAccountID } return nil }
go
func (c *accountIDOptions) Check() error { _, err := strkey.Decode(strkey.VersionByteAccountID, c.AccountID) if err != nil { return ErrInvalidAccountID } return nil }
[ "func", "(", "c", "*", "accountIDOptions", ")", "Check", "(", ")", "error", "{", "_", ",", "err", ":=", "strkey", ".", "Decode", "(", "strkey", ".", "VersionByteAccountID", ",", "c", ".", "AccountID", ")", "\n", "if", "err", "!=", "nil", "{", "return...
// Check makes sure that AccountID exists and is valid.
[ "Check", "makes", "sure", "that", "AccountID", "exists", "and", "is", "valid", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/client/wallet_api_handler.go#L364-L370
159,480
keybase/client
go/client/wallet_api_handler.go
Check
func (c *txIDOptions) Check() error { if len(c.TxID) != 64 { return ErrInvalidTxID } if _, err := hex.DecodeString(c.TxID); err != nil { return ErrInvalidTxID } return nil }
go
func (c *txIDOptions) Check() error { if len(c.TxID) != 64 { return ErrInvalidTxID } if _, err := hex.DecodeString(c.TxID); err != nil { return ErrInvalidTxID } return nil }
[ "func", "(", "c", "*", "txIDOptions", ")", "Check", "(", ")", "error", "{", "if", "len", "(", "c", ".", "TxID", ")", "!=", "64", "{", "return", "ErrInvalidTxID", "\n", "}", "\n", "if", "_", ",", "err", ":=", "hex", ".", "DecodeString", "(", "c", ...
// Check makes sure that TxID exists and is valid.
[ "Check", "makes", "sure", "that", "TxID", "exists", "and", "is", "valid", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/client/wallet_api_handler.go#L382-L390
159,481
keybase/client
go/client/wallet_api_handler.go
Check
func (c *inflationOptions) Check() error { _, err := strkey.Decode(strkey.VersionByteAccountID, c.AccountID) if err != nil { return ErrInvalidAccountID } if c.Destination == "" { return ErrDestinationMissing } return nil }
go
func (c *inflationOptions) Check() error { _, err := strkey.Decode(strkey.VersionByteAccountID, c.AccountID) if err != nil { return ErrInvalidAccountID } if c.Destination == "" { return ErrDestinationMissing } return nil }
[ "func", "(", "c", "*", "inflationOptions", ")", "Check", "(", ")", "error", "{", "_", ",", "err", ":=", "strkey", ".", "Decode", "(", "strkey", ".", "VersionByteAccountID", ",", "c", ".", "AccountID", ")", "\n", "if", "err", "!=", "nil", "{", "return...
// Check makes sure that AccountID is valid and that Destination isn't empty.
[ "Check", "makes", "sure", "that", "AccountID", "is", "valid", "and", "that", "Destination", "isn", "t", "empty", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/client/wallet_api_handler.go#L412-L422
159,482
keybase/client
go/client/wallet_api_handler.go
Check
func (c *sendOptions) Check() error { if strings.TrimSpace(c.Recipient) == "" { return ErrRecipientMissing } if strings.TrimSpace(c.Amount) == "" { return ErrAmountMissing } namt, err := stellarnet.ParseStellarAmount(c.Amount) if err != nil { return ErrInvalidAmount } if namt < 0 { return ErrInvalidAmou...
go
func (c *sendOptions) Check() error { if strings.TrimSpace(c.Recipient) == "" { return ErrRecipientMissing } if strings.TrimSpace(c.Amount) == "" { return ErrAmountMissing } namt, err := stellarnet.ParseStellarAmount(c.Amount) if err != nil { return ErrInvalidAmount } if namt < 0 { return ErrInvalidAmou...
[ "func", "(", "c", "*", "sendOptions", ")", "Check", "(", ")", "error", "{", "if", "strings", ".", "TrimSpace", "(", "c", ".", "Recipient", ")", "==", "\"", "\"", "{", "return", "ErrRecipientMissing", "\n", "}", "\n", "if", "strings", ".", "TrimSpace", ...
// Check makes sure that the send options are valid.
[ "Check", "makes", "sure", "that", "the", "send", "options", "are", "valid", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/client/wallet_api_handler.go#L439-L465
159,483
keybase/client
go/client/wallet_api_handler.go
Check
func (c *batchOptions) Check() error { for i, p := range c.Payments { if strings.TrimSpace(p.Recipient) == "" { return fmt.Errorf("payment %d: %s", i, ErrRecipientMissing) } if strings.TrimSpace(p.Amount) == "" { return fmt.Errorf("payment %d: %s", i, ErrAmountMissing) } namt, err := stellarnet.ParseSt...
go
func (c *batchOptions) Check() error { for i, p := range c.Payments { if strings.TrimSpace(p.Recipient) == "" { return fmt.Errorf("payment %d: %s", i, ErrRecipientMissing) } if strings.TrimSpace(p.Amount) == "" { return fmt.Errorf("payment %d: %s", i, ErrAmountMissing) } namt, err := stellarnet.ParseSt...
[ "func", "(", "c", "*", "batchOptions", ")", "Check", "(", ")", "error", "{", "for", "i", ",", "p", ":=", "range", "c", ".", "Payments", "{", "if", "strings", ".", "TrimSpace", "(", "p", ".", "Recipient", ")", "==", "\"", "\"", "{", "return", "fmt...
// Check makes sure that the batch options are valid.
[ "Check", "makes", "sure", "that", "the", "batch", "options", "are", "valid", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/client/wallet_api_handler.go#L481-L506
159,484
keybase/client
go/kbfs/libkbfs/cr_chains.go
addNoopChain
func (ccs *crChains) addNoopChain(ptr data.BlockPointer) { if _, ok := ccs.byMostRecent[ptr]; ok { return } if _, ok := ccs.byOriginal[ptr]; ok { return } if _, ok := ccs.originals[ptr]; ok { return } chain := &crChain{original: ptr, mostRecent: ptr} ccs.byOriginal[ptr] = chain ccs.byMostRecent[ptr] = ch...
go
func (ccs *crChains) addNoopChain(ptr data.BlockPointer) { if _, ok := ccs.byMostRecent[ptr]; ok { return } if _, ok := ccs.byOriginal[ptr]; ok { return } if _, ok := ccs.originals[ptr]; ok { return } chain := &crChain{original: ptr, mostRecent: ptr} ccs.byOriginal[ptr] = chain ccs.byMostRecent[ptr] = ch...
[ "func", "(", "ccs", "*", "crChains", ")", "addNoopChain", "(", "ptr", "data", ".", "BlockPointer", ")", "{", "if", "_", ",", "ok", ":=", "ccs", ".", "byMostRecent", "[", "ptr", "]", ";", "ok", "{", "return", "\n", "}", "\n", "if", "_", ",", "ok",...
// addNoopChain adds a new chain with no ops to the chains struct, if // that pointer isn't involved in any chains yet.
[ "addNoopChain", "adds", "a", "new", "chain", "with", "no", "ops", "to", "the", "chains", "struct", "if", "that", "pointer", "isn", "t", "involved", "in", "any", "chains", "yet", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/cr_chains.go#L460-L473
159,485
keybase/client
go/kbfs/libkbfs/cr_chains.go
makeChainForNewOp
func (ccs *crChains) makeChainForNewOp(targetPtr data.BlockPointer, newOp op) error { switch realOp := newOp.(type) { case *createOp: return ccs.makeChainForNewOpWithUpdate(targetPtr, newOp, &realOp.Dir) case *rmOp: return ccs.makeChainForNewOpWithUpdate(targetPtr, newOp, &realOp.Dir) case *renameOp: // In th...
go
func (ccs *crChains) makeChainForNewOp(targetPtr data.BlockPointer, newOp op) error { switch realOp := newOp.(type) { case *createOp: return ccs.makeChainForNewOpWithUpdate(targetPtr, newOp, &realOp.Dir) case *rmOp: return ccs.makeChainForNewOpWithUpdate(targetPtr, newOp, &realOp.Dir) case *renameOp: // In th...
[ "func", "(", "ccs", "*", "crChains", ")", "makeChainForNewOp", "(", "targetPtr", "data", ".", "BlockPointer", ",", "newOp", "op", ")", "error", "{", "switch", "realOp", ":=", "newOp", ".", "(", "type", ")", "{", "case", "*", "createOp", ":", "return", ...
// makeChainForNewOp makes a new chain for an op that does not yet // have its pointers initialized. It does so by setting Unref and Ref // to be the same for the duration of this function, and calling the // usual makeChainForOp method. This function is not goroutine-safe // with respect to newOp. Also note that re...
[ "makeChainForNewOp", "makes", "a", "new", "chain", "for", "an", "op", "that", "does", "not", "yet", "have", "its", "pointers", "initialized", ".", "It", "does", "so", "by", "setting", "Unref", "and", "Ref", "to", "be", "the", "same", "for", "the", "durat...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/cr_chains.go#L718-L755
159,486
keybase/client
go/kbfs/libkbfs/cr_chains.go
newCRChains
func newCRChains( ctx context.Context, codec kbfscodec.Codec, osg idutil.OfflineStatusGetter, chainMDs []chainMetadata, fbo *folderBlockOps, identifyTypes bool) ( ccs *crChains, err error) { ccs = newCRChainsEmpty() // For each MD update, turn each update in each op into map // entries and create chains for the ...
go
func newCRChains( ctx context.Context, codec kbfscodec.Codec, osg idutil.OfflineStatusGetter, chainMDs []chainMetadata, fbo *folderBlockOps, identifyTypes bool) ( ccs *crChains, err error) { ccs = newCRChainsEmpty() // For each MD update, turn each update in each op into map // entries and create chains for the ...
[ "func", "newCRChains", "(", "ctx", "context", ".", "Context", ",", "codec", "kbfscodec", ".", "Codec", ",", "osg", "idutil", ".", "OfflineStatusGetter", ",", "chainMDs", "[", "]", "chainMetadata", ",", "fbo", "*", "folderBlockOps", ",", "identifyTypes", "bool"...
// newCRChains builds a new crChains object from the given list of // chainMetadatas, which must be non-empty.
[ "newCRChains", "builds", "a", "new", "crChains", "object", "from", "the", "given", "list", "of", "chainMetadatas", "which", "must", "be", "non", "-", "empty", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/cr_chains.go#L880-L972
159,487
keybase/client
go/kbfs/libkbfs/cr_chains.go
newCRChainsForIRMDs
func newCRChainsForIRMDs( ctx context.Context, codec kbfscodec.Codec, osg idutil.OfflineStatusGetter, irmds []ImmutableRootMetadata, fbo *folderBlockOps, identifyTypes bool) (ccs *crChains, err error) { chainMDs := make([]chainMetadata, len(irmds)) for i, irmd := range irmds { chainMDs[i] = irmd } return newCR...
go
func newCRChainsForIRMDs( ctx context.Context, codec kbfscodec.Codec, osg idutil.OfflineStatusGetter, irmds []ImmutableRootMetadata, fbo *folderBlockOps, identifyTypes bool) (ccs *crChains, err error) { chainMDs := make([]chainMetadata, len(irmds)) for i, irmd := range irmds { chainMDs[i] = irmd } return newCR...
[ "func", "newCRChainsForIRMDs", "(", "ctx", "context", ".", "Context", ",", "codec", "kbfscodec", ".", "Codec", ",", "osg", "idutil", ".", "OfflineStatusGetter", ",", "irmds", "[", "]", "ImmutableRootMetadata", ",", "fbo", "*", "folderBlockOps", ",", "identifyTyp...
// newCRChainsForIRMDs simply builds a list of chainMetadatas from the // given list of ImmutableRootMetadatas and calls newCRChains with it.
[ "newCRChainsForIRMDs", "simply", "builds", "a", "list", "of", "chainMetadatas", "from", "the", "given", "list", "of", "ImmutableRootMetadatas", "and", "calls", "newCRChains", "with", "it", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/cr_chains.go#L976-L985
159,488
keybase/client
go/kbfs/libkbfs/cr_chains.go
copyOpAndRevertUnrefsToOriginals
func (ccs *crChains) copyOpAndRevertUnrefsToOriginals(currOp op) op { var unrefs []*data.BlockPointer var newOp op switch realOp := currOp.(type) { case *createOp: newCreateOp := *realOp unrefs = append(unrefs, &newCreateOp.Dir.Unref) newOp = &newCreateOp case *rmOp: newRmOp := *realOp unrefs = append(un...
go
func (ccs *crChains) copyOpAndRevertUnrefsToOriginals(currOp op) op { var unrefs []*data.BlockPointer var newOp op switch realOp := currOp.(type) { case *createOp: newCreateOp := *realOp unrefs = append(unrefs, &newCreateOp.Dir.Unref) newOp = &newCreateOp case *rmOp: newRmOp := *realOp unrefs = append(un...
[ "func", "(", "ccs", "*", "crChains", ")", "copyOpAndRevertUnrefsToOriginals", "(", "currOp", "op", ")", "op", "{", "var", "unrefs", "[", "]", "*", "data", ".", "BlockPointer", "\n", "var", "newOp", "op", "\n", "switch", "realOp", ":=", "currOp", ".", "("...
// copyOpAndRevertUnrefsToOriginals returns a shallow copy of the op, // modifying each custom BlockPointer field to reference the original // version of the corresponding blocks.
[ "copyOpAndRevertUnrefsToOriginals", "returns", "a", "shallow", "copy", "of", "the", "op", "modifying", "each", "custom", "BlockPointer", "field", "to", "reference", "the", "original", "version", "of", "the", "corresponding", "blocks", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/cr_chains.go#L1030-L1074
159,489
keybase/client
go/kbfs/libkbfs/cr_chains.go
changeOriginal
func (ccs *crChains) changeOriginal(oldOriginal data.BlockPointer, newOriginal data.BlockPointer) error { if oldOriginal == newOriginal { // This apparently can happen, but I'm not sure how. (See // KBFS-2946.) Maybe because of a self-conflict in some weird // error conditions. In this case, we can just prete...
go
func (ccs *crChains) changeOriginal(oldOriginal data.BlockPointer, newOriginal data.BlockPointer) error { if oldOriginal == newOriginal { // This apparently can happen, but I'm not sure how. (See // KBFS-2946.) Maybe because of a self-conflict in some weird // error conditions. In this case, we can just prete...
[ "func", "(", "ccs", "*", "crChains", ")", "changeOriginal", "(", "oldOriginal", "data", ".", "BlockPointer", ",", "newOriginal", "data", ".", "BlockPointer", ")", "error", "{", "if", "oldOriginal", "==", "newOriginal", "{", "// This apparently can happen, but I'm no...
// changeOriginal converts the original of a chain to a different // original, which originated in some other branch.
[ "changeOriginal", "converts", "the", "original", "of", "a", "chain", "to", "a", "different", "original", "which", "originated", "in", "some", "other", "branch", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/cr_chains.go#L1078-L1129
159,490
keybase/client
go/kbfs/libkbfs/cr_chains.go
remove
func (ccs *crChains) remove(ctx context.Context, log logger.Logger, revision kbfsmd.Revision) []*crChain { var chainsWithRemovals []*crChain for _, chain := range ccs.byOriginal { if chain.remove(ctx, log, revision) { chainsWithRemovals = append(chainsWithRemovals, chain) } } return chainsWithRemovals }
go
func (ccs *crChains) remove(ctx context.Context, log logger.Logger, revision kbfsmd.Revision) []*crChain { var chainsWithRemovals []*crChain for _, chain := range ccs.byOriginal { if chain.remove(ctx, log, revision) { chainsWithRemovals = append(chainsWithRemovals, chain) } } return chainsWithRemovals }
[ "func", "(", "ccs", "*", "crChains", ")", "remove", "(", "ctx", "context", ".", "Context", ",", "log", "logger", ".", "Logger", ",", "revision", "kbfsmd", ".", "Revision", ")", "[", "]", "*", "crChain", "{", "var", "chainsWithRemovals", "[", "]", "*", ...
// remove deletes all operations associated with the given revision // from the chains. It leaves original block pointers in place // though, even when removing operations from the head of the chain. // It returns the set of chains with at least one operation removed.
[ "remove", "deletes", "all", "operations", "associated", "with", "the", "given", "revision", "from", "the", "chains", ".", "It", "leaves", "original", "block", "pointers", "in", "place", "though", "even", "when", "removing", "operations", "from", "the", "head", ...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/cr_chains.go#L1352-L1361
159,491
keybase/client
go/engine/bootstrap.go
NewBootstrap
func NewBootstrap(g *libkb.GlobalContext) *Bootstrap { return &Bootstrap{ Contextified: libkb.NewContextified(g), } }
go
func NewBootstrap(g *libkb.GlobalContext) *Bootstrap { return &Bootstrap{ Contextified: libkb.NewContextified(g), } }
[ "func", "NewBootstrap", "(", "g", "*", "libkb", ".", "GlobalContext", ")", "*", "Bootstrap", "{", "return", "&", "Bootstrap", "{", "Contextified", ":", "libkb", ".", "NewContextified", "(", "g", ")", ",", "}", "\n", "}" ]
// NewBootstrap creates a Bootstrap engine.
[ "NewBootstrap", "creates", "a", "Bootstrap", "engine", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/engine/bootstrap.go#L22-L26
159,492
keybase/client
go/engine/bootstrap.go
signedUp
func (e *Bootstrap) signedUp(m libkb.MetaContext) bool { cr := m.G().Env.GetConfig() if cr == nil { return false } if uid := cr.GetUID(); uid.Exists() { return true } return false }
go
func (e *Bootstrap) signedUp(m libkb.MetaContext) bool { cr := m.G().Env.GetConfig() if cr == nil { return false } if uid := cr.GetUID(); uid.Exists() { return true } return false }
[ "func", "(", "e", "*", "Bootstrap", ")", "signedUp", "(", "m", "libkb", ".", "MetaContext", ")", "bool", "{", "cr", ":=", "m", ".", "G", "(", ")", ".", "Env", ".", "GetConfig", "(", ")", "\n", "if", "cr", "==", "nil", "{", "return", "false", "\...
// signedUp is true if there's a uid in config.json.
[ "signedUp", "is", "true", "if", "there", "s", "a", "uid", "in", "config", ".", "json", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/engine/bootstrap.go#L131-L140
159,493
keybase/client
go/kbfs/libkbfs/config_local.go
Set
func (m *DiskCacheMode) Set(s string) error { *m = DiskCacheModeOff switch strings.ToLower(strings.TrimSpace(s)) { case "local": *m = DiskCacheModeLocal case "remote": *m = DiskCacheModeRemote } return nil }
go
func (m *DiskCacheMode) Set(s string) error { *m = DiskCacheModeOff switch strings.ToLower(strings.TrimSpace(s)) { case "local": *m = DiskCacheModeLocal case "remote": *m = DiskCacheModeRemote } return nil }
[ "func", "(", "m", "*", "DiskCacheMode", ")", "Set", "(", "s", "string", ")", "error", "{", "*", "m", "=", "DiskCacheModeOff", "\n", "switch", "strings", ".", "ToLower", "(", "strings", ".", "TrimSpace", "(", "s", ")", ")", "{", "case", "\"", "\"", ...
// Set parses a string representing a disk block cache initialization mode, // and outputs the mode value corresponding to that string. Defaults to // DiskCacheModeOff.
[ "Set", "parses", "a", "string", "representing", "a", "disk", "block", "cache", "initialization", "mode", "and", "outputs", "the", "mode", "value", "corresponding", "to", "that", "string", ".", "Defaults", "to", "DiskCacheModeOff", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L191-L200
159,494
keybase/client
go/kbfs/libkbfs/config_local.go
KBFSOps
func (c *ConfigLocal) KBFSOps() KBFSOps { c.lock.RLock() defer c.lock.RUnlock() return c.kbfs }
go
func (c *ConfigLocal) KBFSOps() KBFSOps { c.lock.RLock() defer c.lock.RUnlock() return c.kbfs }
[ "func", "(", "c", "*", "ConfigLocal", ")", "KBFSOps", "(", ")", "KBFSOps", "{", "c", ".", "lock", ".", "RLock", "(", ")", "\n", "defer", "c", ".", "lock", ".", "RUnlock", "(", ")", "\n", "return", "c", ".", "kbfs", "\n", "}" ]
// KBFSOps implements the Config interface for ConfigLocal.
[ "KBFSOps", "implements", "the", "Config", "interface", "for", "ConfigLocal", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L298-L302
159,495
keybase/client
go/kbfs/libkbfs/config_local.go
SetKBFSOps
func (c *ConfigLocal) SetKBFSOps(k KBFSOps) { c.lock.Lock() defer c.lock.Unlock() c.kbfs = k }
go
func (c *ConfigLocal) SetKBFSOps(k KBFSOps) { c.lock.Lock() defer c.lock.Unlock() c.kbfs = k }
[ "func", "(", "c", "*", "ConfigLocal", ")", "SetKBFSOps", "(", "k", "KBFSOps", ")", "{", "c", ".", "lock", ".", "Lock", "(", ")", "\n", "defer", "c", ".", "lock", ".", "Unlock", "(", ")", "\n", "c", ".", "kbfs", "=", "k", "\n", "}" ]
// SetKBFSOps implements the Config interface for ConfigLocal.
[ "SetKBFSOps", "implements", "the", "Config", "interface", "for", "ConfigLocal", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L305-L309
159,496
keybase/client
go/kbfs/libkbfs/config_local.go
KBPKI
func (c *ConfigLocal) KBPKI() KBPKI { c.lock.RLock() defer c.lock.RUnlock() return c.kbpki }
go
func (c *ConfigLocal) KBPKI() KBPKI { c.lock.RLock() defer c.lock.RUnlock() return c.kbpki }
[ "func", "(", "c", "*", "ConfigLocal", ")", "KBPKI", "(", ")", "KBPKI", "{", "c", ".", "lock", ".", "RLock", "(", ")", "\n", "defer", "c", ".", "lock", ".", "RUnlock", "(", ")", "\n", "return", "c", ".", "kbpki", "\n", "}" ]
// KBPKI implements the Config interface for ConfigLocal.
[ "KBPKI", "implements", "the", "Config", "interface", "for", "ConfigLocal", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L312-L316
159,497
keybase/client
go/kbfs/libkbfs/config_local.go
CurrentSessionGetter
func (c *ConfigLocal) CurrentSessionGetter() idutil.CurrentSessionGetter { c.lock.RLock() defer c.lock.RUnlock() return c.kbpki }
go
func (c *ConfigLocal) CurrentSessionGetter() idutil.CurrentSessionGetter { c.lock.RLock() defer c.lock.RUnlock() return c.kbpki }
[ "func", "(", "c", "*", "ConfigLocal", ")", "CurrentSessionGetter", "(", ")", "idutil", ".", "CurrentSessionGetter", "{", "c", ".", "lock", ".", "RLock", "(", ")", "\n", "defer", "c", ".", "lock", ".", "RUnlock", "(", ")", "\n", "return", "c", ".", "k...
// CurrentSessionGetter implements the Config interface for ConfigLocal.
[ "CurrentSessionGetter", "implements", "the", "Config", "interface", "for", "ConfigLocal", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L319-L323
159,498
keybase/client
go/kbfs/libkbfs/config_local.go
SetKBPKI
func (c *ConfigLocal) SetKBPKI(k KBPKI) { c.lock.Lock() defer c.lock.Unlock() c.kbpki = k }
go
func (c *ConfigLocal) SetKBPKI(k KBPKI) { c.lock.Lock() defer c.lock.Unlock() c.kbpki = k }
[ "func", "(", "c", "*", "ConfigLocal", ")", "SetKBPKI", "(", "k", "KBPKI", ")", "{", "c", ".", "lock", ".", "Lock", "(", ")", "\n", "defer", "c", ".", "lock", ".", "Unlock", "(", ")", "\n", "c", ".", "kbpki", "=", "k", "\n", "}" ]
// SetKBPKI implements the Config interface for ConfigLocal.
[ "SetKBPKI", "implements", "the", "Config", "interface", "for", "ConfigLocal", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L326-L330
159,499
keybase/client
go/kbfs/libkbfs/config_local.go
KeyManager
func (c *ConfigLocal) KeyManager() KeyManager { c.lock.RLock() defer c.lock.RUnlock() return c.keyman }
go
func (c *ConfigLocal) KeyManager() KeyManager { c.lock.RLock() defer c.lock.RUnlock() return c.keyman }
[ "func", "(", "c", "*", "ConfigLocal", ")", "KeyManager", "(", ")", "KeyManager", "{", "c", ".", "lock", ".", "RLock", "(", ")", "\n", "defer", "c", ".", "lock", ".", "RUnlock", "(", ")", "\n", "return", "c", ".", "keyman", "\n", "}" ]
// KeyManager implements the Config interface for ConfigLocal.
[ "KeyManager", "implements", "the", "Config", "interface", "for", "ConfigLocal", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L333-L337