id int32 0 167k | repo stringlengths 5 54 | path stringlengths 4 155 | func_name stringlengths 1 118 | original_string stringlengths 52 85.5k | language stringclasses 1
value | code stringlengths 52 85.5k | code_tokens listlengths 21 1.41k | docstring stringlengths 6 2.61k | docstring_tokens listlengths 3 215 | sha stringlengths 40 40 | url stringlengths 85 252 |
|---|---|---|---|---|---|---|---|---|---|---|---|
161,100 | keybase/client | go/libkb/assertion.go | MatchProof | func (a AssertionFingerprint) MatchProof(proof Proof) bool {
v1, v2 := strings.ToLower(proof.Value), a.Value
l1, l2 := len(v1), len(v2)
if l2 > l1 {
return false
}
// Match the suffixes of the fingerprint
return (v1[(l1-l2):] == v2)
} | go | func (a AssertionFingerprint) MatchProof(proof Proof) bool {
v1, v2 := strings.ToLower(proof.Value), a.Value
l1, l2 := len(v1), len(v2)
if l2 > l1 {
return false
}
// Match the suffixes of the fingerprint
return (v1[(l1-l2):] == v2)
} | [
"func",
"(",
"a",
"AssertionFingerprint",
")",
"MatchProof",
"(",
"proof",
"Proof",
")",
"bool",
"{",
"v1",
",",
"v2",
":=",
"strings",
".",
"ToLower",
"(",
"proof",
".",
"Value",
")",
",",
"a",
".",
"Value",
"\n",
"l1",
",",
"l2",
":=",
"len",
"("... | // Fingerprint matching is on the suffixes. If the assertion matches
// any suffix of the proof, then we're OK | [
"Fingerprint",
"matching",
"is",
"on",
"the",
"suffixes",
".",
"If",
"the",
"assertion",
"matches",
"any",
"suffix",
"of",
"the",
"proof",
"then",
"we",
"re",
"OK"
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/assertion.go#L280-L288 |
161,101 | keybase/client | go/libkb/assertion.go | ParseImplicitTeamDisplayName | func ParseImplicitTeamDisplayName(ctx AssertionContext, s string, isPublic bool) (ret keybase1.ImplicitTeamDisplayName, err error) {
// Turn the whole string tolower
s = strings.ToLower(s)
split1 := strings.SplitN(s, " ", 2) // split1: [assertions, ?conflict]
split2 := strings.Split(split1[0], "#") // split2: ... | go | func ParseImplicitTeamDisplayName(ctx AssertionContext, s string, isPublic bool) (ret keybase1.ImplicitTeamDisplayName, err error) {
// Turn the whole string tolower
s = strings.ToLower(s)
split1 := strings.SplitN(s, " ", 2) // split1: [assertions, ?conflict]
split2 := strings.Split(split1[0], "#") // split2: ... | [
"func",
"ParseImplicitTeamDisplayName",
"(",
"ctx",
"AssertionContext",
",",
"s",
"string",
",",
"isPublic",
"bool",
")",
"(",
"ret",
"keybase1",
".",
"ImplicitTeamDisplayName",
",",
"err",
"error",
")",
"{",
"// Turn the whole string tolower",
"s",
"=",
"strings",
... | // Parse a name like "mlsteele,malgorithms@twitter#bot (conflicted copy 2017-03-04 #2)" | [
"Parse",
"a",
"name",
"like",
"mlsteele",
"malgorithms"
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/assertion.go#L785-L832 |
161,102 | keybase/client | go/kbfs/data/dir_entry.go | DirEntryMapToDirEntries | func DirEntryMapToDirEntries(entryMap map[string]DirEntry) DirEntries {
dirEntries := make(DirEntries, 0, len(entryMap))
for name, entry := range entryMap {
dirEntries = append(dirEntries, DirEntryWithName{entry, name})
}
return dirEntries
} | go | func DirEntryMapToDirEntries(entryMap map[string]DirEntry) DirEntries {
dirEntries := make(DirEntries, 0, len(entryMap))
for name, entry := range entryMap {
dirEntries = append(dirEntries, DirEntryWithName{entry, name})
}
return dirEntries
} | [
"func",
"DirEntryMapToDirEntries",
"(",
"entryMap",
"map",
"[",
"string",
"]",
"DirEntry",
")",
"DirEntries",
"{",
"dirEntries",
":=",
"make",
"(",
"DirEntries",
",",
"0",
",",
"len",
"(",
"entryMap",
")",
")",
"\n",
"for",
"name",
",",
"entry",
":=",
"r... | // DirEntryMapToDirEntries returns a `DirEntries` slice of all the
// entries in the given map. | [
"DirEntryMapToDirEntries",
"returns",
"a",
"DirEntries",
"slice",
"of",
"all",
"the",
"entries",
"in",
"the",
"given",
"map",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/data/dir_entry.go#L52-L58 |
161,103 | keybase/client | go/kbfs/libkbfs/journal_manager_util.go | GetJournalManager | func GetJournalManager(config Config) (*JournalManager, error) {
bserver := config.BlockServer()
jbserver, ok := bserver.(journalBlockServer)
if !ok {
return nil, errors.New("Write journal not enabled")
}
return jbserver.jManager, nil
} | go | func GetJournalManager(config Config) (*JournalManager, error) {
bserver := config.BlockServer()
jbserver, ok := bserver.(journalBlockServer)
if !ok {
return nil, errors.New("Write journal not enabled")
}
return jbserver.jManager, nil
} | [
"func",
"GetJournalManager",
"(",
"config",
"Config",
")",
"(",
"*",
"JournalManager",
",",
"error",
")",
"{",
"bserver",
":=",
"config",
".",
"BlockServer",
"(",
")",
"\n",
"jbserver",
",",
"ok",
":=",
"bserver",
".",
"(",
"journalBlockServer",
")",
"\n",... | // GetJournalManager returns the JournalManager tied to a particular
// config. | [
"GetJournalManager",
"returns",
"the",
"JournalManager",
"tied",
"to",
"a",
"particular",
"config",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/journal_manager_util.go#L20-L27 |
161,104 | keybase/client | go/kbfs/libkbfs/journal_manager_util.go | TLFJournalEnabled | func TLFJournalEnabled(config Config, tlfID tlf.ID) bool {
if jManager, err := GetJournalManager(config); err == nil {
_, err := jManager.JournalStatus(tlfID)
return err == nil
}
return false
} | go | func TLFJournalEnabled(config Config, tlfID tlf.ID) bool {
if jManager, err := GetJournalManager(config); err == nil {
_, err := jManager.JournalStatus(tlfID)
return err == nil
}
return false
} | [
"func",
"TLFJournalEnabled",
"(",
"config",
"Config",
",",
"tlfID",
"tlf",
".",
"ID",
")",
"bool",
"{",
"if",
"jManager",
",",
"err",
":=",
"GetJournalManager",
"(",
"config",
")",
";",
"err",
"==",
"nil",
"{",
"_",
",",
"err",
":=",
"jManager",
".",
... | // TLFJournalEnabled returns true if journaling is enabled for the
// given TLF. | [
"TLFJournalEnabled",
"returns",
"true",
"if",
"journaling",
"is",
"enabled",
"for",
"the",
"given",
"TLF",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/journal_manager_util.go#L31-L37 |
161,105 | keybase/client | go/kbfs/libkbfs/journal_manager_util.go | WaitForTLFJournal | func WaitForTLFJournal(ctx context.Context, config Config, tlfID tlf.ID,
log logger.Logger) error {
if jManager, err := GetJournalManager(config); err == nil {
log.CDebugf(ctx, "Waiting for journal to flush")
if err := jManager.Wait(ctx, tlfID); err != nil {
return err
}
}
return nil
} | go | func WaitForTLFJournal(ctx context.Context, config Config, tlfID tlf.ID,
log logger.Logger) error {
if jManager, err := GetJournalManager(config); err == nil {
log.CDebugf(ctx, "Waiting for journal to flush")
if err := jManager.Wait(ctx, tlfID); err != nil {
return err
}
}
return nil
} | [
"func",
"WaitForTLFJournal",
"(",
"ctx",
"context",
".",
"Context",
",",
"config",
"Config",
",",
"tlfID",
"tlf",
".",
"ID",
",",
"log",
"logger",
".",
"Logger",
")",
"error",
"{",
"if",
"jManager",
",",
"err",
":=",
"GetJournalManager",
"(",
"config",
"... | // WaitForTLFJournal waits for the corresponding journal to flush, if
// one exists. | [
"WaitForTLFJournal",
"waits",
"for",
"the",
"corresponding",
"journal",
"to",
"flush",
"if",
"one",
"exists",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/journal_manager_util.go#L41-L50 |
161,106 | keybase/client | go/protocol/keybase1/account.go | PassphraseChange | func (c AccountClient) PassphraseChange(ctx context.Context, __arg PassphraseChangeArg) (err error) {
err = c.Cli.Call(ctx, "keybase.1.account.passphraseChange", []interface{}{__arg}, nil)
return
} | go | func (c AccountClient) PassphraseChange(ctx context.Context, __arg PassphraseChangeArg) (err error) {
err = c.Cli.Call(ctx, "keybase.1.account.passphraseChange", []interface{}{__arg}, nil)
return
} | [
"func",
"(",
"c",
"AccountClient",
")",
"PassphraseChange",
"(",
"ctx",
"context",
".",
"Context",
",",
"__arg",
"PassphraseChangeArg",
")",
"(",
"err",
"error",
")",
"{",
"err",
"=",
"c",
".",
"Cli",
".",
"Call",
"(",
"ctx",
",",
"\"",
"\"",
",",
"[... | // Change the passphrase from old to new. If old isn't set, and force is false,
// then prompt at the UI for it. If old isn't set and force is true, then
// we'll try to force a passphrase change. | [
"Change",
"the",
"passphrase",
"from",
"old",
"to",
"new",
".",
"If",
"old",
"isn",
"t",
"set",
"and",
"force",
"is",
"false",
"then",
"prompt",
"at",
"the",
"UI",
"for",
"it",
".",
"If",
"old",
"isn",
"t",
"set",
"and",
"force",
"is",
"true",
"the... | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/keybase1/account.go#L365-L368 |
161,107 | keybase/client | go/protocol/keybase1/account.go | ResetAccount | func (c AccountClient) ResetAccount(ctx context.Context, __arg ResetAccountArg) (err error) {
err = c.Cli.Call(ctx, "keybase.1.account.resetAccount", []interface{}{__arg}, nil)
return
} | go | func (c AccountClient) ResetAccount(ctx context.Context, __arg ResetAccountArg) (err error) {
err = c.Cli.Call(ctx, "keybase.1.account.resetAccount", []interface{}{__arg}, nil)
return
} | [
"func",
"(",
"c",
"AccountClient",
")",
"ResetAccount",
"(",
"ctx",
"context",
".",
"Context",
",",
"__arg",
"ResetAccountArg",
")",
"(",
"err",
"error",
")",
"{",
"err",
"=",
"c",
".",
"Cli",
".",
"Call",
"(",
"ctx",
",",
"\"",
"\"",
",",
"[",
"]"... | // resetAccount resets the user's account; it's meant only for devel and tests.
// passphrase is optional and will be prompted for if not supplied. | [
"resetAccount",
"resets",
"the",
"user",
"s",
"account",
";",
"it",
"s",
"meant",
"only",
"for",
"devel",
"and",
"tests",
".",
"passphrase",
"is",
"optional",
"and",
"will",
"be",
"prompted",
"for",
"if",
"not",
"supplied",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/keybase1/account.go#L399-L402 |
161,108 | keybase/client | go/protocol/keybase1/account.go | EnterResetPipeline | func (c AccountClient) EnterResetPipeline(ctx context.Context, __arg EnterResetPipelineArg) (err error) {
err = c.Cli.Call(ctx, "keybase.1.account.enterResetPipeline", []interface{}{__arg}, nil)
return
} | go | func (c AccountClient) EnterResetPipeline(ctx context.Context, __arg EnterResetPipelineArg) (err error) {
err = c.Cli.Call(ctx, "keybase.1.account.enterResetPipeline", []interface{}{__arg}, nil)
return
} | [
"func",
"(",
"c",
"AccountClient",
")",
"EnterResetPipeline",
"(",
"ctx",
"context",
".",
"Context",
",",
"__arg",
"EnterResetPipelineArg",
")",
"(",
"err",
"error",
")",
"{",
"err",
"=",
"c",
".",
"Cli",
".",
"Call",
"(",
"ctx",
",",
"\"",
"\"",
",",
... | // Start reset process for the user based on their username or email. If
// neither are known the user will be prompted for their passphrase to start
// the process. | [
"Start",
"reset",
"process",
"for",
"the",
"user",
"based",
"on",
"their",
"username",
"or",
"email",
".",
"If",
"neither",
"are",
"known",
"the",
"user",
"will",
"be",
"prompted",
"for",
"their",
"passphrase",
"to",
"start",
"the",
"process",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/keybase1/account.go#L428-L431 |
161,109 | keybase/client | go/protocol/keybase1/account.go | CancelReset | func (c AccountClient) CancelReset(ctx context.Context, sessionID int) (err error) {
__arg := CancelResetArg{SessionID: sessionID}
err = c.Cli.Call(ctx, "keybase.1.account.cancelReset", []interface{}{__arg}, nil)
return
} | go | func (c AccountClient) CancelReset(ctx context.Context, sessionID int) (err error) {
__arg := CancelResetArg{SessionID: sessionID}
err = c.Cli.Call(ctx, "keybase.1.account.cancelReset", []interface{}{__arg}, nil)
return
} | [
"func",
"(",
"c",
"AccountClient",
")",
"CancelReset",
"(",
"ctx",
"context",
".",
"Context",
",",
"sessionID",
"int",
")",
"(",
"err",
"error",
")",
"{",
"__arg",
":=",
"CancelResetArg",
"{",
"SessionID",
":",
"sessionID",
"}",
"\n",
"err",
"=",
"c",
... | // Aborts the reset process | [
"Aborts",
"the",
"reset",
"process"
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/keybase1/account.go#L434-L438 |
161,110 | keybase/client | go/pvl/registers.go | Ban | func (r *namedRegsStore) Ban(key string) libkb.ProofError {
err := r.validateKey(key)
if err != nil {
return err
}
_, banned := r.banned[key]
if banned {
return libkb.NewProofError(keybase1.ProofStatus_INVALID_PVL, "cannot ban already banned register '%v'", key)
}
_, set := r.m[key]
if set {
return libkb.... | go | func (r *namedRegsStore) Ban(key string) libkb.ProofError {
err := r.validateKey(key)
if err != nil {
return err
}
_, banned := r.banned[key]
if banned {
return libkb.NewProofError(keybase1.ProofStatus_INVALID_PVL, "cannot ban already banned register '%v'", key)
}
_, set := r.m[key]
if set {
return libkb.... | [
"func",
"(",
"r",
"*",
"namedRegsStore",
")",
"Ban",
"(",
"key",
"string",
")",
"libkb",
".",
"ProofError",
"{",
"err",
":=",
"r",
".",
"validateKey",
"(",
"key",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"_",
",... | // Mark a register as unuseable | [
"Mark",
"a",
"register",
"as",
"unuseable"
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/pvl/registers.go#L62-L77 |
161,111 | keybase/client | go/pvl/registers.go | validateKey | func (r *namedRegsStore) validateKey(key string) libkb.ProofError {
if !keyRE.MatchString(key) {
return libkb.NewProofError(keybase1.ProofStatus_INVALID_PVL, "invalid register name '%v'", key)
}
return nil
} | go | func (r *namedRegsStore) validateKey(key string) libkb.ProofError {
if !keyRE.MatchString(key) {
return libkb.NewProofError(keybase1.ProofStatus_INVALID_PVL, "invalid register name '%v'", key)
}
return nil
} | [
"func",
"(",
"r",
"*",
"namedRegsStore",
")",
"validateKey",
"(",
"key",
"string",
")",
"libkb",
".",
"ProofError",
"{",
"if",
"!",
"keyRE",
".",
"MatchString",
"(",
"key",
")",
"{",
"return",
"libkb",
".",
"NewProofError",
"(",
"keybase1",
".",
"ProofSt... | // Make sure a key is a simple snake case name.
// Does not check whether it's banned. | [
"Make",
"sure",
"a",
"key",
"is",
"a",
"simple",
"snake",
"case",
"name",
".",
"Does",
"not",
"check",
"whether",
"it",
"s",
"banned",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/pvl/registers.go#L83-L88 |
161,112 | keybase/client | go/client/simplefs_ls.go | Mode | func (d DirentFileInfo) Mode() os.FileMode {
switch d.Entry.DirentType {
case keybase1.DirentType_FILE:
return 0664
case keybase1.DirentType_DIR:
return os.ModeDir | 0664
case keybase1.DirentType_SYM:
return os.ModeSymlink | 0664
case keybase1.DirentType_EXEC:
return 0773
}
return 0
} | go | func (d DirentFileInfo) Mode() os.FileMode {
switch d.Entry.DirentType {
case keybase1.DirentType_FILE:
return 0664
case keybase1.DirentType_DIR:
return os.ModeDir | 0664
case keybase1.DirentType_SYM:
return os.ModeSymlink | 0664
case keybase1.DirentType_EXEC:
return 0773
}
return 0
} | [
"func",
"(",
"d",
"DirentFileInfo",
")",
"Mode",
"(",
")",
"os",
".",
"FileMode",
"{",
"switch",
"d",
".",
"Entry",
".",
"DirentType",
"{",
"case",
"keybase1",
".",
"DirentType_FILE",
":",
"return",
"0664",
"\n",
"case",
"keybase1",
".",
"DirentType_DIR",
... | // Mode returns the file mode bits | [
"Mode",
"returns",
"the",
"file",
"mode",
"bits"
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/client/simplefs_ls.go#L68-L80 |
161,113 | keybase/client | go/client/simplefs_ls.go | ModTime | func (d DirentFileInfo) ModTime() time.Time {
return time.Unix(int64(d.Entry.Time/1000), int64(d.Entry.Time%1000)*1000000)
} | go | func (d DirentFileInfo) ModTime() time.Time {
return time.Unix(int64(d.Entry.Time/1000), int64(d.Entry.Time%1000)*1000000)
} | [
"func",
"(",
"d",
"DirentFileInfo",
")",
"ModTime",
"(",
")",
"time",
".",
"Time",
"{",
"return",
"time",
".",
"Unix",
"(",
"int64",
"(",
"d",
".",
"Entry",
".",
"Time",
"/",
"1000",
")",
",",
"int64",
"(",
"d",
".",
"Entry",
".",
"Time",
"%",
... | // ModTime returns modification time | [
"ModTime",
"returns",
"modification",
"time"
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/client/simplefs_ls.go#L83-L85 |
161,114 | keybase/client | go/client/simplefs_ls.go | parseLsColors | func parseLsColors(lsColors string) {
for i := 0; i < len(lsColors); i += 2 {
if i == 0 {
colorMap["directory"] =
getColorFromBsdCode(lsColors[i : i+2])
} else if i == 2 {
colorMap["symlink"] =
getColorFromBsdCode(lsColors[i : i+2])
} else if i == 4 {
colorMap["socket"] =
getColorFromBsdCode... | go | func parseLsColors(lsColors string) {
for i := 0; i < len(lsColors); i += 2 {
if i == 0 {
colorMap["directory"] =
getColorFromBsdCode(lsColors[i : i+2])
} else if i == 2 {
colorMap["symlink"] =
getColorFromBsdCode(lsColors[i : i+2])
} else if i == 4 {
colorMap["socket"] =
getColorFromBsdCode... | [
"func",
"parseLsColors",
"(",
"lsColors",
"string",
")",
"{",
"for",
"i",
":=",
"0",
";",
"i",
"<",
"len",
"(",
"lsColors",
")",
";",
"i",
"+=",
"2",
"{",
"if",
"i",
"==",
"0",
"{",
"colorMap",
"[",
"\"",
"\"",
"]",
"=",
"getColorFromBsdCode",
"(... | // Given an LSCOLORS string, fill in the appropriate keys and values of the
// global colorMap. | [
"Given",
"an",
"LSCOLORS",
"string",
"fill",
"in",
"the",
"appropriate",
"keys",
"and",
"values",
"of",
"the",
"global",
"colorMap",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/client/simplefs_ls.go#L230-L267 |
161,115 | keybase/client | go/client/simplefs_ls.go | lessByName | func (listings Listings) lessByName(i, j int) bool {
a := listings[i]
b := listings[j]
aNameLower := strings.ToLower(a.name)
bNameLower := strings.ToLower(b.name)
if aNameLower != bNameLower {
return aNameLower < bNameLower
}
// If capitalization is the only thing different between the
// words, put lower-ca... | go | func (listings Listings) lessByName(i, j int) bool {
a := listings[i]
b := listings[j]
aNameLower := strings.ToLower(a.name)
bNameLower := strings.ToLower(b.name)
if aNameLower != bNameLower {
return aNameLower < bNameLower
}
// If capitalization is the only thing different between the
// words, put lower-ca... | [
"func",
"(",
"listings",
"Listings",
")",
"lessByName",
"(",
"i",
",",
"j",
"int",
")",
"bool",
"{",
"a",
":=",
"listings",
"[",
"i",
"]",
"\n",
"b",
":=",
"listings",
"[",
"j",
"]",
"\n",
"aNameLower",
":=",
"strings",
".",
"ToLower",
"(",
"a",
... | // Comparison function used for sorting Listings by name. | [
"Comparison",
"function",
"used",
"for",
"sorting",
"Listings",
"by",
"name",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/client/simplefs_ls.go#L498-L510 |
161,116 | keybase/client | go/client/simplefs_ls.go | lessByTime | func (listings Listings) lessByTime(i, j int) bool {
a := listings[i]
b := listings[j]
return a.epochNano >= b.epochNano
} | go | func (listings Listings) lessByTime(i, j int) bool {
a := listings[i]
b := listings[j]
return a.epochNano >= b.epochNano
} | [
"func",
"(",
"listings",
"Listings",
")",
"lessByTime",
"(",
"i",
",",
"j",
"int",
")",
"bool",
"{",
"a",
":=",
"listings",
"[",
"i",
"]",
"\n",
"b",
":=",
"listings",
"[",
"j",
"]",
"\n",
"return",
"a",
".",
"epochNano",
">=",
"b",
".",
"epochNa... | // Comparison function used for sorting Listings by modification time, from most
// recent to oldest. | [
"Comparison",
"function",
"used",
"for",
"sorting",
"Listings",
"by",
"modification",
"time",
"from",
"most",
"recent",
"to",
"oldest",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/client/simplefs_ls.go#L514-L518 |
161,117 | keybase/client | go/client/simplefs_ls.go | lessBySize | func (listings Listings) lessBySize(i, j int) bool {
a := listings[i]
b := listings[j]
aSize, _ := strconv.Atoi(a.size)
bSize, _ := strconv.Atoi(b.size)
return aSize >= bSize
} | go | func (listings Listings) lessBySize(i, j int) bool {
a := listings[i]
b := listings[j]
aSize, _ := strconv.Atoi(a.size)
bSize, _ := strconv.Atoi(b.size)
return aSize >= bSize
} | [
"func",
"(",
"listings",
"Listings",
")",
"lessBySize",
"(",
"i",
",",
"j",
"int",
")",
"bool",
"{",
"a",
":=",
"listings",
"[",
"i",
"]",
"\n",
"b",
":=",
"listings",
"[",
"j",
"]",
"\n",
"aSize",
",",
"_",
":=",
"strconv",
".",
"Atoi",
"(",
"... | // Comparison function used for sorting Listings by size, from largest to
// smallest. | [
"Comparison",
"function",
"used",
"for",
"sorting",
"Listings",
"by",
"size",
"from",
"largest",
"to",
"smallest",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/client/simplefs_ls.go#L522-L528 |
161,118 | keybase/client | go/client/simplefs_ls.go | sortListings | func sortListings(listings Listings, options ListOptions) {
comparisonFunction := listings.lessByName
if options.sortTime {
comparisonFunction = listings.lessByTime
} else if options.sortSize {
comparisonFunction = listings.lessBySize
}
sort.Slice(listings, comparisonFunction)
if options.sortReverse {
mid... | go | func sortListings(listings Listings, options ListOptions) {
comparisonFunction := listings.lessByName
if options.sortTime {
comparisonFunction = listings.lessByTime
} else if options.sortSize {
comparisonFunction = listings.lessBySize
}
sort.Slice(listings, comparisonFunction)
if options.sortReverse {
mid... | [
"func",
"sortListings",
"(",
"listings",
"Listings",
",",
"options",
"ListOptions",
")",
"{",
"comparisonFunction",
":=",
"listings",
".",
"lessByName",
"\n",
"if",
"options",
".",
"sortTime",
"{",
"comparisonFunction",
"=",
"listings",
".",
"lessByTime",
"\n",
... | // Sort the given listings, taking into account the current program options. | [
"Sort",
"the",
"given",
"listings",
"taking",
"into",
"account",
"the",
"current",
"program",
"options",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/client/simplefs_ls.go#L531-L560 |
161,119 | keybase/client | go/kbfs/kbfscrypto/signature.go | IsNil | func (s SignatureInfo) IsNil() bool {
return s.Version.IsNil() && len(s.Signature) == 0 && s.VerifyingKey.IsNil()
} | go | func (s SignatureInfo) IsNil() bool {
return s.Version.IsNil() && len(s.Signature) == 0 && s.VerifyingKey.IsNil()
} | [
"func",
"(",
"s",
"SignatureInfo",
")",
"IsNil",
"(",
")",
"bool",
"{",
"return",
"s",
".",
"Version",
".",
"IsNil",
"(",
")",
"&&",
"len",
"(",
"s",
".",
"Signature",
")",
"==",
"0",
"&&",
"s",
".",
"VerifyingKey",
".",
"IsNil",
"(",
")",
"\n",
... | // IsNil returns true if this SignatureInfo is nil. | [
"IsNil",
"returns",
"true",
"if",
"this",
"SignatureInfo",
"is",
"nil",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfscrypto/signature.go#L47-L49 |
161,120 | keybase/client | go/kbfs/kbfscrypto/signature.go | Equals | func (s SignatureInfo) Equals(other SignatureInfo) bool {
if s.Version != other.Version {
return false
}
if !bytes.Equal(s.Signature, other.Signature) {
return false
}
if s.VerifyingKey != other.VerifyingKey {
return false
}
return true
} | go | func (s SignatureInfo) Equals(other SignatureInfo) bool {
if s.Version != other.Version {
return false
}
if !bytes.Equal(s.Signature, other.Signature) {
return false
}
if s.VerifyingKey != other.VerifyingKey {
return false
}
return true
} | [
"func",
"(",
"s",
"SignatureInfo",
")",
"Equals",
"(",
"other",
"SignatureInfo",
")",
"bool",
"{",
"if",
"s",
".",
"Version",
"!=",
"other",
".",
"Version",
"{",
"return",
"false",
"\n",
"}",
"\n",
"if",
"!",
"bytes",
".",
"Equal",
"(",
"s",
".",
"... | // Equals returns true if this SignatureInfo matches the given one. | [
"Equals",
"returns",
"true",
"if",
"this",
"SignatureInfo",
"matches",
"the",
"given",
"one",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfscrypto/signature.go#L52-L64 |
161,121 | keybase/client | go/kbfs/kbfscrypto/signature.go | DeepCopy | func (s SignatureInfo) DeepCopy() SignatureInfo {
signature := make([]byte, len(s.Signature))
copy(signature[:], s.Signature[:])
return SignatureInfo{s.Version, signature, s.VerifyingKey}
} | go | func (s SignatureInfo) DeepCopy() SignatureInfo {
signature := make([]byte, len(s.Signature))
copy(signature[:], s.Signature[:])
return SignatureInfo{s.Version, signature, s.VerifyingKey}
} | [
"func",
"(",
"s",
"SignatureInfo",
")",
"DeepCopy",
"(",
")",
"SignatureInfo",
"{",
"signature",
":=",
"make",
"(",
"[",
"]",
"byte",
",",
"len",
"(",
"s",
".",
"Signature",
")",
")",
"\n",
"copy",
"(",
"signature",
"[",
":",
"]",
",",
"s",
".",
... | // DeepCopy makes a complete copy of this SignatureInfo. | [
"DeepCopy",
"makes",
"a",
"complete",
"copy",
"of",
"this",
"SignatureInfo",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfscrypto/signature.go#L67-L71 |
161,122 | keybase/client | go/kbfs/kbfscrypto/signature.go | String | func (s SignatureInfo) String() string {
return fmt.Sprintf("SignatureInfo{Version: %d, Signature: %s, "+
"VerifyingKey: %s}", s.Version, hex.EncodeToString(s.Signature[:]),
&s.VerifyingKey)
} | go | func (s SignatureInfo) String() string {
return fmt.Sprintf("SignatureInfo{Version: %d, Signature: %s, "+
"VerifyingKey: %s}", s.Version, hex.EncodeToString(s.Signature[:]),
&s.VerifyingKey)
} | [
"func",
"(",
"s",
"SignatureInfo",
")",
"String",
"(",
")",
"string",
"{",
"return",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
"+",
"\"",
"\"",
",",
"s",
".",
"Version",
",",
"hex",
".",
"EncodeToString",
"(",
"s",
".",
"Signature",
"[",
":",
"]",
... | // String implements the fmt.Stringer interface for SignatureInfo. | [
"String",
"implements",
"the",
"fmt",
".",
"Stringer",
"interface",
"for",
"SignatureInfo",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfscrypto/signature.go#L74-L78 |
161,123 | keybase/client | go/kbfs/kbfscrypto/signature.go | Sign | func (k SigningKey) Sign(data []byte) SignatureInfo {
sig := k.kp.Private.Sign(data)
return SignatureInfo{
Version: SigED25519,
Signature: sig[:],
VerifyingKey: k.GetVerifyingKey(),
}
} | go | func (k SigningKey) Sign(data []byte) SignatureInfo {
sig := k.kp.Private.Sign(data)
return SignatureInfo{
Version: SigED25519,
Signature: sig[:],
VerifyingKey: k.GetVerifyingKey(),
}
} | [
"func",
"(",
"k",
"SigningKey",
")",
"Sign",
"(",
"data",
"[",
"]",
"byte",
")",
"SignatureInfo",
"{",
"sig",
":=",
"k",
".",
"kp",
".",
"Private",
".",
"Sign",
"(",
"data",
")",
"\n",
"return",
"SignatureInfo",
"{",
"Version",
":",
"SigED25519",
","... | // Sign signs the given data and returns a SignatureInfo. | [
"Sign",
"signs",
"the",
"given",
"data",
"and",
"returns",
"a",
"SignatureInfo",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfscrypto/signature.go#L91-L98 |
161,124 | keybase/client | go/kbfs/kbfscrypto/signature.go | SignForKBFS | func (k SigningKey) SignForKBFS(data []byte) (SignatureInfo, error) {
sigInfo, err := k.kp.SignV2(data, kbcrypto.SignaturePrefixKBFS)
if err != nil {
return SignatureInfo{}, errors.WithStack(err)
}
return SignatureInfo{
Version: SigVer(sigInfo.Version),
Signature: sigInfo.Sig[:],
VerifyingKey: k.Get... | go | func (k SigningKey) SignForKBFS(data []byte) (SignatureInfo, error) {
sigInfo, err := k.kp.SignV2(data, kbcrypto.SignaturePrefixKBFS)
if err != nil {
return SignatureInfo{}, errors.WithStack(err)
}
return SignatureInfo{
Version: SigVer(sigInfo.Version),
Signature: sigInfo.Sig[:],
VerifyingKey: k.Get... | [
"func",
"(",
"k",
"SigningKey",
")",
"SignForKBFS",
"(",
"data",
"[",
"]",
"byte",
")",
"(",
"SignatureInfo",
",",
"error",
")",
"{",
"sigInfo",
",",
"err",
":=",
"k",
".",
"kp",
".",
"SignV2",
"(",
"data",
",",
"kbcrypto",
".",
"SignaturePrefixKBFS",
... | // SignForKBFS signs the given data with the KBFS prefix and returns a SignatureInfo. | [
"SignForKBFS",
"signs",
"the",
"given",
"data",
"with",
"the",
"KBFS",
"prefix",
"and",
"returns",
"a",
"SignatureInfo",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfscrypto/signature.go#L101-L111 |
161,125 | keybase/client | go/kbfs/kbfscrypto/signature.go | SignToString | func (k SigningKey) SignToString(data []byte) (sig string, err error) {
sig, _, err = k.kp.SignToString(data)
if err != nil {
return "", errors.WithStack(err)
}
return sig, nil
} | go | func (k SigningKey) SignToString(data []byte) (sig string, err error) {
sig, _, err = k.kp.SignToString(data)
if err != nil {
return "", errors.WithStack(err)
}
return sig, nil
} | [
"func",
"(",
"k",
"SigningKey",
")",
"SignToString",
"(",
"data",
"[",
"]",
"byte",
")",
"(",
"sig",
"string",
",",
"err",
"error",
")",
"{",
"sig",
",",
"_",
",",
"err",
"=",
"k",
".",
"kp",
".",
"SignToString",
"(",
"data",
")",
"\n",
"if",
"... | // SignToString signs the given data and returns a string. | [
"SignToString",
"signs",
"the",
"given",
"data",
"and",
"returns",
"a",
"string",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfscrypto/signature.go#L114-L120 |
161,126 | keybase/client | go/kbfs/kbfscrypto/signature.go | Verify | func Verify(msg []byte, sigInfo SignatureInfo) error {
if sigInfo.Version < SigED25519 || sigInfo.Version > SigED25519ForKBFS {
return errors.WithStack(UnknownSigVer{sigInfo.Version})
}
publicKey := kbcrypto.KIDToNaclSigningKeyPublic(
sigInfo.VerifyingKey.KID().ToBytes())
if publicKey == nil {
return errors.... | go | func Verify(msg []byte, sigInfo SignatureInfo) error {
if sigInfo.Version < SigED25519 || sigInfo.Version > SigED25519ForKBFS {
return errors.WithStack(UnknownSigVer{sigInfo.Version})
}
publicKey := kbcrypto.KIDToNaclSigningKeyPublic(
sigInfo.VerifyingKey.KID().ToBytes())
if publicKey == nil {
return errors.... | [
"func",
"Verify",
"(",
"msg",
"[",
"]",
"byte",
",",
"sigInfo",
"SignatureInfo",
")",
"error",
"{",
"if",
"sigInfo",
".",
"Version",
"<",
"SigED25519",
"||",
"sigInfo",
".",
"Version",
">",
"SigED25519ForKBFS",
"{",
"return",
"errors",
".",
"WithStack",
"(... | // Verify verifies the given message against the given SignatureInfo,
// and returns nil if it verifies successfully, or an error otherwise. | [
"Verify",
"verifies",
"the",
"given",
"message",
"against",
"the",
"given",
"SignatureInfo",
"and",
"returns",
"nil",
"if",
"it",
"verifies",
"successfully",
"or",
"an",
"error",
"otherwise",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfscrypto/signature.go#L160-L186 |
161,127 | keybase/client | go/kbfs/kbfscrypto/signature.go | Sign | func (s SigningKeySigner) Sign(
ctx context.Context, data []byte) (SignatureInfo, error) {
return s.Key.Sign(data), nil
} | go | func (s SigningKeySigner) Sign(
ctx context.Context, data []byte) (SignatureInfo, error) {
return s.Key.Sign(data), nil
} | [
"func",
"(",
"s",
"SigningKeySigner",
")",
"Sign",
"(",
"ctx",
"context",
".",
"Context",
",",
"data",
"[",
"]",
"byte",
")",
"(",
"SignatureInfo",
",",
"error",
")",
"{",
"return",
"s",
".",
"Key",
".",
"Sign",
"(",
"data",
")",
",",
"nil",
"\n",
... | // Sign implements Signer for SigningKeySigner. | [
"Sign",
"implements",
"Signer",
"for",
"SigningKeySigner",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfscrypto/signature.go#L205-L208 |
161,128 | keybase/client | go/kbfs/kbfscrypto/signature.go | SignForKBFS | func (s SigningKeySigner) SignForKBFS(
ctx context.Context, data []byte) (SignatureInfo, error) {
return s.Key.SignForKBFS(data)
} | go | func (s SigningKeySigner) SignForKBFS(
ctx context.Context, data []byte) (SignatureInfo, error) {
return s.Key.SignForKBFS(data)
} | [
"func",
"(",
"s",
"SigningKeySigner",
")",
"SignForKBFS",
"(",
"ctx",
"context",
".",
"Context",
",",
"data",
"[",
"]",
"byte",
")",
"(",
"SignatureInfo",
",",
"error",
")",
"{",
"return",
"s",
".",
"Key",
".",
"SignForKBFS",
"(",
"data",
")",
"\n",
... | // SignForKBFS implements Signer for SigningKeySigner. | [
"SignForKBFS",
"implements",
"Signer",
"for",
"SigningKeySigner",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfscrypto/signature.go#L211-L214 |
161,129 | keybase/client | go/kbfs/kbfscrypto/signature.go | SignToString | func (s SigningKeySigner) SignToString(
ctx context.Context, data []byte) (sig string, err error) {
return s.Key.SignToString(data)
} | go | func (s SigningKeySigner) SignToString(
ctx context.Context, data []byte) (sig string, err error) {
return s.Key.SignToString(data)
} | [
"func",
"(",
"s",
"SigningKeySigner",
")",
"SignToString",
"(",
"ctx",
"context",
".",
"Context",
",",
"data",
"[",
"]",
"byte",
")",
"(",
"sig",
"string",
",",
"err",
"error",
")",
"{",
"return",
"s",
".",
"Key",
".",
"SignToString",
"(",
"data",
")... | // SignToString implements Signer for SigningKeySigner. | [
"SignToString",
"implements",
"Signer",
"for",
"SigningKeySigner",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfscrypto/signature.go#L217-L220 |
161,130 | keybase/client | go/kbfs/libkbfs/disk_block_cache_wrapped.go | DoesCacheHaveSpace | func (cache *diskBlockCacheWrapped) DoesCacheHaveSpace(
ctx context.Context, cacheType DiskBlockCacheType) (bool, error) {
cache.mtx.RLock()
defer cache.mtx.RUnlock()
c, err := cache.getCacheLocked(cacheType)
if err != nil {
return false, err
}
return c.DoesCacheHaveSpace(ctx), nil
} | go | func (cache *diskBlockCacheWrapped) DoesCacheHaveSpace(
ctx context.Context, cacheType DiskBlockCacheType) (bool, error) {
cache.mtx.RLock()
defer cache.mtx.RUnlock()
c, err := cache.getCacheLocked(cacheType)
if err != nil {
return false, err
}
return c.DoesCacheHaveSpace(ctx), nil
} | [
"func",
"(",
"cache",
"*",
"diskBlockCacheWrapped",
")",
"DoesCacheHaveSpace",
"(",
"ctx",
"context",
".",
"Context",
",",
"cacheType",
"DiskBlockCacheType",
")",
"(",
"bool",
",",
"error",
")",
"{",
"cache",
".",
"mtx",
".",
"RLock",
"(",
")",
"\n",
"defe... | // DoesCacheHaveSpace implements the DiskBlockCache interface for
// diskBlockCacheWrapped. | [
"DoesCacheHaveSpace",
"implements",
"the",
"DiskBlockCache",
"interface",
"for",
"diskBlockCacheWrapped",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/disk_block_cache_wrapped.go#L116-L125 |
161,131 | keybase/client | go/kbfs/libkbfs/disk_block_cache_wrapped.go | Get | func (cache *diskBlockCacheWrapped) Get(
ctx context.Context, tlfID tlf.ID, blockID kbfsblock.ID,
preferredCacheType DiskBlockCacheType) (
buf []byte, serverHalf kbfscrypto.BlockCryptKeyServerHalf,
prefetchStatus PrefetchStatus, err error) {
cache.mtx.RLock()
defer cache.mtx.RUnlock()
primaryCache, secondaryCach... | go | func (cache *diskBlockCacheWrapped) Get(
ctx context.Context, tlfID tlf.ID, blockID kbfsblock.ID,
preferredCacheType DiskBlockCacheType) (
buf []byte, serverHalf kbfscrypto.BlockCryptKeyServerHalf,
prefetchStatus PrefetchStatus, err error) {
cache.mtx.RLock()
defer cache.mtx.RUnlock()
primaryCache, secondaryCach... | [
"func",
"(",
"cache",
"*",
"diskBlockCacheWrapped",
")",
"Get",
"(",
"ctx",
"context",
".",
"Context",
",",
"tlfID",
"tlf",
".",
"ID",
",",
"blockID",
"kbfsblock",
".",
"ID",
",",
"preferredCacheType",
"DiskBlockCacheType",
")",
"(",
"buf",
"[",
"]",
"byte... | // Get implements the DiskBlockCache interface for diskBlockCacheWrapped. | [
"Get",
"implements",
"the",
"DiskBlockCache",
"interface",
"for",
"diskBlockCacheWrapped",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/disk_block_cache_wrapped.go#L181-L205 |
161,132 | keybase/client | go/kbfs/libkbfs/disk_block_cache_wrapped.go | GetMetadata | func (cache *diskBlockCacheWrapped) GetMetadata(ctx context.Context,
blockID kbfsblock.ID) (metadata DiskBlockCacheMetadata, err error) {
cache.mtx.RLock()
defer cache.mtx.RUnlock()
if cache.syncCache != nil {
md, err := cache.syncCache.GetMetadata(ctx, blockID)
switch errors.Cause(err) {
case nil:
return ... | go | func (cache *diskBlockCacheWrapped) GetMetadata(ctx context.Context,
blockID kbfsblock.ID) (metadata DiskBlockCacheMetadata, err error) {
cache.mtx.RLock()
defer cache.mtx.RUnlock()
if cache.syncCache != nil {
md, err := cache.syncCache.GetMetadata(ctx, blockID)
switch errors.Cause(err) {
case nil:
return ... | [
"func",
"(",
"cache",
"*",
"diskBlockCacheWrapped",
")",
"GetMetadata",
"(",
"ctx",
"context",
".",
"Context",
",",
"blockID",
"kbfsblock",
".",
"ID",
")",
"(",
"metadata",
"DiskBlockCacheMetadata",
",",
"err",
"error",
")",
"{",
"cache",
".",
"mtx",
".",
... | // GetMetadata implements the DiskBlockCache interface for
// diskBlockCacheWrapped. | [
"GetMetadata",
"implements",
"the",
"DiskBlockCache",
"interface",
"for",
"diskBlockCacheWrapped",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/disk_block_cache_wrapped.go#L209-L224 |
161,133 | keybase/client | go/kbfs/libkbfs/disk_block_cache_wrapped.go | GetPrefetchStatus | func (cache *diskBlockCacheWrapped) GetPrefetchStatus(
ctx context.Context, tlfID tlf.ID, blockID kbfsblock.ID,
cacheType DiskBlockCacheType) (prefetchStatus PrefetchStatus, err error) {
cache.mtx.RLock()
defer cache.mtx.RUnlock()
// Try the sync cache first unless working set cache is required.
if cacheType != ... | go | func (cache *diskBlockCacheWrapped) GetPrefetchStatus(
ctx context.Context, tlfID tlf.ID, blockID kbfsblock.ID,
cacheType DiskBlockCacheType) (prefetchStatus PrefetchStatus, err error) {
cache.mtx.RLock()
defer cache.mtx.RUnlock()
// Try the sync cache first unless working set cache is required.
if cacheType != ... | [
"func",
"(",
"cache",
"*",
"diskBlockCacheWrapped",
")",
"GetPrefetchStatus",
"(",
"ctx",
"context",
".",
"Context",
",",
"tlfID",
"tlf",
".",
"ID",
",",
"blockID",
"kbfsblock",
".",
"ID",
",",
"cacheType",
"DiskBlockCacheType",
")",
"(",
"prefetchStatus",
"Pr... | // GetPefetchStatus implements the DiskBlockCache interface for
// diskBlockCacheWrapped. | [
"GetPefetchStatus",
"implements",
"the",
"DiskBlockCache",
"interface",
"for",
"diskBlockCacheWrapped",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/disk_block_cache_wrapped.go#L243-L280 |
161,134 | keybase/client | go/kbfs/libkbfs/disk_block_cache_wrapped.go | Put | func (cache *diskBlockCacheWrapped) Put(ctx context.Context, tlfID tlf.ID,
blockID kbfsblock.ID, buf []byte,
serverHalf kbfscrypto.BlockCryptKeyServerHalf,
cacheType DiskBlockCacheType) error {
// This is a write operation but we are only reading the pointers to the
// caches. So we use a read lock.
cache.mtx.RLo... | go | func (cache *diskBlockCacheWrapped) Put(ctx context.Context, tlfID tlf.ID,
blockID kbfsblock.ID, buf []byte,
serverHalf kbfscrypto.BlockCryptKeyServerHalf,
cacheType DiskBlockCacheType) error {
// This is a write operation but we are only reading the pointers to the
// caches. So we use a read lock.
cache.mtx.RLo... | [
"func",
"(",
"cache",
"*",
"diskBlockCacheWrapped",
")",
"Put",
"(",
"ctx",
"context",
".",
"Context",
",",
"tlfID",
"tlf",
".",
"ID",
",",
"blockID",
"kbfsblock",
".",
"ID",
",",
"buf",
"[",
"]",
"byte",
",",
"serverHalf",
"kbfscrypto",
".",
"BlockCrypt... | // Put implements the DiskBlockCache interface for diskBlockCacheWrapped. | [
"Put",
"implements",
"the",
"DiskBlockCache",
"interface",
"for",
"diskBlockCacheWrapped",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/disk_block_cache_wrapped.go#L283-L313 |
161,135 | keybase/client | go/kbfs/libkbfs/disk_block_cache_wrapped.go | Delete | func (cache *diskBlockCacheWrapped) Delete(ctx context.Context,
blockIDs []kbfsblock.ID, cacheType DiskBlockCacheType) (
numRemoved int, sizeRemoved int64, err error) {
// This is a write operation but we are only reading the pointers to the
// caches. So we use a read lock.
cache.mtx.RLock()
defer cache.mtx.RUnl... | go | func (cache *diskBlockCacheWrapped) Delete(ctx context.Context,
blockIDs []kbfsblock.ID, cacheType DiskBlockCacheType) (
numRemoved int, sizeRemoved int64, err error) {
// This is a write operation but we are only reading the pointers to the
// caches. So we use a read lock.
cache.mtx.RLock()
defer cache.mtx.RUnl... | [
"func",
"(",
"cache",
"*",
"diskBlockCacheWrapped",
")",
"Delete",
"(",
"ctx",
"context",
".",
"Context",
",",
"blockIDs",
"[",
"]",
"kbfsblock",
".",
"ID",
",",
"cacheType",
"DiskBlockCacheType",
")",
"(",
"numRemoved",
"int",
",",
"sizeRemoved",
"int64",
"... | // Delete implements the DiskBlockCache interface for diskBlockCacheWrapped. | [
"Delete",
"implements",
"the",
"DiskBlockCache",
"interface",
"for",
"diskBlockCacheWrapped",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/disk_block_cache_wrapped.go#L316-L339 |
161,136 | keybase/client | go/kbfs/libkbfs/disk_block_cache_wrapped.go | UpdateMetadata | func (cache *diskBlockCacheWrapped) UpdateMetadata(
ctx context.Context, tlfID tlf.ID, blockID kbfsblock.ID,
prefetchStatus PrefetchStatus, cacheType DiskBlockCacheType) error {
// This is a write operation but we are only reading the pointers to the
// caches. So we use a read lock.
cache.mtx.RLock()
defer cache... | go | func (cache *diskBlockCacheWrapped) UpdateMetadata(
ctx context.Context, tlfID tlf.ID, blockID kbfsblock.ID,
prefetchStatus PrefetchStatus, cacheType DiskBlockCacheType) error {
// This is a write operation but we are only reading the pointers to the
// caches. So we use a read lock.
cache.mtx.RLock()
defer cache... | [
"func",
"(",
"cache",
"*",
"diskBlockCacheWrapped",
")",
"UpdateMetadata",
"(",
"ctx",
"context",
".",
"Context",
",",
"tlfID",
"tlf",
".",
"ID",
",",
"blockID",
"kbfsblock",
".",
"ID",
",",
"prefetchStatus",
"PrefetchStatus",
",",
"cacheType",
"DiskBlockCacheTy... | // UpdateMetadata implements the DiskBlockCache interface for
// diskBlockCacheWrapped. | [
"UpdateMetadata",
"implements",
"the",
"DiskBlockCache",
"interface",
"for",
"diskBlockCacheWrapped",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/disk_block_cache_wrapped.go#L343-L379 |
161,137 | keybase/client | go/kbfs/libkbfs/disk_block_cache_wrapped.go | ClearAllTlfBlocks | func (cache *diskBlockCacheWrapped) ClearAllTlfBlocks(
ctx context.Context, tlfID tlf.ID, cacheType DiskBlockCacheType) error {
cache.mtx.RLock()
defer cache.mtx.RUnlock()
c, err := cache.getCacheLocked(cacheType)
if err != nil {
return err
}
return c.ClearAllTlfBlocks(ctx, tlfID)
} | go | func (cache *diskBlockCacheWrapped) ClearAllTlfBlocks(
ctx context.Context, tlfID tlf.ID, cacheType DiskBlockCacheType) error {
cache.mtx.RLock()
defer cache.mtx.RUnlock()
c, err := cache.getCacheLocked(cacheType)
if err != nil {
return err
}
return c.ClearAllTlfBlocks(ctx, tlfID)
} | [
"func",
"(",
"cache",
"*",
"diskBlockCacheWrapped",
")",
"ClearAllTlfBlocks",
"(",
"ctx",
"context",
".",
"Context",
",",
"tlfID",
"tlf",
".",
"ID",
",",
"cacheType",
"DiskBlockCacheType",
")",
"error",
"{",
"cache",
".",
"mtx",
".",
"RLock",
"(",
")",
"\n... | // ClearAllTlfBlocks implements the DiskBlockCache interface for
// diskBlockCacheWrapper. | [
"ClearAllTlfBlocks",
"implements",
"the",
"DiskBlockCache",
"interface",
"for",
"diskBlockCacheWrapper",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/disk_block_cache_wrapped.go#L383-L392 |
161,138 | keybase/client | go/kbfs/libkbfs/disk_block_cache_wrapped.go | GetLastUnrefRev | func (cache *diskBlockCacheWrapped) GetLastUnrefRev(
ctx context.Context, tlfID tlf.ID, cacheType DiskBlockCacheType) (
kbfsmd.Revision, error) {
cache.mtx.RLock()
defer cache.mtx.RUnlock()
c, err := cache.getCacheLocked(cacheType)
if err != nil {
return kbfsmd.RevisionUninitialized, err
}
return c.GetLastUnr... | go | func (cache *diskBlockCacheWrapped) GetLastUnrefRev(
ctx context.Context, tlfID tlf.ID, cacheType DiskBlockCacheType) (
kbfsmd.Revision, error) {
cache.mtx.RLock()
defer cache.mtx.RUnlock()
c, err := cache.getCacheLocked(cacheType)
if err != nil {
return kbfsmd.RevisionUninitialized, err
}
return c.GetLastUnr... | [
"func",
"(",
"cache",
"*",
"diskBlockCacheWrapped",
")",
"GetLastUnrefRev",
"(",
"ctx",
"context",
".",
"Context",
",",
"tlfID",
"tlf",
".",
"ID",
",",
"cacheType",
"DiskBlockCacheType",
")",
"(",
"kbfsmd",
".",
"Revision",
",",
"error",
")",
"{",
"cache",
... | // GetLastUnrefRev implements the DiskBlockCache interface for
// diskBlockCacheWrapped. | [
"GetLastUnrefRev",
"implements",
"the",
"DiskBlockCache",
"interface",
"for",
"diskBlockCacheWrapped",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/disk_block_cache_wrapped.go#L396-L406 |
161,139 | keybase/client | go/kbfs/libkbfs/disk_block_cache_wrapped.go | Status | func (cache *diskBlockCacheWrapped) Status(
ctx context.Context) map[string]DiskBlockCacheStatus {
// This is a write operation but we are only reading the pointers to the
// caches. So we use a read lock.
cache.mtx.RLock()
defer cache.mtx.RUnlock()
statuses := make(map[string]DiskBlockCacheStatus, 2)
if cache.w... | go | func (cache *diskBlockCacheWrapped) Status(
ctx context.Context) map[string]DiskBlockCacheStatus {
// This is a write operation but we are only reading the pointers to the
// caches. So we use a read lock.
cache.mtx.RLock()
defer cache.mtx.RUnlock()
statuses := make(map[string]DiskBlockCacheStatus, 2)
if cache.w... | [
"func",
"(",
"cache",
"*",
"diskBlockCacheWrapped",
")",
"Status",
"(",
"ctx",
"context",
".",
"Context",
")",
"map",
"[",
"string",
"]",
"DiskBlockCacheStatus",
"{",
"// This is a write operation but we are only reading the pointers to the",
"// caches. So we use a read lock... | // Status implements the DiskBlockCache interface for diskBlockCacheWrapped. | [
"Status",
"implements",
"the",
"DiskBlockCache",
"interface",
"for",
"diskBlockCacheWrapped",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/disk_block_cache_wrapped.go#L423-L442 |
161,140 | keybase/client | go/kbfs/libkbfs/disk_block_cache_wrapped.go | Mark | func (cache *diskBlockCacheWrapped) Mark(
ctx context.Context, blockID kbfsblock.ID, tag string,
cacheType DiskBlockCacheType) error {
cache.mtx.RLock()
defer cache.mtx.RUnlock()
c, err := cache.getCacheLocked(cacheType)
if err != nil {
return err
}
return c.Mark(ctx, blockID, tag)
} | go | func (cache *diskBlockCacheWrapped) Mark(
ctx context.Context, blockID kbfsblock.ID, tag string,
cacheType DiskBlockCacheType) error {
cache.mtx.RLock()
defer cache.mtx.RUnlock()
c, err := cache.getCacheLocked(cacheType)
if err != nil {
return err
}
return c.Mark(ctx, blockID, tag)
} | [
"func",
"(",
"cache",
"*",
"diskBlockCacheWrapped",
")",
"Mark",
"(",
"ctx",
"context",
".",
"Context",
",",
"blockID",
"kbfsblock",
".",
"ID",
",",
"tag",
"string",
",",
"cacheType",
"DiskBlockCacheType",
")",
"error",
"{",
"cache",
".",
"mtx",
".",
"RLoc... | // Mark implements the DiskBlockCache interface for diskBlockCacheWrapped. | [
"Mark",
"implements",
"the",
"DiskBlockCache",
"interface",
"for",
"diskBlockCacheWrapped",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/disk_block_cache_wrapped.go#L445-L455 |
161,141 | keybase/client | go/kbfs/libkbfs/disk_block_cache_wrapped.go | AddHomeTLF | func (cache *diskBlockCacheWrapped) AddHomeTLF(ctx context.Context,
tlfID tlf.ID) error {
cache.mtx.RLock()
defer cache.mtx.RUnlock()
if cache.syncCache == nil {
return errors.New("Sync cache not enabled")
}
return cache.syncCache.AddHomeTLF(ctx, tlfID)
} | go | func (cache *diskBlockCacheWrapped) AddHomeTLF(ctx context.Context,
tlfID tlf.ID) error {
cache.mtx.RLock()
defer cache.mtx.RUnlock()
if cache.syncCache == nil {
return errors.New("Sync cache not enabled")
}
return cache.syncCache.AddHomeTLF(ctx, tlfID)
} | [
"func",
"(",
"cache",
"*",
"diskBlockCacheWrapped",
")",
"AddHomeTLF",
"(",
"ctx",
"context",
".",
"Context",
",",
"tlfID",
"tlf",
".",
"ID",
")",
"error",
"{",
"cache",
".",
"mtx",
".",
"RLock",
"(",
")",
"\n",
"defer",
"cache",
".",
"mtx",
".",
"RU... | // AddHomeTLF implements the DiskBlockCache interface for diskBlockCacheWrapped. | [
"AddHomeTLF",
"implements",
"the",
"DiskBlockCache",
"interface",
"for",
"diskBlockCacheWrapped",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/disk_block_cache_wrapped.go#L476-L484 |
161,142 | keybase/client | go/kbfs/libkbfs/disk_block_cache_wrapped.go | ClearHomeTLFs | func (cache *diskBlockCacheWrapped) ClearHomeTLFs(ctx context.Context) error {
cache.mtx.RLock()
defer cache.mtx.RUnlock()
if cache.syncCache == nil {
return errors.New("Sync cache not enabled")
}
return cache.syncCache.ClearHomeTLFs(ctx)
} | go | func (cache *diskBlockCacheWrapped) ClearHomeTLFs(ctx context.Context) error {
cache.mtx.RLock()
defer cache.mtx.RUnlock()
if cache.syncCache == nil {
return errors.New("Sync cache not enabled")
}
return cache.syncCache.ClearHomeTLFs(ctx)
} | [
"func",
"(",
"cache",
"*",
"diskBlockCacheWrapped",
")",
"ClearHomeTLFs",
"(",
"ctx",
"context",
".",
"Context",
")",
"error",
"{",
"cache",
".",
"mtx",
".",
"RLock",
"(",
")",
"\n",
"defer",
"cache",
".",
"mtx",
".",
"RUnlock",
"(",
")",
"\n",
"if",
... | // ClearHomeTLFs implements the DiskBlockCache interface for
// diskBlockCacheWrapped. | [
"ClearHomeTLFs",
"implements",
"the",
"DiskBlockCache",
"interface",
"for",
"diskBlockCacheWrapped",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/disk_block_cache_wrapped.go#L488-L495 |
161,143 | keybase/client | go/kbfs/libkbfs/disk_block_cache_wrapped.go | WaitUntilStarted | func (cache *diskBlockCacheWrapped) WaitUntilStarted(
cacheType DiskBlockCacheType) (err error) {
cache.mtx.RLock()
defer cache.mtx.RUnlock()
if cacheType != DiskBlockWorkingSetCache {
err = cache.syncCache.WaitUntilStarted()
if err != nil {
return err
}
}
if cacheType != DiskBlockSyncCache {
err = c... | go | func (cache *diskBlockCacheWrapped) WaitUntilStarted(
cacheType DiskBlockCacheType) (err error) {
cache.mtx.RLock()
defer cache.mtx.RUnlock()
if cacheType != DiskBlockWorkingSetCache {
err = cache.syncCache.WaitUntilStarted()
if err != nil {
return err
}
}
if cacheType != DiskBlockSyncCache {
err = c... | [
"func",
"(",
"cache",
"*",
"diskBlockCacheWrapped",
")",
"WaitUntilStarted",
"(",
"cacheType",
"DiskBlockCacheType",
")",
"(",
"err",
"error",
")",
"{",
"cache",
".",
"mtx",
".",
"RLock",
"(",
")",
"\n",
"defer",
"cache",
".",
"mtx",
".",
"RUnlock",
"(",
... | // WaitUntilStarted implements the DiskBlockCache interface for
// diskBlockCacheWrapped. | [
"WaitUntilStarted",
"implements",
"the",
"DiskBlockCache",
"interface",
"for",
"diskBlockCacheWrapped",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/disk_block_cache_wrapped.go#L572-L592 |
161,144 | keybase/client | go/kbfs/libkbfs/disk_block_cache_wrapped.go | Shutdown | func (cache *diskBlockCacheWrapped) Shutdown(ctx context.Context) {
cache.mtx.Lock()
defer cache.mtx.Unlock()
cache.workingSetCache.Shutdown(ctx)
if cache.syncCache != nil {
cache.syncCache.Shutdown(ctx)
}
} | go | func (cache *diskBlockCacheWrapped) Shutdown(ctx context.Context) {
cache.mtx.Lock()
defer cache.mtx.Unlock()
cache.workingSetCache.Shutdown(ctx)
if cache.syncCache != nil {
cache.syncCache.Shutdown(ctx)
}
} | [
"func",
"(",
"cache",
"*",
"diskBlockCacheWrapped",
")",
"Shutdown",
"(",
"ctx",
"context",
".",
"Context",
")",
"{",
"cache",
".",
"mtx",
".",
"Lock",
"(",
")",
"\n",
"defer",
"cache",
".",
"mtx",
".",
"Unlock",
"(",
")",
"\n",
"cache",
".",
"workin... | // Shutdown implements the DiskBlockCache interface for diskBlockCacheWrapped. | [
"Shutdown",
"implements",
"the",
"DiskBlockCache",
"interface",
"for",
"diskBlockCacheWrapped",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/disk_block_cache_wrapped.go#L595-L602 |
161,145 | keybase/client | go/kbfs/libkbfs/chat_rpc.go | NewChatRPC | func NewChatRPC(config Config, kbCtx Context) *ChatRPC {
log := config.MakeLogger("")
deferLog := log.CloneWithAddedDepth(1)
c := &ChatRPC{
log: log,
vlog: config.MakeVLogger(log),
deferLog: deferLog,
config: config,
convCBs: make(map[string][]ChatChannelNewMessageCB),
}
conn := NewSharedKeyb... | go | func NewChatRPC(config Config, kbCtx Context) *ChatRPC {
log := config.MakeLogger("")
deferLog := log.CloneWithAddedDepth(1)
c := &ChatRPC{
log: log,
vlog: config.MakeVLogger(log),
deferLog: deferLog,
config: config,
convCBs: make(map[string][]ChatChannelNewMessageCB),
}
conn := NewSharedKeyb... | [
"func",
"NewChatRPC",
"(",
"config",
"Config",
",",
"kbCtx",
"Context",
")",
"*",
"ChatRPC",
"{",
"log",
":=",
"config",
".",
"MakeLogger",
"(",
"\"",
"\"",
")",
"\n",
"deferLog",
":=",
"log",
".",
"CloneWithAddedDepth",
"(",
"1",
")",
"\n",
"c",
":=",... | // NewChatRPC constructs a new RPC based chat implementation. | [
"NewChatRPC",
"constructs",
"a",
"new",
"RPC",
"based",
"chat",
"implementation",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/chat_rpc.go#L55-L68 |
161,146 | keybase/client | go/kbfs/libkbfs/chat_rpc.go | NewChatActivity | func (c *ChatRPC) NewChatActivity(
ctx context.Context, arg chat1.NewChatActivityArg) error {
activityType, err := arg.Activity.ActivityType()
if err != nil {
return err
}
switch activityType {
case chat1.ChatActivityType_NEW_CONVERSATION:
// If we learn about a new conversation for a given TLF,
// attempt ... | go | func (c *ChatRPC) NewChatActivity(
ctx context.Context, arg chat1.NewChatActivityArg) error {
activityType, err := arg.Activity.ActivityType()
if err != nil {
return err
}
switch activityType {
case chat1.ChatActivityType_NEW_CONVERSATION:
// If we learn about a new conversation for a given TLF,
// attempt ... | [
"func",
"(",
"c",
"*",
"ChatRPC",
")",
"NewChatActivity",
"(",
"ctx",
"context",
".",
"Context",
",",
"arg",
"chat1",
".",
"NewChatActivityArg",
")",
"error",
"{",
"activityType",
",",
"err",
":=",
"arg",
".",
"Activity",
".",
"ActivityType",
"(",
")",
"... | // NewChatActivity implements the chat1.NotifyChatInterface for
// ChatRPC. | [
"NewChatActivity",
"implements",
"the",
"chat1",
".",
"NotifyChatInterface",
"for",
"ChatRPC",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/chat_rpc.go#L667-L730 |
161,147 | keybase/client | go/kbfs/libkbfs/chat_rpc.go | ChatIdentifyUpdate | func (c *ChatRPC) ChatIdentifyUpdate(
_ context.Context, _ keybase1.CanonicalTLFNameAndIDWithBreaks) error {
return nil
} | go | func (c *ChatRPC) ChatIdentifyUpdate(
_ context.Context, _ keybase1.CanonicalTLFNameAndIDWithBreaks) error {
return nil
} | [
"func",
"(",
"c",
"*",
"ChatRPC",
")",
"ChatIdentifyUpdate",
"(",
"_",
"context",
".",
"Context",
",",
"_",
"keybase1",
".",
"CanonicalTLFNameAndIDWithBreaks",
")",
"error",
"{",
"return",
"nil",
"\n",
"}"
] | // ChatIdentifyUpdate implements the chat1.NotifyChatInterface for
// ChatRPC. | [
"ChatIdentifyUpdate",
"implements",
"the",
"chat1",
".",
"NotifyChatInterface",
"for",
"ChatRPC",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/chat_rpc.go#L734-L737 |
161,148 | keybase/client | go/kbfs/libkbfs/chat_rpc.go | ChatTLFFinalize | func (c *ChatRPC) ChatTLFFinalize(
_ context.Context, _ chat1.ChatTLFFinalizeArg) error {
return nil
} | go | func (c *ChatRPC) ChatTLFFinalize(
_ context.Context, _ chat1.ChatTLFFinalizeArg) error {
return nil
} | [
"func",
"(",
"c",
"*",
"ChatRPC",
")",
"ChatTLFFinalize",
"(",
"_",
"context",
".",
"Context",
",",
"_",
"chat1",
".",
"ChatTLFFinalizeArg",
")",
"error",
"{",
"return",
"nil",
"\n",
"}"
] | // ChatTLFFinalize implements the chat1.NotifyChatInterface for
// ChatRPC. | [
"ChatTLFFinalize",
"implements",
"the",
"chat1",
".",
"NotifyChatInterface",
"for",
"ChatRPC",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/chat_rpc.go#L741-L744 |
161,149 | keybase/client | go/kbfs/libkbfs/chat_rpc.go | ChatTLFResolve | func (c *ChatRPC) ChatTLFResolve(
_ context.Context, _ chat1.ChatTLFResolveArg) error {
return nil
} | go | func (c *ChatRPC) ChatTLFResolve(
_ context.Context, _ chat1.ChatTLFResolveArg) error {
return nil
} | [
"func",
"(",
"c",
"*",
"ChatRPC",
")",
"ChatTLFResolve",
"(",
"_",
"context",
".",
"Context",
",",
"_",
"chat1",
".",
"ChatTLFResolveArg",
")",
"error",
"{",
"return",
"nil",
"\n",
"}"
] | // ChatTLFResolve implements the chat1.NotifyChatInterface for
// ChatRPC. | [
"ChatTLFResolve",
"implements",
"the",
"chat1",
".",
"NotifyChatInterface",
"for",
"ChatRPC",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/chat_rpc.go#L748-L751 |
161,150 | keybase/client | go/kbfs/libkbfs/chat_rpc.go | ChatThreadsStale | func (c *ChatRPC) ChatThreadsStale(
_ context.Context, _ chat1.ChatThreadsStaleArg) error {
return nil
} | go | func (c *ChatRPC) ChatThreadsStale(
_ context.Context, _ chat1.ChatThreadsStaleArg) error {
return nil
} | [
"func",
"(",
"c",
"*",
"ChatRPC",
")",
"ChatThreadsStale",
"(",
"_",
"context",
".",
"Context",
",",
"_",
"chat1",
".",
"ChatThreadsStaleArg",
")",
"error",
"{",
"return",
"nil",
"\n",
"}"
] | // ChatThreadsStale implements the chat1.NotifyChatInterface for
// ChatRPC. | [
"ChatThreadsStale",
"implements",
"the",
"chat1",
".",
"NotifyChatInterface",
"for",
"ChatRPC",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/chat_rpc.go#L761-L764 |
161,151 | keybase/client | go/kbfs/libkbfs/chat_rpc.go | ChatTypingUpdate | func (c *ChatRPC) ChatTypingUpdate(
_ context.Context, _ []chat1.ConvTypingUpdate) error {
return nil
} | go | func (c *ChatRPC) ChatTypingUpdate(
_ context.Context, _ []chat1.ConvTypingUpdate) error {
return nil
} | [
"func",
"(",
"c",
"*",
"ChatRPC",
")",
"ChatTypingUpdate",
"(",
"_",
"context",
".",
"Context",
",",
"_",
"[",
"]",
"chat1",
".",
"ConvTypingUpdate",
")",
"error",
"{",
"return",
"nil",
"\n",
"}"
] | // ChatTypingUpdate implements the chat1.NotifyChatInterface for
// ChatRPC. | [
"ChatTypingUpdate",
"implements",
"the",
"chat1",
".",
"NotifyChatInterface",
"for",
"ChatRPC",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/chat_rpc.go#L768-L771 |
161,152 | keybase/client | go/kbfs/libkbfs/chat_rpc.go | ChatJoinedConversation | func (c *ChatRPC) ChatJoinedConversation(
_ context.Context, _ chat1.ChatJoinedConversationArg) error {
return nil
} | go | func (c *ChatRPC) ChatJoinedConversation(
_ context.Context, _ chat1.ChatJoinedConversationArg) error {
return nil
} | [
"func",
"(",
"c",
"*",
"ChatRPC",
")",
"ChatJoinedConversation",
"(",
"_",
"context",
".",
"Context",
",",
"_",
"chat1",
".",
"ChatJoinedConversationArg",
")",
"error",
"{",
"return",
"nil",
"\n",
"}"
] | // ChatJoinedConversation implements the chat1.NotifyChatInterface for
// ChatRPC. | [
"ChatJoinedConversation",
"implements",
"the",
"chat1",
".",
"NotifyChatInterface",
"for",
"ChatRPC",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/chat_rpc.go#L775-L778 |
161,153 | keybase/client | go/kbfs/libkbfs/chat_rpc.go | ChatLeftConversation | func (c *ChatRPC) ChatLeftConversation(
_ context.Context, _ chat1.ChatLeftConversationArg) error {
return nil
} | go | func (c *ChatRPC) ChatLeftConversation(
_ context.Context, _ chat1.ChatLeftConversationArg) error {
return nil
} | [
"func",
"(",
"c",
"*",
"ChatRPC",
")",
"ChatLeftConversation",
"(",
"_",
"context",
".",
"Context",
",",
"_",
"chat1",
".",
"ChatLeftConversationArg",
")",
"error",
"{",
"return",
"nil",
"\n",
"}"
] | // ChatLeftConversation implements the chat1.NotifyChatInterface for
// ChatRPC. | [
"ChatLeftConversation",
"implements",
"the",
"chat1",
".",
"NotifyChatInterface",
"for",
"ChatRPC",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/chat_rpc.go#L782-L785 |
161,154 | keybase/client | go/kbfs/libkbfs/chat_rpc.go | ChatResetConversation | func (c *ChatRPC) ChatResetConversation(
_ context.Context, _ chat1.ChatResetConversationArg) error {
return nil
} | go | func (c *ChatRPC) ChatResetConversation(
_ context.Context, _ chat1.ChatResetConversationArg) error {
return nil
} | [
"func",
"(",
"c",
"*",
"ChatRPC",
")",
"ChatResetConversation",
"(",
"_",
"context",
".",
"Context",
",",
"_",
"chat1",
".",
"ChatResetConversationArg",
")",
"error",
"{",
"return",
"nil",
"\n",
"}"
] | // ChatResetConversation implements the chat1.NotifyChatInterface for
// ChatRPC. | [
"ChatResetConversation",
"implements",
"the",
"chat1",
".",
"NotifyChatInterface",
"for",
"ChatRPC",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/chat_rpc.go#L789-L792 |
161,155 | keybase/client | go/kbfs/libkbfs/chat_rpc.go | ChatInboxSyncStarted | func (c *ChatRPC) ChatInboxSyncStarted(
_ context.Context, _ keybase1.UID) error {
return nil
} | go | func (c *ChatRPC) ChatInboxSyncStarted(
_ context.Context, _ keybase1.UID) error {
return nil
} | [
"func",
"(",
"c",
"*",
"ChatRPC",
")",
"ChatInboxSyncStarted",
"(",
"_",
"context",
".",
"Context",
",",
"_",
"keybase1",
".",
"UID",
")",
"error",
"{",
"return",
"nil",
"\n",
"}"
] | // ChatInboxSyncStarted implements the chat1.NotifyChatInterface for
// ChatRPC. | [
"ChatInboxSyncStarted",
"implements",
"the",
"chat1",
".",
"NotifyChatInterface",
"for",
"ChatRPC",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/chat_rpc.go#L796-L799 |
161,156 | keybase/client | go/kbfs/libkbfs/chat_rpc.go | ChatInboxSynced | func (c *ChatRPC) ChatInboxSynced(
_ context.Context, _ chat1.ChatInboxSyncedArg) error {
return nil
} | go | func (c *ChatRPC) ChatInboxSynced(
_ context.Context, _ chat1.ChatInboxSyncedArg) error {
return nil
} | [
"func",
"(",
"c",
"*",
"ChatRPC",
")",
"ChatInboxSynced",
"(",
"_",
"context",
".",
"Context",
",",
"_",
"chat1",
".",
"ChatInboxSyncedArg",
")",
"error",
"{",
"return",
"nil",
"\n",
"}"
] | // ChatInboxSynced implements the chat1.NotifyChatInterface for
// ChatRPC. | [
"ChatInboxSynced",
"implements",
"the",
"chat1",
".",
"NotifyChatInterface",
"for",
"ChatRPC",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/chat_rpc.go#L803-L806 |
161,157 | keybase/client | go/kbfs/libkbfs/chat_rpc.go | ChatSetConvRetention | func (c *ChatRPC) ChatSetConvRetention(
_ context.Context, _ chat1.ChatSetConvRetentionArg) error {
return nil
} | go | func (c *ChatRPC) ChatSetConvRetention(
_ context.Context, _ chat1.ChatSetConvRetentionArg) error {
return nil
} | [
"func",
"(",
"c",
"*",
"ChatRPC",
")",
"ChatSetConvRetention",
"(",
"_",
"context",
".",
"Context",
",",
"_",
"chat1",
".",
"ChatSetConvRetentionArg",
")",
"error",
"{",
"return",
"nil",
"\n",
"}"
] | // ChatSetConvRetention implements the chat1.NotifyChatInterface for
// ChatRPC. | [
"ChatSetConvRetention",
"implements",
"the",
"chat1",
".",
"NotifyChatInterface",
"for",
"ChatRPC",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/chat_rpc.go#L810-L813 |
161,158 | keybase/client | go/kbfs/libkbfs/chat_rpc.go | ChatSetTeamRetention | func (c *ChatRPC) ChatSetTeamRetention(
_ context.Context, _ chat1.ChatSetTeamRetentionArg) error {
return nil
} | go | func (c *ChatRPC) ChatSetTeamRetention(
_ context.Context, _ chat1.ChatSetTeamRetentionArg) error {
return nil
} | [
"func",
"(",
"c",
"*",
"ChatRPC",
")",
"ChatSetTeamRetention",
"(",
"_",
"context",
".",
"Context",
",",
"_",
"chat1",
".",
"ChatSetTeamRetentionArg",
")",
"error",
"{",
"return",
"nil",
"\n",
"}"
] | // ChatSetTeamRetention implements the chat1.NotifyChatInterface for
// ChatRPC. | [
"ChatSetTeamRetention",
"implements",
"the",
"chat1",
".",
"NotifyChatInterface",
"for",
"ChatRPC",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/chat_rpc.go#L817-L820 |
161,159 | keybase/client | go/kbfs/libkbfs/chat_rpc.go | ChatSetConvSettings | func (c *ChatRPC) ChatSetConvSettings(
_ context.Context, _ chat1.ChatSetConvSettingsArg) error {
return nil
} | go | func (c *ChatRPC) ChatSetConvSettings(
_ context.Context, _ chat1.ChatSetConvSettingsArg) error {
return nil
} | [
"func",
"(",
"c",
"*",
"ChatRPC",
")",
"ChatSetConvSettings",
"(",
"_",
"context",
".",
"Context",
",",
"_",
"chat1",
".",
"ChatSetConvSettingsArg",
")",
"error",
"{",
"return",
"nil",
"\n",
"}"
] | // ChatSetConvSettings implements the chat1.NotifyChatInterface for
// ChatRPC. | [
"ChatSetConvSettings",
"implements",
"the",
"chat1",
".",
"NotifyChatInterface",
"for",
"ChatRPC",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/chat_rpc.go#L824-L827 |
161,160 | keybase/client | go/kbfs/libkbfs/chat_rpc.go | ChatSubteamRename | func (c *ChatRPC) ChatSubteamRename(
_ context.Context, _ chat1.ChatSubteamRenameArg) error {
return nil
} | go | func (c *ChatRPC) ChatSubteamRename(
_ context.Context, _ chat1.ChatSubteamRenameArg) error {
return nil
} | [
"func",
"(",
"c",
"*",
"ChatRPC",
")",
"ChatSubteamRename",
"(",
"_",
"context",
".",
"Context",
",",
"_",
"chat1",
".",
"ChatSubteamRenameArg",
")",
"error",
"{",
"return",
"nil",
"\n",
"}"
] | // ChatSubteamRename implements the chat1.NotifyChatInterface for
// ChatRPC. | [
"ChatSubteamRename",
"implements",
"the",
"chat1",
".",
"NotifyChatInterface",
"for",
"ChatRPC",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/chat_rpc.go#L831-L834 |
161,161 | keybase/client | go/kbfs/libkbfs/chat_rpc.go | ChatKBFSToImpteamUpgrade | func (c *ChatRPC) ChatKBFSToImpteamUpgrade(
_ context.Context, _ chat1.ChatKBFSToImpteamUpgradeArg) error {
return nil
} | go | func (c *ChatRPC) ChatKBFSToImpteamUpgrade(
_ context.Context, _ chat1.ChatKBFSToImpteamUpgradeArg) error {
return nil
} | [
"func",
"(",
"c",
"*",
"ChatRPC",
")",
"ChatKBFSToImpteamUpgrade",
"(",
"_",
"context",
".",
"Context",
",",
"_",
"chat1",
".",
"ChatKBFSToImpteamUpgradeArg",
")",
"error",
"{",
"return",
"nil",
"\n",
"}"
] | // ChatKBFSToImpteamUpgrade implements the chat1.NotifyChatInterface
// for ChatRPC. | [
"ChatKBFSToImpteamUpgrade",
"implements",
"the",
"chat1",
".",
"NotifyChatInterface",
"for",
"ChatRPC",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/chat_rpc.go#L838-L841 |
161,162 | keybase/client | go/kbfs/libkbfs/chat_rpc.go | ChatAttachmentUploadStart | func (c *ChatRPC) ChatAttachmentUploadStart(
_ context.Context, _ chat1.ChatAttachmentUploadStartArg) error {
return nil
} | go | func (c *ChatRPC) ChatAttachmentUploadStart(
_ context.Context, _ chat1.ChatAttachmentUploadStartArg) error {
return nil
} | [
"func",
"(",
"c",
"*",
"ChatRPC",
")",
"ChatAttachmentUploadStart",
"(",
"_",
"context",
".",
"Context",
",",
"_",
"chat1",
".",
"ChatAttachmentUploadStartArg",
")",
"error",
"{",
"return",
"nil",
"\n",
"}"
] | // ChatAttachmentUploadStart implements the chat1.NotifyChatInterface
// for ChatRPC. | [
"ChatAttachmentUploadStart",
"implements",
"the",
"chat1",
".",
"NotifyChatInterface",
"for",
"ChatRPC",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/chat_rpc.go#L845-L848 |
161,163 | keybase/client | go/kbfs/libkbfs/chat_rpc.go | ChatAttachmentUploadProgress | func (c *ChatRPC) ChatAttachmentUploadProgress(
_ context.Context, _ chat1.ChatAttachmentUploadProgressArg) error {
return nil
} | go | func (c *ChatRPC) ChatAttachmentUploadProgress(
_ context.Context, _ chat1.ChatAttachmentUploadProgressArg) error {
return nil
} | [
"func",
"(",
"c",
"*",
"ChatRPC",
")",
"ChatAttachmentUploadProgress",
"(",
"_",
"context",
".",
"Context",
",",
"_",
"chat1",
".",
"ChatAttachmentUploadProgressArg",
")",
"error",
"{",
"return",
"nil",
"\n",
"}"
] | // ChatAttachmentUploadProgress implements the chat1.NotifyChatInterface
// for ChatRPC. | [
"ChatAttachmentUploadProgress",
"implements",
"the",
"chat1",
".",
"NotifyChatInterface",
"for",
"ChatRPC",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/chat_rpc.go#L852-L855 |
161,164 | keybase/client | go/kbfs/libkbfs/chat_rpc.go | ChatPaymentInfo | func (c *ChatRPC) ChatPaymentInfo(
_ context.Context, _ chat1.ChatPaymentInfoArg) error {
return nil
} | go | func (c *ChatRPC) ChatPaymentInfo(
_ context.Context, _ chat1.ChatPaymentInfoArg) error {
return nil
} | [
"func",
"(",
"c",
"*",
"ChatRPC",
")",
"ChatPaymentInfo",
"(",
"_",
"context",
".",
"Context",
",",
"_",
"chat1",
".",
"ChatPaymentInfoArg",
")",
"error",
"{",
"return",
"nil",
"\n",
"}"
] | // ChatPaymentInfo implements the chat1.NotifyChatInterface
// for ChatRPC. | [
"ChatPaymentInfo",
"implements",
"the",
"chat1",
".",
"NotifyChatInterface",
"for",
"ChatRPC",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/chat_rpc.go#L859-L862 |
161,165 | keybase/client | go/kbfs/libkbfs/chat_rpc.go | ChatRequestInfo | func (c *ChatRPC) ChatRequestInfo(
_ context.Context, _ chat1.ChatRequestInfoArg) error {
return nil
} | go | func (c *ChatRPC) ChatRequestInfo(
_ context.Context, _ chat1.ChatRequestInfoArg) error {
return nil
} | [
"func",
"(",
"c",
"*",
"ChatRPC",
")",
"ChatRequestInfo",
"(",
"_",
"context",
".",
"Context",
",",
"_",
"chat1",
".",
"ChatRequestInfoArg",
")",
"error",
"{",
"return",
"nil",
"\n",
"}"
] | // ChatRequestInfo implements the chat1.NotifyChatInterface
// for ChatRPC. | [
"ChatRequestInfo",
"implements",
"the",
"chat1",
".",
"NotifyChatInterface",
"for",
"ChatRPC",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/chat_rpc.go#L866-L869 |
161,166 | keybase/client | go/kbfs/libkbfs/chat_rpc.go | ChatPromptUnfurl | func (c *ChatRPC) ChatPromptUnfurl(_ context.Context, _ chat1.ChatPromptUnfurlArg) error {
return nil
} | go | func (c *ChatRPC) ChatPromptUnfurl(_ context.Context, _ chat1.ChatPromptUnfurlArg) error {
return nil
} | [
"func",
"(",
"c",
"*",
"ChatRPC",
")",
"ChatPromptUnfurl",
"(",
"_",
"context",
".",
"Context",
",",
"_",
"chat1",
".",
"ChatPromptUnfurlArg",
")",
"error",
"{",
"return",
"nil",
"\n",
"}"
] | // ChatPromptUnfurl implements the chat1.NotifyChatInterface
// for ChatRPC. | [
"ChatPromptUnfurl",
"implements",
"the",
"chat1",
".",
"NotifyChatInterface",
"for",
"ChatRPC",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/chat_rpc.go#L873-L875 |
161,167 | keybase/client | go/libkb/loopback.go | NewLoopbackListener | func NewLoopbackListener(ctx LogContext) *LoopbackListener {
return &LoopbackListener{
logCtx: ctx,
ch: make(chan *LoopbackConn),
isClosed: false,
}
} | go | func NewLoopbackListener(ctx LogContext) *LoopbackListener {
return &LoopbackListener{
logCtx: ctx,
ch: make(chan *LoopbackConn),
isClosed: false,
}
} | [
"func",
"NewLoopbackListener",
"(",
"ctx",
"LogContext",
")",
"*",
"LoopbackListener",
"{",
"return",
"&",
"LoopbackListener",
"{",
"logCtx",
":",
"ctx",
",",
"ch",
":",
"make",
"(",
"chan",
"*",
"LoopbackConn",
")",
",",
"isClosed",
":",
"false",
",",
"}"... | // NewLoopbackListener creates a new Loopback listener | [
"NewLoopbackListener",
"creates",
"a",
"new",
"Loopback",
"listener"
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/loopback.go#L51-L57 |
161,168 | keybase/client | go/libkb/loopback.go | NewLoopbackConnPair | func NewLoopbackConnPair() (*LoopbackConn, *LoopbackConn) {
aCh := make(chan []byte)
bCh := make(chan []byte)
a := &LoopbackConn{ch: aCh}
b := &LoopbackConn{ch: bCh}
a.partnerCh = bCh
b.partnerCh = aCh
return a, b
} | go | func NewLoopbackConnPair() (*LoopbackConn, *LoopbackConn) {
aCh := make(chan []byte)
bCh := make(chan []byte)
a := &LoopbackConn{ch: aCh}
b := &LoopbackConn{ch: bCh}
a.partnerCh = bCh
b.partnerCh = aCh
return a, b
} | [
"func",
"NewLoopbackConnPair",
"(",
")",
"(",
"*",
"LoopbackConn",
",",
"*",
"LoopbackConn",
")",
"{",
"aCh",
":=",
"make",
"(",
"chan",
"[",
"]",
"byte",
")",
"\n",
"bCh",
":=",
"make",
"(",
"chan",
"[",
"]",
"byte",
")",
"\n",
"a",
":=",
"&",
"... | // NewLoopbackConnPair makes a new loopback connection pair | [
"NewLoopbackConnPair",
"makes",
"a",
"new",
"loopback",
"connection",
"pair"
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/loopback.go#L60-L68 |
161,169 | keybase/client | go/libkb/loopback.go | Dial | func (ll *LoopbackListener) Dial() (net.Conn, error) {
ll.logCtx.GetLog().Debug("+ LoopbackListener.Dial")
ll.mutex.Lock()
defer ll.mutex.Unlock()
if ll.isClosed {
return nil, syscall.EINVAL
}
a, b := NewLoopbackConnPair()
ll.ch <- a
return b, nil
} | go | func (ll *LoopbackListener) Dial() (net.Conn, error) {
ll.logCtx.GetLog().Debug("+ LoopbackListener.Dial")
ll.mutex.Lock()
defer ll.mutex.Unlock()
if ll.isClosed {
return nil, syscall.EINVAL
}
a, b := NewLoopbackConnPair()
ll.ch <- a
return b, nil
} | [
"func",
"(",
"ll",
"*",
"LoopbackListener",
")",
"Dial",
"(",
")",
"(",
"net",
".",
"Conn",
",",
"error",
")",
"{",
"ll",
".",
"logCtx",
".",
"GetLog",
"(",
")",
".",
"Debug",
"(",
"\"",
"\"",
")",
"\n",
"ll",
".",
"mutex",
".",
"Lock",
"(",
... | // LoopbackDial dials the given LoopbackListener and yields an new net.Conn
// that's a connection to it. | [
"LoopbackDial",
"dials",
"the",
"given",
"LoopbackListener",
"and",
"yields",
"an",
"new",
"net",
".",
"Conn",
"that",
"s",
"a",
"connection",
"to",
"it",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/loopback.go#L72-L82 |
161,170 | keybase/client | go/libkb/loopback.go | Close | func (ll *LoopbackListener) Close() (err error) {
ll.mutex.Lock()
defer ll.mutex.Unlock()
if ll.isClosed {
return syscall.EINVAL
}
ll.isClosed = true
close(ll.ch)
return
} | go | func (ll *LoopbackListener) Close() (err error) {
ll.mutex.Lock()
defer ll.mutex.Unlock()
if ll.isClosed {
return syscall.EINVAL
}
ll.isClosed = true
close(ll.ch)
return
} | [
"func",
"(",
"ll",
"*",
"LoopbackListener",
")",
"Close",
"(",
")",
"(",
"err",
"error",
")",
"{",
"ll",
".",
"mutex",
".",
"Lock",
"(",
")",
"\n",
"defer",
"ll",
".",
"mutex",
".",
"Unlock",
"(",
")",
"\n",
"if",
"ll",
".",
"isClosed",
"{",
"r... | // Close closes the listener.
// Any blocked Accept operations will be unblocked and return errors | [
"Close",
"closes",
"the",
"listener",
".",
"Any",
"blocked",
"Accept",
"operations",
"will",
"be",
"unblocked",
"and",
"return",
"errors"
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/loopback.go#L102-L111 |
161,171 | keybase/client | go/libkb/loopback.go | Close | func (lc *LoopbackConn) Close() (err error) {
lc.wMutex.Lock()
defer lc.wMutex.Unlock()
if lc.isClosed {
return syscall.EINVAL
}
lc.isClosed = true
close(lc.ch)
return nil
} | go | func (lc *LoopbackConn) Close() (err error) {
lc.wMutex.Lock()
defer lc.wMutex.Unlock()
if lc.isClosed {
return syscall.EINVAL
}
lc.isClosed = true
close(lc.ch)
return nil
} | [
"func",
"(",
"lc",
"*",
"LoopbackConn",
")",
"Close",
"(",
")",
"(",
"err",
"error",
")",
"{",
"lc",
".",
"wMutex",
".",
"Lock",
"(",
")",
"\n",
"defer",
"lc",
".",
"wMutex",
".",
"Unlock",
"(",
")",
"\n",
"if",
"lc",
".",
"isClosed",
"{",
"ret... | // Close closes the connection.
// Any blocked Read or Write operations will be unblocked and return errors. | [
"Close",
"closes",
"the",
"connection",
".",
"Any",
"blocked",
"Read",
"or",
"Write",
"operations",
"will",
"be",
"unblocked",
"and",
"return",
"errors",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/loopback.go#L147-L156 |
161,172 | keybase/client | go/kbfs/libdokan/new_folder_name.go | lpcwstrToString | func lpcwstrToString(ptr *uint16) string {
if ptr == nil {
return ""
}
var len = 0
for tmp := ptr; *tmp != 0; tmp = (*uint16)(unsafe.Pointer((uintptr(unsafe.Pointer(tmp)) + 2))) {
len++
}
raw := ptrUcs2Slice(ptr, len)
return string(utf16.Decode(raw))
} | go | func lpcwstrToString(ptr *uint16) string {
if ptr == nil {
return ""
}
var len = 0
for tmp := ptr; *tmp != 0; tmp = (*uint16)(unsafe.Pointer((uintptr(unsafe.Pointer(tmp)) + 2))) {
len++
}
raw := ptrUcs2Slice(ptr, len)
return string(utf16.Decode(raw))
} | [
"func",
"lpcwstrToString",
"(",
"ptr",
"*",
"uint16",
")",
"string",
"{",
"if",
"ptr",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"var",
"len",
"=",
"0",
"\n",
"for",
"tmp",
":=",
"ptr",
";",
"*",
"tmp",
"!=",
"0",
";",
"tmp",
"="... | // lpcwstrToString converts a nul-terminated Windows wide string to a Go string, | [
"lpcwstrToString",
"converts",
"a",
"nul",
"-",
"terminated",
"Windows",
"wide",
"string",
"to",
"a",
"Go",
"string"
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libdokan/new_folder_name.go#L57-L67 |
161,173 | keybase/client | go/kbfs/libdokan/new_folder_name.go | ptrUcs2Slice | func ptrUcs2Slice(ptr *uint16, lenUcs2 int) []uint16 {
return *(*[]uint16)(unsafe.Pointer(&reflect.SliceHeader{
Data: uintptr(unsafe.Pointer(ptr)),
Len: lenUcs2,
Cap: lenUcs2}))
} | go | func ptrUcs2Slice(ptr *uint16, lenUcs2 int) []uint16 {
return *(*[]uint16)(unsafe.Pointer(&reflect.SliceHeader{
Data: uintptr(unsafe.Pointer(ptr)),
Len: lenUcs2,
Cap: lenUcs2}))
} | [
"func",
"ptrUcs2Slice",
"(",
"ptr",
"*",
"uint16",
",",
"lenUcs2",
"int",
")",
"[",
"]",
"uint16",
"{",
"return",
"*",
"(",
"*",
"[",
"]",
"uint16",
")",
"(",
"unsafe",
".",
"Pointer",
"(",
"&",
"reflect",
".",
"SliceHeader",
"{",
"Data",
":",
"uin... | // ptrUcs2Slice takes a C Windows wide string and length in UCS2
// and returns it aliased as a uint16 slice. | [
"ptrUcs2Slice",
"takes",
"a",
"C",
"Windows",
"wide",
"string",
"and",
"length",
"in",
"UCS2",
"and",
"returns",
"it",
"aliased",
"as",
"a",
"uint16",
"slice",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libdokan/new_folder_name.go#L71-L76 |
161,174 | keybase/client | go/kbfs/libfs/httpfs.go | Readdir | func (d *dir) Readdir(count int) (fis []os.FileInfo, err error) {
d.fs.log.CDebugf(d.fs.ctx, "ReadDir %s", count)
defer func() {
d.fs.deferLog.CDebugf(d.fs.ctx, "ReadDir done: %+v", err)
err = translateErr(err)
}()
return d.fs.readDir(d.node)
} | go | func (d *dir) Readdir(count int) (fis []os.FileInfo, err error) {
d.fs.log.CDebugf(d.fs.ctx, "ReadDir %s", count)
defer func() {
d.fs.deferLog.CDebugf(d.fs.ctx, "ReadDir done: %+v", err)
err = translateErr(err)
}()
return d.fs.readDir(d.node)
} | [
"func",
"(",
"d",
"*",
"dir",
")",
"Readdir",
"(",
"count",
"int",
")",
"(",
"fis",
"[",
"]",
"os",
".",
"FileInfo",
",",
"err",
"error",
")",
"{",
"d",
".",
"fs",
".",
"log",
".",
"CDebugf",
"(",
"d",
".",
"fs",
".",
"ctx",
",",
"\"",
"\""... | // Readdir reads children from d. | [
"Readdir",
"reads",
"children",
"from",
"d",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libfs/httpfs.go#L19-L27 |
161,175 | keybase/client | go/kbfs/libfs/httpfs.go | Read | func (fod fileOrDir) Read(p []byte) (n int, err error) {
defer func() {
if err != nil {
err = translateErr(err)
}
}()
if fod.file == nil {
return 0, libkbfs.NotFileError{}
}
return fod.file.Read(p)
} | go | func (fod fileOrDir) Read(p []byte) (n int, err error) {
defer func() {
if err != nil {
err = translateErr(err)
}
}()
if fod.file == nil {
return 0, libkbfs.NotFileError{}
}
return fod.file.Read(p)
} | [
"func",
"(",
"fod",
"fileOrDir",
")",
"Read",
"(",
"p",
"[",
"]",
"byte",
")",
"(",
"n",
"int",
",",
"err",
"error",
")",
"{",
"defer",
"func",
"(",
")",
"{",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"translateErr",
"(",
"err",
")",
"\n",
"... | // fileOrDir implements the http.File interface. | [
"fileOrDir",
"implements",
"the",
"http",
".",
"File",
"interface",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libfs/httpfs.go#L40-L50 |
161,176 | keybase/client | go/kbfs/libfs/httpfs.go | Close | func (fod fileOrDir) Close() (err error) {
defer func() {
if err != nil {
err = translateErr(err)
}
}()
if fod.file != nil {
err = fod.file.Close()
}
if fod.dir != nil {
fod.dir.node = nil
}
fod.file = nil
fod.dir = nil
return err
} | go | func (fod fileOrDir) Close() (err error) {
defer func() {
if err != nil {
err = translateErr(err)
}
}()
if fod.file != nil {
err = fod.file.Close()
}
if fod.dir != nil {
fod.dir.node = nil
}
fod.file = nil
fod.dir = nil
return err
} | [
"func",
"(",
"fod",
"fileOrDir",
")",
"Close",
"(",
")",
"(",
"err",
"error",
")",
"{",
"defer",
"func",
"(",
")",
"{",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"translateErr",
"(",
"err",
")",
"\n",
"}",
"\n",
"}",
"(",
")",
"\n",
"if",
"f... | // Close implements the http.File interface. | [
"Close",
"implements",
"the",
"http",
".",
"File",
"interface",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libfs/httpfs.go#L53-L68 |
161,177 | keybase/client | go/kbfs/libfs/httpfs.go | Seek | func (fod fileOrDir) Seek(offset int64, whence int) (n int64, err error) {
defer func() {
if err != nil {
err = translateErr(err)
}
}()
if fod.file == nil {
return 0, libkbfs.NotFileError{}
}
return fod.file.Seek(offset, whence)
} | go | func (fod fileOrDir) Seek(offset int64, whence int) (n int64, err error) {
defer func() {
if err != nil {
err = translateErr(err)
}
}()
if fod.file == nil {
return 0, libkbfs.NotFileError{}
}
return fod.file.Seek(offset, whence)
} | [
"func",
"(",
"fod",
"fileOrDir",
")",
"Seek",
"(",
"offset",
"int64",
",",
"whence",
"int",
")",
"(",
"n",
"int64",
",",
"err",
"error",
")",
"{",
"defer",
"func",
"(",
")",
"{",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"translateErr",
"(",
"er... | // Seek implements the http.File interface. | [
"Seek",
"implements",
"the",
"http",
".",
"File",
"interface",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libfs/httpfs.go#L71-L81 |
161,178 | keybase/client | go/kbfs/libfs/httpfs.go | Readdir | func (fod fileOrDir) Readdir(count int) (fis []os.FileInfo, err error) {
defer func() {
if err != nil {
err = translateErr(err)
}
}()
if fod.dir == nil {
return nil, libkbfs.NotDirError{}
}
return fod.dir.Readdir(count)
} | go | func (fod fileOrDir) Readdir(count int) (fis []os.FileInfo, err error) {
defer func() {
if err != nil {
err = translateErr(err)
}
}()
if fod.dir == nil {
return nil, libkbfs.NotDirError{}
}
return fod.dir.Readdir(count)
} | [
"func",
"(",
"fod",
"fileOrDir",
")",
"Readdir",
"(",
"count",
"int",
")",
"(",
"fis",
"[",
"]",
"os",
".",
"FileInfo",
",",
"err",
"error",
")",
"{",
"defer",
"func",
"(",
")",
"{",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"translateErr",
"(",... | // Readdir implements the http.File interface. | [
"Readdir",
"implements",
"the",
"http",
".",
"File",
"interface",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libfs/httpfs.go#L84-L94 |
161,179 | keybase/client | go/kbfs/libfs/httpfs.go | Stat | func (fod fileOrDir) Stat() (fi os.FileInfo, err error) {
defer func() {
if err != nil {
err = translateErr(err)
}
}()
if fod.file != nil {
return &FileInfo{
fs: fod.file.fs,
ei: fod.ei,
node: fod.file.node,
name: fod.file.node.GetBasename(),
}, nil
} else if fod.dir != nil {
return &Fi... | go | func (fod fileOrDir) Stat() (fi os.FileInfo, err error) {
defer func() {
if err != nil {
err = translateErr(err)
}
}()
if fod.file != nil {
return &FileInfo{
fs: fod.file.fs,
ei: fod.ei,
node: fod.file.node,
name: fod.file.node.GetBasename(),
}, nil
} else if fod.dir != nil {
return &Fi... | [
"func",
"(",
"fod",
"fileOrDir",
")",
"Stat",
"(",
")",
"(",
"fi",
"os",
".",
"FileInfo",
",",
"err",
"error",
")",
"{",
"defer",
"func",
"(",
")",
"{",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"translateErr",
"(",
"err",
")",
"\n",
"}",
"\n"... | // Stat implements the http.File interface. | [
"Stat",
"implements",
"the",
"http",
".",
"File",
"interface",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libfs/httpfs.go#L97-L119 |
161,180 | keybase/client | go/kbfs/libfs/httpfs.go | Open | func (hfs httpFileSystem) Open(filename string) (entry http.File, err error) {
hfs.fs.log.CDebugf(
hfs.fs.ctx, "hfs.Open %s", filename)
defer func() {
hfs.fs.deferLog.CDebugf(hfs.fs.ctx, "hfs.Open done: %+v", err)
if err != nil {
err = translateErr(err)
}
}()
n, ei, err := hfs.fs.lookupOrCreateEntry(fil... | go | func (hfs httpFileSystem) Open(filename string) (entry http.File, err error) {
hfs.fs.log.CDebugf(
hfs.fs.ctx, "hfs.Open %s", filename)
defer func() {
hfs.fs.deferLog.CDebugf(hfs.fs.ctx, "hfs.Open done: %+v", err)
if err != nil {
err = translateErr(err)
}
}()
n, ei, err := hfs.fs.lookupOrCreateEntry(fil... | [
"func",
"(",
"hfs",
"httpFileSystem",
")",
"Open",
"(",
"filename",
"string",
")",
"(",
"entry",
"http",
".",
"File",
",",
"err",
"error",
")",
"{",
"hfs",
".",
"fs",
".",
"log",
".",
"CDebugf",
"(",
"hfs",
".",
"fs",
".",
"ctx",
",",
"\"",
"\"",... | // Open implements the http.FileSystem interface. | [
"Open",
"implements",
"the",
"http",
".",
"FileSystem",
"interface",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libfs/httpfs.go#L130-L165 |
161,181 | keybase/client | go/chat/s3/attempt.go | Start | func (s AttemptStrategy) Start() *Attempt {
now := time.Now()
return &Attempt{
strategy: s,
last: now,
end: now.Add(s.Total),
force: true,
}
} | go | func (s AttemptStrategy) Start() *Attempt {
now := time.Now()
return &Attempt{
strategy: s,
last: now,
end: now.Add(s.Total),
force: true,
}
} | [
"func",
"(",
"s",
"AttemptStrategy",
")",
"Start",
"(",
")",
"*",
"Attempt",
"{",
"now",
":=",
"time",
".",
"Now",
"(",
")",
"\n",
"return",
"&",
"Attempt",
"{",
"strategy",
":",
"s",
",",
"last",
":",
"now",
",",
"end",
":",
"now",
".",
"Add",
... | // Start begins a new sequence of attempts for the given strategy. | [
"Start",
"begins",
"a",
"new",
"sequence",
"of",
"attempts",
"for",
"the",
"given",
"strategy",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/chat/s3/attempt.go#L25-L33 |
161,182 | keybase/client | go/chat/s3/attempt.go | Next | func (a *Attempt) Next() bool {
now := time.Now()
sleep := a.nextSleep(now)
if !a.force && !now.Add(sleep).Before(a.end) && a.strategy.Min <= a.count {
return false
}
a.force = false
if sleep > 0 && a.count > 0 {
time.Sleep(sleep)
now = time.Now()
}
a.count++
a.last = now
return true
} | go | func (a *Attempt) Next() bool {
now := time.Now()
sleep := a.nextSleep(now)
if !a.force && !now.Add(sleep).Before(a.end) && a.strategy.Min <= a.count {
return false
}
a.force = false
if sleep > 0 && a.count > 0 {
time.Sleep(sleep)
now = time.Now()
}
a.count++
a.last = now
return true
} | [
"func",
"(",
"a",
"*",
"Attempt",
")",
"Next",
"(",
")",
"bool",
"{",
"now",
":=",
"time",
".",
"Now",
"(",
")",
"\n",
"sleep",
":=",
"a",
".",
"nextSleep",
"(",
"now",
")",
"\n",
"if",
"!",
"a",
".",
"force",
"&&",
"!",
"now",
".",
"Add",
... | // Next waits until it is time to perform the next attempt or returns
// false if it is time to stop trying. | [
"Next",
"waits",
"until",
"it",
"is",
"time",
"to",
"perform",
"the",
"next",
"attempt",
"or",
"returns",
"false",
"if",
"it",
"is",
"time",
"to",
"stop",
"trying",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/chat/s3/attempt.go#L37-L51 |
161,183 | keybase/client | go/chat/s3/attempt.go | HasNext | func (a *Attempt) HasNext() bool {
if a.force || a.strategy.Min > a.count {
return true
}
now := time.Now()
if now.Add(a.nextSleep(now)).Before(a.end) {
a.force = true
return true
}
return false
} | go | func (a *Attempt) HasNext() bool {
if a.force || a.strategy.Min > a.count {
return true
}
now := time.Now()
if now.Add(a.nextSleep(now)).Before(a.end) {
a.force = true
return true
}
return false
} | [
"func",
"(",
"a",
"*",
"Attempt",
")",
"HasNext",
"(",
")",
"bool",
"{",
"if",
"a",
".",
"force",
"||",
"a",
".",
"strategy",
".",
"Min",
">",
"a",
".",
"count",
"{",
"return",
"true",
"\n",
"}",
"\n",
"now",
":=",
"time",
".",
"Now",
"(",
")... | // HasNext returns whether another attempt will be made if the current
// one fails. If it returns true, the following call to Next is
// guaranteed to return true. | [
"HasNext",
"returns",
"whether",
"another",
"attempt",
"will",
"be",
"made",
"if",
"the",
"current",
"one",
"fails",
".",
"If",
"it",
"returns",
"true",
"the",
"following",
"call",
"to",
"Next",
"is",
"guaranteed",
"to",
"return",
"true",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/chat/s3/attempt.go#L64-L74 |
161,184 | keybase/client | go/stellar/note.go | noteSymmetricKey | func noteSymmetricKey(mctx libkb.MetaContext, other *keybase1.UserVersion) (res noteBuildSecret, err error) {
meUV, err := mctx.G().GetMeUV(mctx.Ctx())
if err != nil {
return res, err
}
puk1Gen, puk1Seed, err := loadOwnLatestPuk(mctx)
if err != nil {
return res, err
}
symmetricKey, err := puk1Seed.DeriveSymm... | go | func noteSymmetricKey(mctx libkb.MetaContext, other *keybase1.UserVersion) (res noteBuildSecret, err error) {
meUV, err := mctx.G().GetMeUV(mctx.Ctx())
if err != nil {
return res, err
}
puk1Gen, puk1Seed, err := loadOwnLatestPuk(mctx)
if err != nil {
return res, err
}
symmetricKey, err := puk1Seed.DeriveSymm... | [
"func",
"noteSymmetricKey",
"(",
"mctx",
"libkb",
".",
"MetaContext",
",",
"other",
"*",
"keybase1",
".",
"UserVersion",
")",
"(",
"res",
"noteBuildSecret",
",",
"err",
"error",
")",
"{",
"meUV",
",",
"err",
":=",
"mctx",
".",
"G",
"(",
")",
".",
"GetM... | // noteSymmetricKey returns a symmetric key to be used in encrypting a note.
// The key is available to the current user and to the optional `other` recipient.
// If `other` is nil the key is derived from the latest PUK seed.
// If `other` is non-nil the key is derived from the nacl shared key of both users' latest PUK... | [
"noteSymmetricKey",
"returns",
"a",
"symmetric",
"key",
"to",
"be",
"used",
"in",
"encrypting",
"a",
"note",
".",
"The",
"key",
"is",
"available",
"to",
"the",
"current",
"user",
"and",
"to",
"the",
"optional",
"other",
"recipient",
".",
"If",
"other",
"is... | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/note.go#L27-L68 |
161,185 | keybase/client | go/stellar/note.go | noteMixKeys | func noteMixKeys(mctx libkb.MetaContext, puk1 libkb.PerUserKeySeed, puk2EncKID keybase1.KID) (res libkb.NaclSecretBoxKey, err error) {
puk1Enc, err := puk1.DeriveDHKey()
if err != nil {
return res, err
}
puk2EncGeneric, err := libkb.ImportKeypairFromKID(puk2EncKID)
if err != nil {
return res, err
}
puk2Enc, ... | go | func noteMixKeys(mctx libkb.MetaContext, puk1 libkb.PerUserKeySeed, puk2EncKID keybase1.KID) (res libkb.NaclSecretBoxKey, err error) {
puk1Enc, err := puk1.DeriveDHKey()
if err != nil {
return res, err
}
puk2EncGeneric, err := libkb.ImportKeypairFromKID(puk2EncKID)
if err != nil {
return res, err
}
puk2Enc, ... | [
"func",
"noteMixKeys",
"(",
"mctx",
"libkb",
".",
"MetaContext",
",",
"puk1",
"libkb",
".",
"PerUserKeySeed",
",",
"puk2EncKID",
"keybase1",
".",
"KID",
")",
"(",
"res",
"libkb",
".",
"NaclSecretBoxKey",
",",
"err",
"error",
")",
"{",
"puk1Enc",
",",
"err"... | // noteMixKeys derives a shared symmetric key for two DH keys.
// The key is the last 32 bytes of the nacl box of 32 zeros with a use-specific nonce. | [
"noteMixKeys",
"derives",
"a",
"shared",
"symmetric",
"key",
"for",
"two",
"DH",
"keys",
".",
"The",
"key",
"is",
"the",
"last",
"32",
"bytes",
"of",
"the",
"nacl",
"box",
"of",
"32",
"zeros",
"with",
"a",
"use",
"-",
"specific",
"nonce",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/note.go#L112-L131 |
161,186 | keybase/client | go/stellar/note.go | noteMixPukNonce | func noteMixPukNonce() (res [24]byte) {
reasonHash := sha256.Sum256([]byte(libkb.DeriveReasonPUKStellarNoteShared))
copy(res[:], reasonHash[:])
return res
} | go | func noteMixPukNonce() (res [24]byte) {
reasonHash := sha256.Sum256([]byte(libkb.DeriveReasonPUKStellarNoteShared))
copy(res[:], reasonHash[:])
return res
} | [
"func",
"noteMixPukNonce",
"(",
")",
"(",
"res",
"[",
"24",
"]",
"byte",
")",
"{",
"reasonHash",
":=",
"sha256",
".",
"Sum256",
"(",
"[",
"]",
"byte",
"(",
"libkb",
".",
"DeriveReasonPUKStellarNoteShared",
")",
")",
"\n",
"copy",
"(",
"res",
"[",
":",
... | // noteMixPukNonce is a nonce used in key derivation for shared notes.
// 24-byte prefix of the sha256 hash of a constant string. | [
"noteMixPukNonce",
"is",
"a",
"nonce",
"used",
"in",
"key",
"derivation",
"for",
"shared",
"notes",
".",
"24",
"-",
"byte",
"prefix",
"of",
"the",
"sha256",
"hash",
"of",
"a",
"constant",
"string",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/note.go#L135-L139 |
161,187 | keybase/client | go/stellar/note.go | noteEncrypt | func noteEncrypt(mctx libkb.MetaContext, note stellar1.NoteContents, other *keybase1.UserVersion) (res stellar1.EncryptedNote, err error) {
nbs, err := noteSymmetricKey(mctx, other)
if err != nil {
return res, fmt.Errorf("error getting encryption key for note: %v", err)
}
if nbs.symmetricKey.IsZero() {
// This ... | go | func noteEncrypt(mctx libkb.MetaContext, note stellar1.NoteContents, other *keybase1.UserVersion) (res stellar1.EncryptedNote, err error) {
nbs, err := noteSymmetricKey(mctx, other)
if err != nil {
return res, fmt.Errorf("error getting encryption key for note: %v", err)
}
if nbs.symmetricKey.IsZero() {
// This ... | [
"func",
"noteEncrypt",
"(",
"mctx",
"libkb",
".",
"MetaContext",
",",
"note",
"stellar1",
".",
"NoteContents",
",",
"other",
"*",
"keybase1",
".",
"UserVersion",
")",
"(",
"res",
"stellar1",
".",
"EncryptedNote",
",",
"err",
"error",
")",
"{",
"nbs",
",",
... | // noteEncrypt encrypts a note for the logged-in user as well as optionally for `other`. | [
"noteEncrypt",
"encrypts",
"a",
"note",
"for",
"the",
"logged",
"-",
"in",
"user",
"as",
"well",
"as",
"optionally",
"for",
"other",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/note.go#L163-L179 |
161,188 | keybase/client | go/stellar/note.go | noteEncryptHelper | func noteEncryptHelper(ctx context.Context, note stellar1.NoteContents, symmetricKey libkb.NaclSecretBoxKey) (res stellar1.EncryptedNote, err error) {
// Msgpack
clearpack, err := libkb.MsgpackEncode(note)
if err != nil {
return res, err
}
// Secretbox
var nonce [libkb.NaclDHNonceSize]byte
nonce, err = libkb.... | go | func noteEncryptHelper(ctx context.Context, note stellar1.NoteContents, symmetricKey libkb.NaclSecretBoxKey) (res stellar1.EncryptedNote, err error) {
// Msgpack
clearpack, err := libkb.MsgpackEncode(note)
if err != nil {
return res, err
}
// Secretbox
var nonce [libkb.NaclDHNonceSize]byte
nonce, err = libkb.... | [
"func",
"noteEncryptHelper",
"(",
"ctx",
"context",
".",
"Context",
",",
"note",
"stellar1",
".",
"NoteContents",
",",
"symmetricKey",
"libkb",
".",
"NaclSecretBoxKey",
")",
"(",
"res",
"stellar1",
".",
"EncryptedNote",
",",
"err",
"error",
")",
"{",
"// Msgpa... | // noteEncryptHelper does the encryption part and returns a partially populated result. | [
"noteEncryptHelper",
"does",
"the",
"encryption",
"part",
"and",
"returns",
"a",
"partially",
"populated",
"result",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/note.go#L182-L202 |
161,189 | keybase/client | go/kbfs/libkbfs/mdcache.go | NewMDCacheStandard | func NewMDCacheStandard(capacity int) *MDCacheStandard {
mdLRU, err := lru.New(capacity)
if err != nil {
return nil
}
idLRU, err := lru.New(capacity)
if err != nil {
return nil
}
// Hard-code the nextMD cache size to something small, since only
// one entry is used for each revoked device we need to verify.... | go | func NewMDCacheStandard(capacity int) *MDCacheStandard {
mdLRU, err := lru.New(capacity)
if err != nil {
return nil
}
idLRU, err := lru.New(capacity)
if err != nil {
return nil
}
// Hard-code the nextMD cache size to something small, since only
// one entry is used for each revoked device we need to verify.... | [
"func",
"NewMDCacheStandard",
"(",
"capacity",
"int",
")",
"*",
"MDCacheStandard",
"{",
"mdLRU",
",",
"err",
":=",
"lru",
".",
"New",
"(",
"capacity",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"idLRU",
",",
"err",
":... | // NewMDCacheStandard constructs a new MDCacheStandard using the given
// cache capacity. | [
"NewMDCacheStandard",
"constructs",
"a",
"new",
"MDCacheStandard",
"using",
"the",
"given",
"cache",
"capacity",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/mdcache.go#L43-L59 |
161,190 | keybase/client | go/kbfs/libkbfs/mdcache.go | Get | func (md *MDCacheStandard) Get(tlf tlf.ID, rev kbfsmd.Revision, bid kbfsmd.BranchID) (
ImmutableRootMetadata, error) {
md.lock.RLock()
defer md.lock.RUnlock()
key := mdCacheKey{tlf, rev, bid}
if tmp, ok := md.lru.Get(key); ok {
if rmd, ok := tmp.(ImmutableRootMetadata); ok {
return rmd, nil
}
return Immut... | go | func (md *MDCacheStandard) Get(tlf tlf.ID, rev kbfsmd.Revision, bid kbfsmd.BranchID) (
ImmutableRootMetadata, error) {
md.lock.RLock()
defer md.lock.RUnlock()
key := mdCacheKey{tlf, rev, bid}
if tmp, ok := md.lru.Get(key); ok {
if rmd, ok := tmp.(ImmutableRootMetadata); ok {
return rmd, nil
}
return Immut... | [
"func",
"(",
"md",
"*",
"MDCacheStandard",
")",
"Get",
"(",
"tlf",
"tlf",
".",
"ID",
",",
"rev",
"kbfsmd",
".",
"Revision",
",",
"bid",
"kbfsmd",
".",
"BranchID",
")",
"(",
"ImmutableRootMetadata",
",",
"error",
")",
"{",
"md",
".",
"lock",
".",
"RLo... | // Get implements the MDCache interface for MDCacheStandard. | [
"Get",
"implements",
"the",
"MDCache",
"interface",
"for",
"MDCacheStandard",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/mdcache.go#L62-L74 |
161,191 | keybase/client | go/kbfs/libkbfs/mdcache.go | Put | func (md *MDCacheStandard) Put(rmd ImmutableRootMetadata) error {
md.lock.Lock()
defer md.lock.Unlock()
key := mdCacheKey{rmd.TlfID(), rmd.Revision(), rmd.BID()}
if _, ok := md.lru.Get(key); ok {
// Don't overwrite the cache. In the case that `rmd` is
// different from what's in the cache, we require that uppe... | go | func (md *MDCacheStandard) Put(rmd ImmutableRootMetadata) error {
md.lock.Lock()
defer md.lock.Unlock()
key := mdCacheKey{rmd.TlfID(), rmd.Revision(), rmd.BID()}
if _, ok := md.lru.Get(key); ok {
// Don't overwrite the cache. In the case that `rmd` is
// different from what's in the cache, we require that uppe... | [
"func",
"(",
"md",
"*",
"MDCacheStandard",
")",
"Put",
"(",
"rmd",
"ImmutableRootMetadata",
")",
"error",
"{",
"md",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"md",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"key",
":=",
"mdCacheKey",
"{",
... | // Put implements the MDCache interface for MDCacheStandard. | [
"Put",
"implements",
"the",
"MDCache",
"interface",
"for",
"MDCacheStandard",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/mdcache.go#L77-L90 |
161,192 | keybase/client | go/kbfs/libkbfs/mdcache.go | Delete | func (md *MDCacheStandard) Delete(tlf tlf.ID, rev kbfsmd.Revision,
bid kbfsmd.BranchID) {
md.lock.Lock()
defer md.lock.Unlock()
key := mdCacheKey{tlf, rev, bid}
md.lru.Remove(key)
} | go | func (md *MDCacheStandard) Delete(tlf tlf.ID, rev kbfsmd.Revision,
bid kbfsmd.BranchID) {
md.lock.Lock()
defer md.lock.Unlock()
key := mdCacheKey{tlf, rev, bid}
md.lru.Remove(key)
} | [
"func",
"(",
"md",
"*",
"MDCacheStandard",
")",
"Delete",
"(",
"tlf",
"tlf",
".",
"ID",
",",
"rev",
"kbfsmd",
".",
"Revision",
",",
"bid",
"kbfsmd",
".",
"BranchID",
")",
"{",
"md",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"md",
".",
"l... | // Delete implements the MDCache interface for MDCacheStandard. | [
"Delete",
"implements",
"the",
"MDCache",
"interface",
"for",
"MDCacheStandard",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/mdcache.go#L93-L99 |
161,193 | keybase/client | go/kbfs/libkbfs/mdcache.go | Replace | func (md *MDCacheStandard) Replace(newRmd ImmutableRootMetadata,
oldBID kbfsmd.BranchID) error {
md.lock.Lock()
defer md.lock.Unlock()
oldKey := mdCacheKey{newRmd.TlfID(), newRmd.Revision(), oldBID}
newKey := mdCacheKey{newRmd.TlfID(), newRmd.Revision(), newRmd.BID()}
// TODO: implement our own LRU where we can r... | go | func (md *MDCacheStandard) Replace(newRmd ImmutableRootMetadata,
oldBID kbfsmd.BranchID) error {
md.lock.Lock()
defer md.lock.Unlock()
oldKey := mdCacheKey{newRmd.TlfID(), newRmd.Revision(), oldBID}
newKey := mdCacheKey{newRmd.TlfID(), newRmd.Revision(), newRmd.BID()}
// TODO: implement our own LRU where we can r... | [
"func",
"(",
"md",
"*",
"MDCacheStandard",
")",
"Replace",
"(",
"newRmd",
"ImmutableRootMetadata",
",",
"oldBID",
"kbfsmd",
".",
"BranchID",
")",
"error",
"{",
"md",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"md",
".",
"lock",
".",
"Unlock",
"... | // Replace implements the MDCache interface for MDCacheStandard. | [
"Replace",
"implements",
"the",
"MDCache",
"interface",
"for",
"MDCacheStandard",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/mdcache.go#L102-L113 |
161,194 | keybase/client | go/kbfs/libkbfs/mdcache.go | MarkPutToServer | func (md *MDCacheStandard) MarkPutToServer(
tlf tlf.ID, rev kbfsmd.Revision, bid kbfsmd.BranchID) {
md.lock.Lock()
defer md.lock.Unlock()
key := mdCacheKey{tlf, rev, bid}
tmp, ok := md.lru.Get(key)
if !ok {
return
}
rmd, ok := tmp.(ImmutableRootMetadata)
if !ok {
return
}
rmd.putToServer = true
md.lru.A... | go | func (md *MDCacheStandard) MarkPutToServer(
tlf tlf.ID, rev kbfsmd.Revision, bid kbfsmd.BranchID) {
md.lock.Lock()
defer md.lock.Unlock()
key := mdCacheKey{tlf, rev, bid}
tmp, ok := md.lru.Get(key)
if !ok {
return
}
rmd, ok := tmp.(ImmutableRootMetadata)
if !ok {
return
}
rmd.putToServer = true
md.lru.A... | [
"func",
"(",
"md",
"*",
"MDCacheStandard",
")",
"MarkPutToServer",
"(",
"tlf",
"tlf",
".",
"ID",
",",
"rev",
"kbfsmd",
".",
"Revision",
",",
"bid",
"kbfsmd",
".",
"BranchID",
")",
"{",
"md",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"md",
... | // MarkPutToServer implements the MDCache interface for
// MDCacheStandard. | [
"MarkPutToServer",
"implements",
"the",
"MDCache",
"interface",
"for",
"MDCacheStandard",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/mdcache.go#L117-L132 |
161,195 | keybase/client | go/kbfs/libkbfs/mdcache.go | GetIDForHandle | func (md *MDCacheStandard) GetIDForHandle(handle *tlfhandle.Handle) (tlf.ID, error) {
md.lock.RLock()
defer md.lock.RUnlock()
key := handle.GetCanonicalPath()
tmp, ok := md.idLRU.Get(key)
if !ok {
return tlf.NullID, NoSuchTlfIDError{handle}
}
id, ok := tmp.(tlf.ID)
if !ok {
return tlf.NullID, errors.Errorf(... | go | func (md *MDCacheStandard) GetIDForHandle(handle *tlfhandle.Handle) (tlf.ID, error) {
md.lock.RLock()
defer md.lock.RUnlock()
key := handle.GetCanonicalPath()
tmp, ok := md.idLRU.Get(key)
if !ok {
return tlf.NullID, NoSuchTlfIDError{handle}
}
id, ok := tmp.(tlf.ID)
if !ok {
return tlf.NullID, errors.Errorf(... | [
"func",
"(",
"md",
"*",
"MDCacheStandard",
")",
"GetIDForHandle",
"(",
"handle",
"*",
"tlfhandle",
".",
"Handle",
")",
"(",
"tlf",
".",
"ID",
",",
"error",
")",
"{",
"md",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"md",
".",
"lock",
".",
... | // GetIDForHandle implements the MDCache interface for
// MDCacheStandard. | [
"GetIDForHandle",
"implements",
"the",
"MDCache",
"interface",
"for",
"MDCacheStandard",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/mdcache.go#L136-L149 |
161,196 | keybase/client | go/kbfs/libkbfs/mdcache.go | PutIDForHandle | func (md *MDCacheStandard) PutIDForHandle(handle *tlfhandle.Handle, id tlf.ID) error {
md.lock.RLock()
defer md.lock.RUnlock()
key := handle.GetCanonicalPath()
md.idLRU.Add(key, id)
return nil
} | go | func (md *MDCacheStandard) PutIDForHandle(handle *tlfhandle.Handle, id tlf.ID) error {
md.lock.RLock()
defer md.lock.RUnlock()
key := handle.GetCanonicalPath()
md.idLRU.Add(key, id)
return nil
} | [
"func",
"(",
"md",
"*",
"MDCacheStandard",
")",
"PutIDForHandle",
"(",
"handle",
"*",
"tlfhandle",
".",
"Handle",
",",
"id",
"tlf",
".",
"ID",
")",
"error",
"{",
"md",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"md",
".",
"lock",
".",
"RUn... | // PutIDForHandle implements the MDCache interface for
// MDCacheStandard. | [
"PutIDForHandle",
"implements",
"the",
"MDCache",
"interface",
"for",
"MDCacheStandard",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/mdcache.go#L153-L159 |
161,197 | keybase/client | go/kbfs/libkbfs/mdcache.go | ChangeHandleForID | func (md *MDCacheStandard) ChangeHandleForID(
oldHandle *tlfhandle.Handle, newHandle *tlfhandle.Handle) {
md.lock.RLock()
defer md.lock.RUnlock()
oldKey := oldHandle.GetCanonicalPath()
tmp, ok := md.idLRU.Get(oldKey)
if !ok {
return
}
md.idLRU.Remove(oldKey)
newKey := newHandle.GetCanonicalPath()
md.idLRU.A... | go | func (md *MDCacheStandard) ChangeHandleForID(
oldHandle *tlfhandle.Handle, newHandle *tlfhandle.Handle) {
md.lock.RLock()
defer md.lock.RUnlock()
oldKey := oldHandle.GetCanonicalPath()
tmp, ok := md.idLRU.Get(oldKey)
if !ok {
return
}
md.idLRU.Remove(oldKey)
newKey := newHandle.GetCanonicalPath()
md.idLRU.A... | [
"func",
"(",
"md",
"*",
"MDCacheStandard",
")",
"ChangeHandleForID",
"(",
"oldHandle",
"*",
"tlfhandle",
".",
"Handle",
",",
"newHandle",
"*",
"tlfhandle",
".",
"Handle",
")",
"{",
"md",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"md",
".",
"l... | // ChangeHandleForID implements the MDCache interface for
// MDCacheStandard. | [
"ChangeHandleForID",
"implements",
"the",
"MDCache",
"interface",
"for",
"MDCacheStandard",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/mdcache.go#L163-L176 |
161,198 | keybase/client | go/kbfs/libkbfs/mdcache.go | GetNextMD | func (md *MDCacheStandard) GetNextMD(tlfID tlf.ID, rootSeqno keybase1.Seqno) (
nextKbfsRoot *kbfsmd.MerkleRoot, nextMerkleNodes [][]byte,
nextRootSeqno keybase1.Seqno, err error) {
key := mdcacheNextMDKey{tlfID, rootSeqno}
tmp, ok := md.nextMDLRU.Get(key)
if !ok {
return nil, nil, 0, NextMDNotCachedError{tlfID, ... | go | func (md *MDCacheStandard) GetNextMD(tlfID tlf.ID, rootSeqno keybase1.Seqno) (
nextKbfsRoot *kbfsmd.MerkleRoot, nextMerkleNodes [][]byte,
nextRootSeqno keybase1.Seqno, err error) {
key := mdcacheNextMDKey{tlfID, rootSeqno}
tmp, ok := md.nextMDLRU.Get(key)
if !ok {
return nil, nil, 0, NextMDNotCachedError{tlfID, ... | [
"func",
"(",
"md",
"*",
"MDCacheStandard",
")",
"GetNextMD",
"(",
"tlfID",
"tlf",
".",
"ID",
",",
"rootSeqno",
"keybase1",
".",
"Seqno",
")",
"(",
"nextKbfsRoot",
"*",
"kbfsmd",
".",
"MerkleRoot",
",",
"nextMerkleNodes",
"[",
"]",
"[",
"]",
"byte",
",",
... | // GetNextMD implements the MDCache interface for MDCacheStandard. | [
"GetNextMD",
"implements",
"the",
"MDCache",
"interface",
"for",
"MDCacheStandard",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/mdcache.go#L190-L204 |
161,199 | keybase/client | go/kbfs/libkbfs/mdcache.go | PutNextMD | func (md *MDCacheStandard) PutNextMD(
tlfID tlf.ID, rootSeqno keybase1.Seqno, nextKbfsRoot *kbfsmd.MerkleRoot,
nextMerkleNodes [][]byte, nextRootSeqno keybase1.Seqno) error {
key := mdcacheNextMDKey{tlfID, rootSeqno}
val := mdcacheNextMDVal{nextKbfsRoot, nextMerkleNodes, nextRootSeqno}
md.nextMDLRU.Add(key, val)
... | go | func (md *MDCacheStandard) PutNextMD(
tlfID tlf.ID, rootSeqno keybase1.Seqno, nextKbfsRoot *kbfsmd.MerkleRoot,
nextMerkleNodes [][]byte, nextRootSeqno keybase1.Seqno) error {
key := mdcacheNextMDKey{tlfID, rootSeqno}
val := mdcacheNextMDVal{nextKbfsRoot, nextMerkleNodes, nextRootSeqno}
md.nextMDLRU.Add(key, val)
... | [
"func",
"(",
"md",
"*",
"MDCacheStandard",
")",
"PutNextMD",
"(",
"tlfID",
"tlf",
".",
"ID",
",",
"rootSeqno",
"keybase1",
".",
"Seqno",
",",
"nextKbfsRoot",
"*",
"kbfsmd",
".",
"MerkleRoot",
",",
"nextMerkleNodes",
"[",
"]",
"[",
"]",
"byte",
",",
"next... | // PutNextMD implements the MDCache interface for MDCacheStandard. | [
"PutNextMD",
"implements",
"the",
"MDCache",
"interface",
"for",
"MDCacheStandard",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/mdcache.go#L207-L214 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.