id
int32
0
167k
repo
stringlengths
5
54
path
stringlengths
4
155
func_name
stringlengths
1
118
original_string
stringlengths
52
85.5k
language
stringclasses
1 value
code
stringlengths
52
85.5k
code_tokens
listlengths
21
1.41k
docstring
stringlengths
6
2.61k
docstring_tokens
listlengths
3
215
sha
stringlengths
40
40
url
stringlengths
85
252
160,800
keybase/client
go/chat/boxer.go
boxV1
func (b *Boxer) boxV1(messagePlaintext chat1.MessagePlaintext, key types.CryptKey, signingKeyPair libkb.NaclSigningKeyPair) (res chat1.MessageBoxed, err error) { body := chat1.BodyPlaintextV1{ MessageBody: messagePlaintext.MessageBody, } plaintextBody := chat1.NewBodyPlaintextWithV1(body) encryptedBody, err := ...
go
func (b *Boxer) boxV1(messagePlaintext chat1.MessagePlaintext, key types.CryptKey, signingKeyPair libkb.NaclSigningKeyPair) (res chat1.MessageBoxed, err error) { body := chat1.BodyPlaintextV1{ MessageBody: messagePlaintext.MessageBody, } plaintextBody := chat1.NewBodyPlaintextWithV1(body) encryptedBody, err := ...
[ "func", "(", "b", "*", "Boxer", ")", "boxV1", "(", "messagePlaintext", "chat1", ".", "MessagePlaintext", ",", "key", "types", ".", "CryptKey", ",", "signingKeyPair", "libkb", ".", "NaclSigningKeyPair", ")", "(", "res", "chat1", ".", "MessageBoxed", ",", "err...
// boxMessageWithKeys encrypts and signs a keybase1.MessagePlaintext into a // chat1.MessageBoxed given a keybase1.CryptKey.
[ "boxMessageWithKeys", "encrypts", "and", "signs", "a", "keybase1", ".", "MessagePlaintext", "into", "a", "chat1", ".", "MessageBoxed", "given", "a", "keybase1", ".", "CryptKey", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/chat/boxer.go#L1509-L1561
160,801
keybase/client
go/chat/boxer.go
boxV2orV3orV4
func (b *Boxer) boxV2orV3orV4(ctx context.Context, messagePlaintext chat1.MessagePlaintext, baseEncryptionKey types.CryptKey, ephemeralSeed *keybase1.TeamEk, signingKeyPair libkb.NaclSigningKeyPair, version chat1.MessageBoxedVersion, pairwiseMACRecipients []keybase1.KID) (res chat1.MessageBoxed, err error) { if mes...
go
func (b *Boxer) boxV2orV3orV4(ctx context.Context, messagePlaintext chat1.MessagePlaintext, baseEncryptionKey types.CryptKey, ephemeralSeed *keybase1.TeamEk, signingKeyPair libkb.NaclSigningKeyPair, version chat1.MessageBoxedVersion, pairwiseMACRecipients []keybase1.KID) (res chat1.MessageBoxed, err error) { if mes...
[ "func", "(", "b", "*", "Boxer", ")", "boxV2orV3orV4", "(", "ctx", "context", ".", "Context", ",", "messagePlaintext", "chat1", ".", "MessagePlaintext", ",", "baseEncryptionKey", "types", ".", "CryptKey", ",", "ephemeralSeed", "*", "keybase1", ".", "TeamEk", ",...
// V3 is just V2 but with exploding messages support. V4 is just V3, but it // signs with the zero key when pairwise MACs are included.
[ "V3", "is", "just", "V2", "but", "with", "exploding", "messages", "support", ".", "V4", "is", "just", "V3", "but", "it", "signs", "with", "the", "zero", "key", "when", "pairwise", "MACs", "are", "included", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/chat/boxer.go#L1601-L1692
160,802
keybase/client
go/chat/boxer.go
seal
func (b *Boxer) seal(data interface{}, key libkb.NaclSecretBoxKey) (*chat1.EncryptedData, error) { s, err := b.marshal(data) if err != nil { return nil, err } var nonce [libkb.NaclDHNonceSize]byte if _, err := rand.Read(nonce[:]); err != nil { return nil, err } var encKey [libkb.NaclSecretBoxKeySize]byte =...
go
func (b *Boxer) seal(data interface{}, key libkb.NaclSecretBoxKey) (*chat1.EncryptedData, error) { s, err := b.marshal(data) if err != nil { return nil, err } var nonce [libkb.NaclDHNonceSize]byte if _, err := rand.Read(nonce[:]); err != nil { return nil, err } var encKey [libkb.NaclSecretBoxKeySize]byte =...
[ "func", "(", "b", "*", "Boxer", ")", "seal", "(", "data", "interface", "{", "}", ",", "key", "libkb", ".", "NaclSecretBoxKey", ")", "(", "*", "chat1", ".", "EncryptedData", ",", "error", ")", "{", "s", ",", "err", ":=", "b", ".", "marshal", "(", ...
// seal encrypts data into chat1.EncryptedData.
[ "seal", "encrypts", "data", "into", "chat1", ".", "EncryptedData", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/chat/boxer.go#L1695-L1716
160,803
keybase/client
go/chat/boxer.go
open
func (b *Boxer) open(data chat1.EncryptedData, key libkb.NaclSecretBoxKey) ([]byte, error) { if len(data.N) != libkb.NaclDHNonceSize { return nil, libkb.DecryptBadNonceError{} } var nonce [libkb.NaclDHNonceSize]byte copy(nonce[:], data.N) plain, ok := secretbox.Open(nil, data.E, &nonce, (*[32]byte)(&key)) if !...
go
func (b *Boxer) open(data chat1.EncryptedData, key libkb.NaclSecretBoxKey) ([]byte, error) { if len(data.N) != libkb.NaclDHNonceSize { return nil, libkb.DecryptBadNonceError{} } var nonce [libkb.NaclDHNonceSize]byte copy(nonce[:], data.N) plain, ok := secretbox.Open(nil, data.E, &nonce, (*[32]byte)(&key)) if !...
[ "func", "(", "b", "*", "Boxer", ")", "open", "(", "data", "chat1", ".", "EncryptedData", ",", "key", "libkb", ".", "NaclSecretBoxKey", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "if", "len", "(", "data", ".", "N", ")", "!=", "libkb", "."...
// open decrypts chat1.EncryptedData.
[ "open", "decrypts", "chat1", ".", "EncryptedData", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/chat/boxer.go#L1719-L1731
160,804
keybase/client
go/chat/boxer.go
signMarshal
func (b *Boxer) signMarshal(data interface{}, kp libkb.NaclSigningKeyPair, prefix kbcrypto.SignaturePrefix) (chat1.SignatureInfo, error) { encoded, err := b.marshal(data) if err != nil { return chat1.SignatureInfo{}, err } return b.sign(encoded, kp, prefix) }
go
func (b *Boxer) signMarshal(data interface{}, kp libkb.NaclSigningKeyPair, prefix kbcrypto.SignaturePrefix) (chat1.SignatureInfo, error) { encoded, err := b.marshal(data) if err != nil { return chat1.SignatureInfo{}, err } return b.sign(encoded, kp, prefix) }
[ "func", "(", "b", "*", "Boxer", ")", "signMarshal", "(", "data", "interface", "{", "}", ",", "kp", "libkb", ".", "NaclSigningKeyPair", ",", "prefix", "kbcrypto", ".", "SignaturePrefix", ")", "(", "chat1", ".", "SignatureInfo", ",", "error", ")", "{", "en...
// signMarshal signs data with a NaclSigningKeyPair, returning a chat1.SignatureInfo. // It marshals data before signing.
[ "signMarshal", "signs", "data", "with", "a", "NaclSigningKeyPair", "returning", "a", "chat1", ".", "SignatureInfo", ".", "It", "marshals", "data", "before", "signing", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/chat/boxer.go#L1735-L1742
160,805
keybase/client
go/chat/boxer.go
signEncryptMarshal
func (b *Boxer) signEncryptMarshal(data interface{}, encryptionKey libkb.NaclSecretBoxKey, signingKeyPair libkb.NaclSigningKeyPair, prefix kbcrypto.SignaturePrefix) (chat1.SignEncryptedData, error) { encoded, err := b.marshal(data) if err != nil { return chat1.SignEncryptedData{}, err } return b.signEncrypt(enc...
go
func (b *Boxer) signEncryptMarshal(data interface{}, encryptionKey libkb.NaclSecretBoxKey, signingKeyPair libkb.NaclSigningKeyPair, prefix kbcrypto.SignaturePrefix) (chat1.SignEncryptedData, error) { encoded, err := b.marshal(data) if err != nil { return chat1.SignEncryptedData{}, err } return b.signEncrypt(enc...
[ "func", "(", "b", "*", "Boxer", ")", "signEncryptMarshal", "(", "data", "interface", "{", "}", ",", "encryptionKey", "libkb", ".", "NaclSecretBoxKey", ",", "signingKeyPair", "libkb", ".", "NaclSigningKeyPair", ",", "prefix", "kbcrypto", ".", "SignaturePrefix", "...
// signEncryptMarshal signencrypts data given an encryption and signing key, returning a chat1.SignEncryptedData. // It marshals data before signing.
[ "signEncryptMarshal", "signencrypts", "data", "given", "an", "encryption", "and", "signing", "key", "returning", "a", "chat1", ".", "SignEncryptedData", ".", "It", "marshals", "data", "before", "signing", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/chat/boxer.go#L1746-L1754
160,806
keybase/client
go/chat/boxer.go
sign
func (b *Boxer) sign(msg []byte, kp libkb.NaclSigningKeyPair, prefix kbcrypto.SignaturePrefix) (chat1.SignatureInfo, error) { sig, err := kp.SignV2(msg, prefix) if err != nil { return chat1.SignatureInfo{}, err } sigInfo := chat1.SignatureInfo{ V: sig.Version, S: sig.Sig[:], K: sig.Kid, } if b.testingSig...
go
func (b *Boxer) sign(msg []byte, kp libkb.NaclSigningKeyPair, prefix kbcrypto.SignaturePrefix) (chat1.SignatureInfo, error) { sig, err := kp.SignV2(msg, prefix) if err != nil { return chat1.SignatureInfo{}, err } sigInfo := chat1.SignatureInfo{ V: sig.Version, S: sig.Sig[:], K: sig.Kid, } if b.testingSig...
[ "func", "(", "b", "*", "Boxer", ")", "sign", "(", "msg", "[", "]", "byte", ",", "kp", "libkb", ".", "NaclSigningKeyPair", ",", "prefix", "kbcrypto", ".", "SignaturePrefix", ")", "(", "chat1", ".", "SignatureInfo", ",", "error", ")", "{", "sig", ",", ...
// sign signs msg with a NaclSigningKeyPair, returning a chat1.SignatureInfo.
[ "sign", "signs", "msg", "with", "a", "NaclSigningKeyPair", "returning", "a", "chat1", ".", "SignatureInfo", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/chat/boxer.go#L1757-L1774
160,807
keybase/client
go/chat/boxer.go
signEncrypt
func (b *Boxer) signEncrypt(msg []byte, encryptionKey libkb.NaclSecretBoxKey, signingKeyPair libkb.NaclSigningKeyPair, prefix kbcrypto.SignaturePrefix) (chat1.SignEncryptedData, error) { if signingKeyPair.Private == nil { return chat1.SignEncryptedData{}, libkb.NoSecretKeyError{} } var nonce [signencrypt.NonceSi...
go
func (b *Boxer) signEncrypt(msg []byte, encryptionKey libkb.NaclSecretBoxKey, signingKeyPair libkb.NaclSigningKeyPair, prefix kbcrypto.SignaturePrefix) (chat1.SignEncryptedData, error) { if signingKeyPair.Private == nil { return chat1.SignEncryptedData{}, libkb.NoSecretKeyError{} } var nonce [signencrypt.NonceSi...
[ "func", "(", "b", "*", "Boxer", ")", "signEncrypt", "(", "msg", "[", "]", "byte", ",", "encryptionKey", "libkb", ".", "NaclSecretBoxKey", ",", "signingKeyPair", "libkb", ".", "NaclSigningKeyPair", ",", "prefix", "kbcrypto", ".", "SignaturePrefix", ")", "(", ...
// signEncrypt signencrypts msg.
[ "signEncrypt", "signencrypts", "msg", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/chat/boxer.go#L1777-L1805
160,808
keybase/client
go/chat/boxer.go
signEncryptOpen
func (b *Boxer) signEncryptOpen(data chat1.SignEncryptedData, encryptionKey libkb.NaclSecretBoxKey, verifyKID []byte, prefix kbcrypto.SignaturePrefix) ([]byte, error) { var encKey [signencrypt.SecretboxKeySize]byte = encryptionKey verifyKey := kbcrypto.KIDToNaclSigningKeyPublic(verifyKID) if verifyKey == nil { r...
go
func (b *Boxer) signEncryptOpen(data chat1.SignEncryptedData, encryptionKey libkb.NaclSecretBoxKey, verifyKID []byte, prefix kbcrypto.SignaturePrefix) ([]byte, error) { var encKey [signencrypt.SecretboxKeySize]byte = encryptionKey verifyKey := kbcrypto.KIDToNaclSigningKeyPublic(verifyKID) if verifyKey == nil { r...
[ "func", "(", "b", "*", "Boxer", ")", "signEncryptOpen", "(", "data", "chat1", ".", "SignEncryptedData", ",", "encryptionKey", "libkb", ".", "NaclSecretBoxKey", ",", "verifyKID", "[", "]", "byte", ",", "prefix", "kbcrypto", ".", "SignaturePrefix", ")", "(", "...
// signEncryptOpen opens and verifies chat1.SignEncryptedData.
[ "signEncryptOpen", "opens", "and", "verifies", "chat1", ".", "SignEncryptedData", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/chat/boxer.go#L1808-L1828
160,809
keybase/client
go/chat/boxer.go
verifyMessageV1
func (b *Boxer) verifyMessageV1(ctx context.Context, header chat1.HeaderPlaintext, msg chat1.MessageBoxed, skipBodyVerification bool) (verifyMessageRes, types.UnboxingError) { headerVersion, err := header.Version() if err != nil { return verifyMessageRes{}, NewPermanentUnboxingError(err) } switch headerVersion {...
go
func (b *Boxer) verifyMessageV1(ctx context.Context, header chat1.HeaderPlaintext, msg chat1.MessageBoxed, skipBodyVerification bool) (verifyMessageRes, types.UnboxingError) { headerVersion, err := header.Version() if err != nil { return verifyMessageRes{}, NewPermanentUnboxingError(err) } switch headerVersion {...
[ "func", "(", "b", "*", "Boxer", ")", "verifyMessageV1", "(", "ctx", "context", ".", "Context", ",", "header", "chat1", ".", "HeaderPlaintext", ",", "msg", "chat1", ".", "MessageBoxed", ",", "skipBodyVerification", "bool", ")", "(", "verifyMessageRes", ",", "...
// verifyMessage checks that a message is valid. // Only works on MessageBoxedVersion_V1
[ "verifyMessage", "checks", "that", "a", "message", "is", "valid", ".", "Only", "works", "on", "MessageBoxedVersion_V1" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/chat/boxer.go#L1836-L1853
160,810
keybase/client
go/chat/boxer.go
verifyMessageHeaderV1
func (b *Boxer) verifyMessageHeaderV1(ctx context.Context, header chat1.HeaderPlaintextV1, msg chat1.MessageBoxed, skipBodyVerification bool) (verifyMessageRes, types.UnboxingError) { if !skipBodyVerification { // check body hash bh := b.hashV1(msg.BodyCiphertext.E) if !libkb.SecureByteArrayEq(bh[:], header.Body...
go
func (b *Boxer) verifyMessageHeaderV1(ctx context.Context, header chat1.HeaderPlaintextV1, msg chat1.MessageBoxed, skipBodyVerification bool) (verifyMessageRes, types.UnboxingError) { if !skipBodyVerification { // check body hash bh := b.hashV1(msg.BodyCiphertext.E) if !libkb.SecureByteArrayEq(bh[:], header.Body...
[ "func", "(", "b", "*", "Boxer", ")", "verifyMessageHeaderV1", "(", "ctx", "context", ".", "Context", ",", "header", "chat1", ".", "HeaderPlaintextV1", ",", "msg", "chat1", ".", "MessageBoxed", ",", "skipBodyVerification", "bool", ")", "(", "verifyMessageRes", ...
// verifyMessageHeaderV1 checks the body hash, header signature, and signing key validity.
[ "verifyMessageHeaderV1", "checks", "the", "body", "hash", "header", "signature", "and", "signing", "key", "validity", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/chat/boxer.go#L1856-L1893
160,811
keybase/client
go/chat/boxer.go
verify
func (b *Boxer) verify(data []byte, si chat1.SignatureInfo, prefix kbcrypto.SignaturePrefix) bool { sigInfo := kbcrypto.NaclSigInfo{ Version: si.V, Prefix: prefix, Kid: si.K, Payload: data, } copy(sigInfo.Sig[:], si.S) _, err := sigInfo.Verify() return (err == nil) }
go
func (b *Boxer) verify(data []byte, si chat1.SignatureInfo, prefix kbcrypto.SignaturePrefix) bool { sigInfo := kbcrypto.NaclSigInfo{ Version: si.V, Prefix: prefix, Kid: si.K, Payload: data, } copy(sigInfo.Sig[:], si.S) _, err := sigInfo.Verify() return (err == nil) }
[ "func", "(", "b", "*", "Boxer", ")", "verify", "(", "data", "[", "]", "byte", ",", "si", "chat1", ".", "SignatureInfo", ",", "prefix", "kbcrypto", ".", "SignaturePrefix", ")", "bool", "{", "sigInfo", ":=", "kbcrypto", ".", "NaclSigInfo", "{", "Version", ...
// verify verifies the signature of data using SignatureInfo.
[ "verify", "verifies", "the", "signature", "of", "data", "using", "SignatureInfo", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/chat/boxer.go#L1896-L1906
160,812
keybase/client
go/chat/boxer.go
compareHeadersMBV1
func (b *Boxer) compareHeadersMBV1(ctx context.Context, hServer chat1.MessageClientHeader, hSigned chat1.MessageClientHeaderVerified) types.UnboxingError { // Conv if !hServer.Conv.Eq(hSigned.Conv) { return NewPermanentUnboxingError(NewHeaderMismatchError("Conv")) } // TlfName if hServer.TlfName != hSigned.TlfN...
go
func (b *Boxer) compareHeadersMBV1(ctx context.Context, hServer chat1.MessageClientHeader, hSigned chat1.MessageClientHeaderVerified) types.UnboxingError { // Conv if !hServer.Conv.Eq(hSigned.Conv) { return NewPermanentUnboxingError(NewHeaderMismatchError("Conv")) } // TlfName if hServer.TlfName != hSigned.TlfN...
[ "func", "(", "b", "*", "Boxer", ")", "compareHeadersMBV1", "(", "ctx", "context", ".", "Context", ",", "hServer", "chat1", ".", "MessageClientHeader", ",", "hSigned", "chat1", ".", "MessageClientHeaderVerified", ")", "types", ".", "UnboxingError", "{", "// Conv"...
// See note on compareHeadersMBV2orV3.
[ "See", "note", "on", "compareHeadersMBV2orV3", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/chat/boxer.go#L1996-L2050
160,813
keybase/client
go/libkb/saltpack_enc.go
SaltpackEncrypt
func SaltpackEncrypt(m MetaContext, arg *SaltpackEncryptArg) error { var receiverBoxKeys []saltpack.BoxPublicKey for _, k := range arg.Receivers { // Since signcryption became the default, we never use visible // recipients in encryption mode, except in tests. if arg.VisibleRecipientsForTesting { receiverBox...
go
func SaltpackEncrypt(m MetaContext, arg *SaltpackEncryptArg) error { var receiverBoxKeys []saltpack.BoxPublicKey for _, k := range arg.Receivers { // Since signcryption became the default, we never use visible // recipients in encryption mode, except in tests. if arg.VisibleRecipientsForTesting { receiverBox...
[ "func", "SaltpackEncrypt", "(", "m", "MetaContext", ",", "arg", "*", "SaltpackEncryptArg", ")", "error", "{", "var", "receiverBoxKeys", "[", "]", "saltpack", ".", "BoxPublicKey", "\n", "for", "_", ",", "k", ":=", "range", "arg", ".", "Receivers", "{", "// ...
// SaltpackEncrypt reads from the given source, encrypts it for the given // receivers from the given sender, and writes it to sink. If // Binary is false, the data written to sink will be armored.
[ "SaltpackEncrypt", "reads", "from", "the", "given", "source", "encrypts", "it", "for", "the", "given", "receivers", "from", "the", "given", "sender", "and", "writes", "it", "to", "sink", ".", "If", "Binary", "is", "false", "the", "data", "written", "to", "...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/saltpack_enc.go#L30-L90
160,814
keybase/client
go/libkb/merkle_client.go
FetchRootFromServer
func (mc *MerkleClient) FetchRootFromServer(m MetaContext, freshness time.Duration) (mr *MerkleRoot, err error) { defer m.VTrace(VLog0, "MerkleClient#FetchRootFromServer", func() error { return err })() // on startup, many threads might try to mash this call at once (via the Auditor or // other pathways). So protec...
go
func (mc *MerkleClient) FetchRootFromServer(m MetaContext, freshness time.Duration) (mr *MerkleRoot, err error) { defer m.VTrace(VLog0, "MerkleClient#FetchRootFromServer", func() error { return err })() // on startup, many threads might try to mash this call at once (via the Auditor or // other pathways). So protec...
[ "func", "(", "mc", "*", "MerkleClient", ")", "FetchRootFromServer", "(", "m", "MetaContext", ",", "freshness", "time", ".", "Duration", ")", "(", "mr", "*", "MerkleRoot", ",", "err", "error", ")", "{", "defer", "m", ".", "VTrace", "(", "VLog0", ",", "\...
// FetchRootFromServer fetches a root from the server. If the last-fetched root was fetched within // freshness ago, then OK to return the last-fetched root. Otherwise refetch. Similarly, if the freshness // passed is 0, then always refresh.
[ "FetchRootFromServer", "fetches", "a", "root", "from", "the", "server", ".", "If", "the", "last", "-", "fetched", "root", "was", "fetched", "within", "freshness", "ago", "then", "OK", "to", "return", "the", "last", "-", "fetched", "root", ".", "Otherwise", ...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/merkle_client.go#L601-L616
160,815
keybase/client
go/libkb/merkle_client.go
lookupPathAndSkipSequenceHelper
func (mc *MerkleClient) lookupPathAndSkipSequenceHelper(m MetaContext, q HTTPArgs, sigHints *SigHints, lastRoot *MerkleRoot, isUser bool) (apiRes *APIRes, err error) { defer m.VTrace(VLog1, "MerkleClient#lookupPathAndSkipSequence", func() error { return err })() // Poll for 10s and ask for a race-free state. w := 1...
go
func (mc *MerkleClient) lookupPathAndSkipSequenceHelper(m MetaContext, q HTTPArgs, sigHints *SigHints, lastRoot *MerkleRoot, isUser bool) (apiRes *APIRes, err error) { defer m.VTrace(VLog1, "MerkleClient#lookupPathAndSkipSequence", func() error { return err })() // Poll for 10s and ask for a race-free state. w := 1...
[ "func", "(", "mc", "*", "MerkleClient", ")", "lookupPathAndSkipSequenceHelper", "(", "m", "MetaContext", ",", "q", "HTTPArgs", ",", "sigHints", "*", "SigHints", ",", "lastRoot", "*", "MerkleRoot", ",", "isUser", "bool", ")", "(", "apiRes", "*", "APIRes", ","...
// `isUser` is true for loading a user and false for loading a team.
[ "isUser", "is", "true", "for", "loading", "a", "user", "and", "false", "for", "loading", "a", "team", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/merkle_client.go#L715-L763
160,816
keybase/client
go/libkb/merkle_client.go
readSkipSequenceFromAPIRes
func (mc *MerkleClient) readSkipSequenceFromAPIRes(m MetaContext, res *APIRes, thisRoot *MerkleRoot, lastRoot *MerkleRoot) (ret SkipSequence, err error) { defer m.VTrace(VLog1, "MerkleClient#readSkipSequenceFromAPIRes", func() error { return err })() if lastRoot == nil { m.VLogf(VLog0, "| lastRoot==nil") return n...
go
func (mc *MerkleClient) readSkipSequenceFromAPIRes(m MetaContext, res *APIRes, thisRoot *MerkleRoot, lastRoot *MerkleRoot) (ret SkipSequence, err error) { defer m.VTrace(VLog1, "MerkleClient#readSkipSequenceFromAPIRes", func() error { return err })() if lastRoot == nil { m.VLogf(VLog0, "| lastRoot==nil") return n...
[ "func", "(", "mc", "*", "MerkleClient", ")", "readSkipSequenceFromAPIRes", "(", "m", "MetaContext", ",", "res", "*", "APIRes", ",", "thisRoot", "*", "MerkleRoot", ",", "lastRoot", "*", "MerkleRoot", ")", "(", "ret", "SkipSequence", ",", "err", "error", ")", ...
// readSkipSequenceFromAPIRes returns a SkipSequence. We construct the sequence by starting with the // most recent merkle root, adding the "skip" pointers returned by the server, and finally bookending // with the merkle root we last fetched from the DB. In verifySkipSequence, we walk over this Sequence // to make sur...
[ "readSkipSequenceFromAPIRes", "returns", "a", "SkipSequence", ".", "We", "construct", "the", "sequence", "by", "starting", "with", "the", "most", "recent", "merkle", "root", "adding", "the", "skip", "pointers", "returned", "by", "the", "server", "and", "finally", ...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/merkle_client.go#L789-L832
160,817
keybase/client
go/libkb/merkle_client.go
storeRoot
func (mc *MerkleClient) storeRoot(m MetaContext, root *MerkleRoot) { m.VLogf(VLog0, "storing merkle root: %d", *root.Seqno()) err := mc.G().LocalDb.Put(merkleHeadKey(), nil, root.ToJSON()) if err != nil { m.Error("Cannot commit Merkle root to local DB: %s", err) } else { mc.lastRoot = root } }
go
func (mc *MerkleClient) storeRoot(m MetaContext, root *MerkleRoot) { m.VLogf(VLog0, "storing merkle root: %d", *root.Seqno()) err := mc.G().LocalDb.Put(merkleHeadKey(), nil, root.ToJSON()) if err != nil { m.Error("Cannot commit Merkle root to local DB: %s", err) } else { mc.lastRoot = root } }
[ "func", "(", "mc", "*", "MerkleClient", ")", "storeRoot", "(", "m", "MetaContext", ",", "root", "*", "MerkleRoot", ")", "{", "m", ".", "VLogf", "(", "VLog0", ",", "\"", "\"", ",", "*", "root", ".", "Seqno", "(", ")", ")", "\n", "err", ":=", "mc",...
// storeRoot stores the root in the db and mem. // Must be called from under a lock.
[ "storeRoot", "stores", "the", "root", "in", "the", "db", "and", "mem", ".", "Must", "be", "called", "from", "under", "a", "lock", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/merkle_client.go#L936-L944
160,818
keybase/client
go/service/chat_local.go
newChatLocalHandler
func newChatLocalHandler(xp rpc.Transporter, g *globals.Context, gh *gregorHandler) *chatLocalHandler { h := &chatLocalHandler{ BaseHandler: NewBaseHandler(g.ExternalG(), xp), } h.Server = chat.NewServer(g, gh, h) return h }
go
func newChatLocalHandler(xp rpc.Transporter, g *globals.Context, gh *gregorHandler) *chatLocalHandler { h := &chatLocalHandler{ BaseHandler: NewBaseHandler(g.ExternalG(), xp), } h.Server = chat.NewServer(g, gh, h) return h }
[ "func", "newChatLocalHandler", "(", "xp", "rpc", ".", "Transporter", ",", "g", "*", "globals", ".", "Context", ",", "gh", "*", "gregorHandler", ")", "*", "chatLocalHandler", "{", "h", ":=", "&", "chatLocalHandler", "{", "BaseHandler", ":", "NewBaseHandler", ...
// newChatLocalHandler creates a chatLocalHandler.
[ "newChatLocalHandler", "creates", "a", "chatLocalHandler", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/service/chat_local.go#L21-L27
160,819
keybase/client
go/kbfs/libfuse/status_file.go
NewNonTLFStatusFile
func NewNonTLFStatusFile(fs *FS, entryValid *time.Duration) *SpecialReadFile { *entryValid = 0 return &SpecialReadFile{ read: func(ctx context.Context) ([]byte, time.Time, error) { return libfs.GetEncodedStatus(ctx, fs.config) }, } }
go
func NewNonTLFStatusFile(fs *FS, entryValid *time.Duration) *SpecialReadFile { *entryValid = 0 return &SpecialReadFile{ read: func(ctx context.Context) ([]byte, time.Time, error) { return libfs.GetEncodedStatus(ctx, fs.config) }, } }
[ "func", "NewNonTLFStatusFile", "(", "fs", "*", "FS", ",", "entryValid", "*", "time", ".", "Duration", ")", "*", "SpecialReadFile", "{", "*", "entryValid", "=", "0", "\n", "return", "&", "SpecialReadFile", "{", "read", ":", "func", "(", "ctx", "context", ...
// NewNonTLFStatusFile returns a special read file that contains a // text representation of the global KBFS status.
[ "NewNonTLFStatusFile", "returns", "a", "special", "read", "file", "that", "contains", "a", "text", "representation", "of", "the", "global", "KBFS", "status", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libfuse/status_file.go#L19-L26
160,820
keybase/client
go/libkb/social_assertion.go
IsSocialAssertion
func IsSocialAssertion(ctx AssertionContext, s string) bool { _, ok := NormalizeSocialAssertion(ctx, s) return ok }
go
func IsSocialAssertion(ctx AssertionContext, s string) bool { _, ok := NormalizeSocialAssertion(ctx, s) return ok }
[ "func", "IsSocialAssertion", "(", "ctx", "AssertionContext", ",", "s", "string", ")", "bool", "{", "_", ",", "ok", ":=", "NormalizeSocialAssertion", "(", "ctx", ",", "s", ")", "\n", "return", "ok", "\n", "}" ]
// IsSocialAssertion returns true for strings that are valid // social assertions. They do not need to be normalized, so // user@twitter and twitter:user will work, as will // USER@Twitter.
[ "IsSocialAssertion", "returns", "true", "for", "strings", "that", "are", "valid", "social", "assertions", ".", "They", "do", "not", "need", "to", "be", "normalized", "so", "user" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/social_assertion.go#L14-L17
160,821
keybase/client
go/ephemeral/team_ek.go
teamEKRetryWrapper
func teamEKRetryWrapper(mctx libkb.MetaContext, retryFn func() error) (err error) { knownRaceConditions := []keybase1.StatusCode{ keybase1.StatusCode_SCSigWrongKey, keybase1.StatusCode_SCSigOldSeqno, keybase1.StatusCode_SCEphemeralKeyBadGeneration, keybase1.StatusCode_SCEphemeralKeyUnexpectedBox, keybase1.St...
go
func teamEKRetryWrapper(mctx libkb.MetaContext, retryFn func() error) (err error) { knownRaceConditions := []keybase1.StatusCode{ keybase1.StatusCode_SCSigWrongKey, keybase1.StatusCode_SCSigOldSeqno, keybase1.StatusCode_SCEphemeralKeyBadGeneration, keybase1.StatusCode_SCEphemeralKeyUnexpectedBox, keybase1.St...
[ "func", "teamEKRetryWrapper", "(", "mctx", "libkb", ".", "MetaContext", ",", "retryFn", "func", "(", ")", "error", ")", "(", "err", "error", ")", "{", "knownRaceConditions", ":=", "[", "]", "keybase1", ".", "StatusCode", "{", "keybase1", ".", "StatusCode_SCS...
// There are plenty of race conditions where the PTK or teamEK or // membership list can change out from under us while we're in the middle // of posting a new key, causing the post to fail. Detect these conditions // and retry.
[ "There", "are", "plenty", "of", "race", "conditions", "where", "the", "PTK", "or", "teamEK", "or", "membership", "list", "can", "change", "out", "from", "under", "us", "while", "we", "re", "in", "the", "middle", "of", "posting", "a", "new", "key", "causi...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/ephemeral/team_ek.go#L168-L194
160,822
keybase/client
go/ephemeral/team_ek.go
fetchTeamEKStatement
func fetchTeamEKStatement(mctx libkb.MetaContext, teamID keybase1.TeamID) ( statement *keybase1.TeamEkStatement, latestGeneration keybase1.EkGeneration, wrongKID bool, err error) { defer mctx.TraceTimed("fetchTeamEKStatement", func() error { return err })() apiArg := libkb.APIArg{ Endpoint: "team/team_ek", S...
go
func fetchTeamEKStatement(mctx libkb.MetaContext, teamID keybase1.TeamID) ( statement *keybase1.TeamEkStatement, latestGeneration keybase1.EkGeneration, wrongKID bool, err error) { defer mctx.TraceTimed("fetchTeamEKStatement", func() error { return err })() apiArg := libkb.APIArg{ Endpoint: "team/team_ek", S...
[ "func", "fetchTeamEKStatement", "(", "mctx", "libkb", ".", "MetaContext", ",", "teamID", "keybase1", ".", "TeamID", ")", "(", "statement", "*", "keybase1", ".", "TeamEkStatement", ",", "latestGeneration", "keybase1", ".", "EkGeneration", ",", "wrongKID", "bool", ...
// Returns nil if the team has never published a teamEK. If the team has // published a teamEK, but has since rolled their PTK without publishing a new // one, this function will also return nil and log a warning. This is a // transitional thing, and eventually when all "reasonably up to date" clients // in the wild ha...
[ "Returns", "nil", "if", "the", "team", "has", "never", "published", "a", "teamEK", ".", "If", "the", "team", "has", "published", "a", "teamEK", "but", "has", "since", "rolled", "their", "PTK", "without", "publishing", "a", "new", "one", "this", "function",...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/ephemeral/team_ek.go#L249-L290
160,823
keybase/client
go/ephemeral/team_ek.go
fetchTeamMemberStatements
func fetchTeamMemberStatements(mctx libkb.MetaContext, teamID keybase1.TeamID) (statementMap map[keybase1.UID]*keybase1.UserEkStatement, err error) { defer mctx.TraceTimed("fetchTeamMemberStatements", func() error { return err })() apiArg := libkb.APIArg{ Endpoint: "team/member_eks", SessionType: libkb.APISe...
go
func fetchTeamMemberStatements(mctx libkb.MetaContext, teamID keybase1.TeamID) (statementMap map[keybase1.UID]*keybase1.UserEkStatement, err error) { defer mctx.TraceTimed("fetchTeamMemberStatements", func() error { return err })() apiArg := libkb.APIArg{ Endpoint: "team/member_eks", SessionType: libkb.APISe...
[ "func", "fetchTeamMemberStatements", "(", "mctx", "libkb", ".", "MetaContext", ",", "teamID", "keybase1", ".", "TeamID", ")", "(", "statementMap", "map", "[", "keybase1", ".", "UID", "]", "*", "keybase1", ".", "UserEkStatement", ",", "err", "error", ")", "{"...
// Returns nil if all team members have never published a teamEK. Verifies that // the map of users the server returns are indeed valid team members of the // team and all signatures verify correctly for the users.
[ "Returns", "nil", "if", "all", "team", "members", "have", "never", "published", "a", "teamEK", ".", "Verifies", "that", "the", "map", "of", "users", "the", "server", "returns", "are", "indeed", "valid", "team", "members", "of", "the", "team", "and", "all",...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/ephemeral/team_ek.go#L369-L425
160,824
keybase/client
go/kbfs/libdokan/folderlist.go
userChanged
func (fl *FolderList) userChanged(ctx context.Context, _, newUser kbname.NormalizedUsername) { var fs []*Folder func() { fl.mu.Lock() defer fl.mu.Unlock() for _, tlf := range fl.folders { if tlf, ok := tlf.(*TLF); ok { fs = append(fs, tlf.folder) } } }() for _, f := range fs { f.TlfHandleChange(...
go
func (fl *FolderList) userChanged(ctx context.Context, _, newUser kbname.NormalizedUsername) { var fs []*Folder func() { fl.mu.Lock() defer fl.mu.Unlock() for _, tlf := range fl.folders { if tlf, ok := tlf.(*TLF); ok { fs = append(fs, tlf.folder) } } }() for _, f := range fs { f.TlfHandleChange(...
[ "func", "(", "fl", "*", "FolderList", ")", "userChanged", "(", "ctx", "context", ".", "Context", ",", "_", ",", "newUser", "kbname", ".", "NormalizedUsername", ")", "{", "var", "fs", "[", "]", "*", "Folder", "\n", "func", "(", ")", "{", "fl", ".", ...
// update things after user changed.
[ "update", "things", "after", "user", "changed", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libdokan/folderlist.go#L284-L301
160,825
keybase/client
go/teams/loader_ctx.go
getNewLinksFromServer
func (l *LoaderContextG) getNewLinksFromServer(ctx context.Context, teamID keybase1.TeamID, lows getLinksLows, readSubteamID *keybase1.TeamID) (*rawTeam, error) { return l.getLinksFromServerCommon(ctx, teamID, &lows, nil, readSubteamID) }
go
func (l *LoaderContextG) getNewLinksFromServer(ctx context.Context, teamID keybase1.TeamID, lows getLinksLows, readSubteamID *keybase1.TeamID) (*rawTeam, error) { return l.getLinksFromServerCommon(ctx, teamID, &lows, nil, readSubteamID) }
[ "func", "(", "l", "*", "LoaderContextG", ")", "getNewLinksFromServer", "(", "ctx", "context", ".", "Context", ",", "teamID", "keybase1", ".", "TeamID", ",", "lows", "getLinksLows", ",", "readSubteamID", "*", "keybase1", ".", "TeamID", ")", "(", "*", "rawTeam...
// Get new links from the server.
[ "Get", "new", "links", "from", "the", "server", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/teams/loader_ctx.go#L105-L109
160,826
keybase/client
go/teams/loader_ctx.go
getLinksFromServer
func (l *LoaderContextG) getLinksFromServer(ctx context.Context, teamID keybase1.TeamID, requestSeqnos []keybase1.Seqno, readSubteamID *keybase1.TeamID) (*rawTeam, error) { return l.getLinksFromServerCommon(ctx, teamID, nil, requestSeqnos, readSubteamID) }
go
func (l *LoaderContextG) getLinksFromServer(ctx context.Context, teamID keybase1.TeamID, requestSeqnos []keybase1.Seqno, readSubteamID *keybase1.TeamID) (*rawTeam, error) { return l.getLinksFromServerCommon(ctx, teamID, nil, requestSeqnos, readSubteamID) }
[ "func", "(", "l", "*", "LoaderContextG", ")", "getLinksFromServer", "(", "ctx", "context", ".", "Context", ",", "teamID", "keybase1", ".", "TeamID", ",", "requestSeqnos", "[", "]", "keybase1", ".", "Seqno", ",", "readSubteamID", "*", "keybase1", ".", "TeamID...
// Get full links from the server. // Does not guarantee that the server returned the correct links, nor that they are unstubbed.
[ "Get", "full", "links", "from", "the", "server", ".", "Does", "not", "guarantee", "that", "the", "server", "returned", "the", "correct", "links", "nor", "that", "they", "are", "unstubbed", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/teams/loader_ctx.go#L113-L116
160,827
keybase/client
go/kbfs/libkbfs/coalescing_context.go
NewCoalescingContext
func NewCoalescingContext(parent context.Context) (*CoalescingContext, context.CancelFunc) { ctx := &CoalescingContext{ // Make the parent's `Value()` method available to consumers of this // context. For example, this maintains the parent's log debug tags. // TODO: Make _all_ parents' values available. Contex...
go
func NewCoalescingContext(parent context.Context) (*CoalescingContext, context.CancelFunc) { ctx := &CoalescingContext{ // Make the parent's `Value()` method available to consumers of this // context. For example, this maintains the parent's log debug tags. // TODO: Make _all_ parents' values available. Contex...
[ "func", "NewCoalescingContext", "(", "parent", "context", ".", "Context", ")", "(", "*", "CoalescingContext", ",", "context", ".", "CancelFunc", ")", "{", "ctx", ":=", "&", "CoalescingContext", "{", "// Make the parent's `Value()` method available to consumers of this", ...
// NewCoalescingContext creates a new CoalescingContext. The context _must_ be // canceled to avoid a goroutine leak.
[ "NewCoalescingContext", "creates", "a", "new", "CoalescingContext", ".", "The", "context", "_must_", "be", "canceled", "to", "avoid", "a", "goroutine", "leak", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/coalescing_context.go#L63-L93
160,828
keybase/client
go/kbfs/libkbfs/coalescing_context.go
AddContext
func (ctx *CoalescingContext) AddContext(other context.Context) error { select { case ctx.mutateCh <- other: return nil case <-ctx.doneCh: return context.Canceled } }
go
func (ctx *CoalescingContext) AddContext(other context.Context) error { select { case ctx.mutateCh <- other: return nil case <-ctx.doneCh: return context.Canceled } }
[ "func", "(", "ctx", "*", "CoalescingContext", ")", "AddContext", "(", "other", "context", ".", "Context", ")", "error", "{", "select", "{", "case", "ctx", ".", "mutateCh", "<-", "other", ":", "return", "nil", "\n", "case", "<-", "ctx", ".", "doneCh", "...
// AddContext adds a context to the set of contexts that we're waiting on.
[ "AddContext", "adds", "a", "context", "to", "the", "set", "of", "contexts", "that", "we", "re", "waiting", "on", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/coalescing_context.go#L118-L125
160,829
keybase/client
go/libkb/kex2_router.go
Post
func (k *KexRouter) Post(sessID kex2.SessionID, sender kex2.DeviceID, seqno kex2.Seqno, msg []byte) (err error) { mctx := k.M().WithLogTag("KEXR") mctx.Debug("+ KexRouter.Post(%x, %x, %d, ...)", sessID, sender, seqno) defer func() { mctx.Debug("- KexRouter.Post(%x, %x, %d) -> %s", sessID, sender, seqno, ErrToOk(er...
go
func (k *KexRouter) Post(sessID kex2.SessionID, sender kex2.DeviceID, seqno kex2.Seqno, msg []byte) (err error) { mctx := k.M().WithLogTag("KEXR") mctx.Debug("+ KexRouter.Post(%x, %x, %d, ...)", sessID, sender, seqno) defer func() { mctx.Debug("- KexRouter.Post(%x, %x, %d) -> %s", sessID, sender, seqno, ErrToOk(er...
[ "func", "(", "k", "*", "KexRouter", ")", "Post", "(", "sessID", "kex2", ".", "SessionID", ",", "sender", "kex2", ".", "DeviceID", ",", "seqno", "kex2", ".", "Seqno", ",", "msg", "[", "]", "byte", ")", "(", "err", "error", ")", "{", "mctx", ":=", ...
// Post implements Post in the kex2.MessageRouter interface.
[ "Post", "implements", "Post", "in", "the", "kex2", ".", "MessageRouter", "interface", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/kex2_router.go#L26-L47
160,830
keybase/client
go/libkb/kex2_router.go
Get
func (k *KexRouter) Get(sessID kex2.SessionID, receiver kex2.DeviceID, low kex2.Seqno, poll time.Duration) (msgs [][]byte, err error) { mctx := k.M().WithLogTag("KEXR") mctx.Debug("+ KexRouter.Get(%x, %x, %d, %s)", sessID, receiver, low, poll) defer func() { mctx.Debug("- KexRouter.Get(%x, %x, %d, %s) -> %s (messa...
go
func (k *KexRouter) Get(sessID kex2.SessionID, receiver kex2.DeviceID, low kex2.Seqno, poll time.Duration) (msgs [][]byte, err error) { mctx := k.M().WithLogTag("KEXR") mctx.Debug("+ KexRouter.Get(%x, %x, %d, %s)", sessID, receiver, low, poll) defer func() { mctx.Debug("- KexRouter.Get(%x, %x, %d, %s) -> %s (messa...
[ "func", "(", "k", "*", "KexRouter", ")", "Get", "(", "sessID", "kex2", ".", "SessionID", ",", "receiver", "kex2", ".", "DeviceID", ",", "low", "kex2", ".", "Seqno", ",", "poll", "time", ".", "Duration", ")", "(", "msgs", "[", "]", "[", "]", "byte",...
// Get implements Get in the kex2.MessageRouter interface.
[ "Get", "implements", "Get", "in", "the", "kex2", ".", "MessageRouter", "interface", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/kex2_router.go#L71-L110
160,831
keybase/client
go/client/cmd_simplefs_read.go
NewCmdSimpleFSRead
func NewCmdSimpleFSRead(cl *libcmdline.CommandLine, g *libkb.GlobalContext) cli.Command { return cli.Command{ Name: "read", ArgumentHelp: "<path>", Usage: "output file contents to standard output", Action: func(c *cli.Context) { cl.ChooseCommand(&CmdSimpleFSRead{Contextified: libkb.NewContext...
go
func NewCmdSimpleFSRead(cl *libcmdline.CommandLine, g *libkb.GlobalContext) cli.Command { return cli.Command{ Name: "read", ArgumentHelp: "<path>", Usage: "output file contents to standard output", Action: func(c *cli.Context) { cl.ChooseCommand(&CmdSimpleFSRead{Contextified: libkb.NewContext...
[ "func", "NewCmdSimpleFSRead", "(", "cl", "*", "libcmdline", ".", "CommandLine", ",", "g", "*", "libkb", ".", "GlobalContext", ")", "cli", ".", "Command", "{", "return", "cli", ".", "Command", "{", "Name", ":", "\"", "\"", ",", "ArgumentHelp", ":", "\"", ...
// NewCmdSimpleFSRead creates a new cli.Command.
[ "NewCmdSimpleFSRead", "creates", "a", "new", "cli", ".", "Command", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/client/cmd_simplefs_read.go#L27-L56
160,832
keybase/client
go/logger/buffer.go
NewAutoFlushingBufferedWriter
func NewAutoFlushingBufferedWriter(baseWriter io.Writer, flushFrequency time.Duration) (w io.Writer, shutdown chan struct{}, done chan struct{}) { result := &autoFlushingBufferedWriter{ bufferedWriter: bufio.NewWriter(baseWriter), backupWriter: bufio.NewWriter(baseWriter), frequency: flushFrequency, ti...
go
func NewAutoFlushingBufferedWriter(baseWriter io.Writer, flushFrequency time.Duration) (w io.Writer, shutdown chan struct{}, done chan struct{}) { result := &autoFlushingBufferedWriter{ bufferedWriter: bufio.NewWriter(baseWriter), backupWriter: bufio.NewWriter(baseWriter), frequency: flushFrequency, ti...
[ "func", "NewAutoFlushingBufferedWriter", "(", "baseWriter", "io", ".", "Writer", ",", "flushFrequency", "time", ".", "Duration", ")", "(", "w", "io", ".", "Writer", ",", "shutdown", "chan", "struct", "{", "}", ",", "done", "chan", "struct", "{", "}", ")", ...
// NewAutoFlushingBufferedWriter returns an io.Writer that buffers its output // and flushes automatically after `flushFrequency`.
[ "NewAutoFlushingBufferedWriter", "returns", "an", "io", ".", "Writer", "that", "buffers", "its", "output", "and", "flushes", "automatically", "after", "flushFrequency", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/logger/buffer.go#L99-L111
160,833
keybase/client
go/logger/buffer.go
EnableBufferedLogging
func EnableBufferedLogging() { writer, shutdown, done := NewAutoFlushingBufferedWriter(ErrorWriter(), loggingFrequency) stdErrLoggingShutdown = shutdown stdErrLoggingShutdownDone = done logBackend := logging.NewLogBackend(writer, "", 0) logging.SetBackend(logBackend) }
go
func EnableBufferedLogging() { writer, shutdown, done := NewAutoFlushingBufferedWriter(ErrorWriter(), loggingFrequency) stdErrLoggingShutdown = shutdown stdErrLoggingShutdownDone = done logBackend := logging.NewLogBackend(writer, "", 0) logging.SetBackend(logBackend) }
[ "func", "EnableBufferedLogging", "(", ")", "{", "writer", ",", "shutdown", ",", "done", ":=", "NewAutoFlushingBufferedWriter", "(", "ErrorWriter", "(", ")", ",", "loggingFrequency", ")", "\n", "stdErrLoggingShutdown", "=", "shutdown", "\n", "stdErrLoggingShutdownDone"...
// EnableBufferedLogging turns on buffered logging - this is a performance // boost at the expense of not getting all the logs in a crash.
[ "EnableBufferedLogging", "turns", "on", "buffered", "logging", "-", "this", "is", "a", "performance", "boost", "at", "the", "expense", "of", "not", "getting", "all", "the", "logs", "in", "a", "crash", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/logger/buffer.go#L130-L136
160,834
keybase/client
go/kbfs/dokan/loaddll.go
loadLibrary
func loadLibrary(epc *errorPrinter, path string) (windows.Handle, error) { hdl, err := windows.LoadLibrary(path) epc.Printf("LoadLibrary(%q) -> %v,%v\n", path, hdl, err) return hdl, err }
go
func loadLibrary(epc *errorPrinter, path string) (windows.Handle, error) { hdl, err := windows.LoadLibrary(path) epc.Printf("LoadLibrary(%q) -> %v,%v\n", path, hdl, err) return hdl, err }
[ "func", "loadLibrary", "(", "epc", "*", "errorPrinter", ",", "path", "string", ")", "(", "windows", ".", "Handle", ",", "error", ")", "{", "hdl", ",", "err", ":=", "windows", ".", "LoadLibrary", "(", "path", ")", "\n", "epc", ".", "Printf", "(", "\""...
// loadLibrary calls win32 LoadLibrary and logs the result.
[ "loadLibrary", "calls", "win32", "LoadLibrary", "and", "logs", "the", "result", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/dokan/loaddll.go#L38-L42
160,835
keybase/client
go/kbfs/dokan/loaddll.go
doLoadDLL
func doLoadDLL(epc *errorPrinter, path string) (windows.Handle, error) { var guessPath bool epc.Printf("loadDokanDLL %q\n", path) if path == "" { path = shortPath guessPath = true } else { path = filepath.FromSlash(path) } const loadLibrarySearchSystem32 = 0x800 const flags = loadLibrarySearchSystem32 hdl...
go
func doLoadDLL(epc *errorPrinter, path string) (windows.Handle, error) { var guessPath bool epc.Printf("loadDokanDLL %q\n", path) if path == "" { path = shortPath guessPath = true } else { path = filepath.FromSlash(path) } const loadLibrarySearchSystem32 = 0x800 const flags = loadLibrarySearchSystem32 hdl...
[ "func", "doLoadDLL", "(", "epc", "*", "errorPrinter", ",", "path", "string", ")", "(", "windows", ".", "Handle", ",", "error", ")", "{", "var", "guessPath", "bool", "\n", "epc", ".", "Printf", "(", "\"", "\\n", "\"", ",", "path", ")", "\n", "if", "...
// doLoadDLL tries to load the dokan DLL from various locations.
[ "doLoadDLL", "tries", "to", "load", "the", "dokan", "DLL", "from", "various", "locations", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/dokan/loaddll.go#L45-L83
160,836
keybase/client
go/kbfs/dokan/loaddll.go
loadDokanDLL
func loadDokanDLL(cfg *Config) error { var epc errorPrinter err := doLoadDokanAndGetSymbols(&epc, cfg.DllPath) cfg.FileSystem.Printf("%s", epc.buf.Bytes()) return err }
go
func loadDokanDLL(cfg *Config) error { var epc errorPrinter err := doLoadDokanAndGetSymbols(&epc, cfg.DllPath) cfg.FileSystem.Printf("%s", epc.buf.Bytes()) return err }
[ "func", "loadDokanDLL", "(", "cfg", "*", "Config", ")", "error", "{", "var", "epc", "errorPrinter", "\n", "err", ":=", "doLoadDokanAndGetSymbols", "(", "&", "epc", ",", "cfg", ".", "DllPath", ")", "\n", "cfg", ".", "FileSystem", ".", "Printf", "(", "\"",...
// loadDokanDLL tries to load the dokan DLL from // the given path. Empty path is allowed and will // result in the location being guessed.
[ "loadDokanDLL", "tries", "to", "load", "the", "dokan", "DLL", "from", "the", "given", "path", ".", "Empty", "path", "is", "allowed", "and", "will", "result", "in", "the", "location", "being", "guessed", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/dokan/loaddll.go#L121-L126
160,837
keybase/client
go/stellar/transform.go
transformPaymentStellar
func transformPaymentStellar(mctx libkb.MetaContext, acctID stellar1.AccountID, p stellar1.PaymentSummaryStellar, oc OwnAccountLookupCache) (*stellar1.PaymentLocal, error) { loc, err := newPaymentLocal(mctx, p.TxID, p.Ctime, p.Amount, p.Asset) if err != nil { return nil, err } isSender := p.From.Eq(acctID) isRe...
go
func transformPaymentStellar(mctx libkb.MetaContext, acctID stellar1.AccountID, p stellar1.PaymentSummaryStellar, oc OwnAccountLookupCache) (*stellar1.PaymentLocal, error) { loc, err := newPaymentLocal(mctx, p.TxID, p.Ctime, p.Amount, p.Asset) if err != nil { return nil, err } isSender := p.From.Eq(acctID) isRe...
[ "func", "transformPaymentStellar", "(", "mctx", "libkb", ".", "MetaContext", ",", "acctID", "stellar1", ".", "AccountID", ",", "p", "stellar1", ".", "PaymentSummaryStellar", ",", "oc", "OwnAccountLookupCache", ")", "(", "*", "stellar1", ".", "PaymentLocal", ",", ...
// transformPaymentStellar converts a stellar1.PaymentSummaryStellar into a stellar1.PaymentLocal.
[ "transformPaymentStellar", "converts", "a", "stellar1", ".", "PaymentSummaryStellar", "into", "a", "stellar1", ".", "PaymentLocal", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/transform.go#L108-L138
160,838
keybase/client
go/stellar/transform.go
transformPaymentDirect
func transformPaymentDirect(mctx libkb.MetaContext, acctID stellar1.AccountID, p stellar1.PaymentSummaryDirect, oc OwnAccountLookupCache) (*stellar1.PaymentLocal, error) { loc, err := newPaymentLocal(mctx, p.TxID, p.Ctime, p.Amount, p.Asset) if err != nil { return nil, err } isSender := p.FromStellar.Eq(acctID) ...
go
func transformPaymentDirect(mctx libkb.MetaContext, acctID stellar1.AccountID, p stellar1.PaymentSummaryDirect, oc OwnAccountLookupCache) (*stellar1.PaymentLocal, error) { loc, err := newPaymentLocal(mctx, p.TxID, p.Ctime, p.Amount, p.Asset) if err != nil { return nil, err } isSender := p.FromStellar.Eq(acctID) ...
[ "func", "transformPaymentDirect", "(", "mctx", "libkb", ".", "MetaContext", ",", "acctID", "stellar1", ".", "AccountID", ",", "p", "stellar1", ".", "PaymentSummaryDirect", ",", "oc", "OwnAccountLookupCache", ")", "(", "*", "stellar1", ".", "PaymentLocal", ",", "...
// transformPaymentDirect converts a stellar1.PaymentSummaryDirect into a stellar1.PaymentLocal.
[ "transformPaymentDirect", "converts", "a", "stellar1", ".", "PaymentSummaryDirect", "into", "a", "stellar1", ".", "PaymentLocal", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/transform.go#L152-L214
160,839
keybase/client
go/stellar/transform.go
TransformToAirdropStatus
func TransformToAirdropStatus(status remote.AirdropStatusAPI) stellar1.AirdropStatus { var out stellar1.AirdropStatus switch { case status.AlreadyRegistered: out.State = stellar1.AirdropAccepted case status.Qualifications.QualifiesOverall: out.State = stellar1.AirdropQualified default: out.State = stellar1.A...
go
func TransformToAirdropStatus(status remote.AirdropStatusAPI) stellar1.AirdropStatus { var out stellar1.AirdropStatus switch { case status.AlreadyRegistered: out.State = stellar1.AirdropAccepted case status.Qualifications.QualifiesOverall: out.State = stellar1.AirdropQualified default: out.State = stellar1.A...
[ "func", "TransformToAirdropStatus", "(", "status", "remote", ".", "AirdropStatusAPI", ")", "stellar1", ".", "AirdropStatus", "{", "var", "out", "stellar1", ".", "AirdropStatus", "\n", "switch", "{", "case", "status", ".", "AlreadyRegistered", ":", "out", ".", "S...
// TransformToAirdropStatus takes the result from api server status_check // and transforms it into stellar1.AirdropStatus.
[ "TransformToAirdropStatus", "takes", "the", "result", "from", "api", "server", "status_check", "and", "transforms", "it", "into", "stellar1", ".", "AirdropStatus", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/transform.go#L537-L584
160,840
keybase/client
go/chat/utils/locktab.go
deadlockDetect
func (c *ConversationLockTab) deadlockDetect(ctx context.Context, trace string, waiters map[string]bool) bool { // See if this trace is waiting on any other trace waitingOnTrace, ok := c.waits[trace] if !ok { // If not, no deadlock return false } // If we are waiting on a trace we have already encountered, the...
go
func (c *ConversationLockTab) deadlockDetect(ctx context.Context, trace string, waiters map[string]bool) bool { // See if this trace is waiting on any other trace waitingOnTrace, ok := c.waits[trace] if !ok { // If not, no deadlock return false } // If we are waiting on a trace we have already encountered, the...
[ "func", "(", "c", "*", "ConversationLockTab", ")", "deadlockDetect", "(", "ctx", "context", ".", "Context", ",", "trace", "string", ",", "waiters", "map", "[", "string", "]", "bool", ")", "bool", "{", "// See if this trace is waiting on any other trace", "waitingO...
// deadlockDetect tries to find a deadlock condition in the current set of waiting acquirers.
[ "deadlockDetect", "tries", "to", "find", "a", "deadlock", "condition", "in", "the", "current", "set", "of", "waiting", "acquirers", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/chat/utils/locktab.go#L67-L83
160,841
keybase/client
go/chat/utils/locktab.go
Acquire
func (c *ConversationLockTab) Acquire(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID) (blocked bool, err error) { sleep := 200 * time.Millisecond for i := 0; i < c.maxAcquireRetries; i++ { blocked, err = c.doAcquire(ctx, uid, convID) if err != nil { if err != ErrConvLockTabDeadlock { ret...
go
func (c *ConversationLockTab) Acquire(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID) (blocked bool, err error) { sleep := 200 * time.Millisecond for i := 0; i < c.maxAcquireRetries; i++ { blocked, err = c.doAcquire(ctx, uid, convID) if err != nil { if err != ErrConvLockTabDeadlock { ret...
[ "func", "(", "c", "*", "ConversationLockTab", ")", "Acquire", "(", "ctx", "context", ".", "Context", ",", "uid", "gregor1", ".", "UID", ",", "convID", "chat1", ".", "ConversationID", ")", "(", "blocked", "bool", ",", "err", "error", ")", "{", "sleep", ...
// Acquire obtains a per user per conversation lock on a per trace basis. That is, the lock is a // shared lock for the current chat trace, and serves to synchronize large chat operations. If there is // no chat trace, this is a no-op.
[ "Acquire", "obtains", "a", "per", "user", "per", "conversation", "lock", "on", "a", "per", "trace", "basis", ".", "That", "is", "the", "lock", "is", "a", "shared", "lock", "for", "the", "current", "chat", "trace", "and", "serves", "to", "synchronize", "l...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/chat/utils/locktab.go#L138-L154
160,842
keybase/client
go/chat/storage/storage_ephemeral_purge.go
EphemeralPurge
func (s *Storage) EphemeralPurge(ctx context.Context, convID chat1.ConversationID, uid gregor1.UID, purgeInfo *chat1.EphemeralPurgeInfo) (newPurgeInfo *chat1.EphemeralPurgeInfo, explodedMsgs []chat1.MessageUnboxed, err Error) { defer s.Trace(ctx, func() error { return err }, "EphemeralPurge")() lock := locks.StorageL...
go
func (s *Storage) EphemeralPurge(ctx context.Context, convID chat1.ConversationID, uid gregor1.UID, purgeInfo *chat1.EphemeralPurgeInfo) (newPurgeInfo *chat1.EphemeralPurgeInfo, explodedMsgs []chat1.MessageUnboxed, err Error) { defer s.Trace(ctx, func() error { return err }, "EphemeralPurge")() lock := locks.StorageL...
[ "func", "(", "s", "*", "Storage", ")", "EphemeralPurge", "(", "ctx", "context", ".", "Context", ",", "convID", "chat1", ".", "ConversationID", ",", "uid", "gregor1", ".", "UID", ",", "purgeInfo", "*", "chat1", ".", "EphemeralPurgeInfo", ")", "(", "newPurge...
// For a given conversation, purge all ephemeral messages from // purgeInfo.MinUnexplodedID to the present, updating bookkeeping for the next // time we need to purge this conv.
[ "For", "a", "given", "conversation", "purge", "all", "ephemeral", "messages", "from", "purgeInfo", ".", "MinUnexplodedID", "to", "the", "present", "updating", "bookkeeping", "for", "the", "next", "time", "we", "need", "to", "purge", "this", "conv", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/chat/storage/storage_ephemeral_purge.go#L19-L76
160,843
keybase/client
go/protocol/gregor1/extras.go
UIDListMerge
func UIDListMerge(list1 []UID, list2 []UID) []UID { m := make(map[string]UID) for _, uid := range list1 { m[uid.String()] = uid } for _, uid := range list2 { m[uid.String()] = uid } res := make([]UID, 0) for _, uid := range m { res = append(res, uid) } return res }
go
func UIDListMerge(list1 []UID, list2 []UID) []UID { m := make(map[string]UID) for _, uid := range list1 { m[uid.String()] = uid } for _, uid := range list2 { m[uid.String()] = uid } res := make([]UID, 0) for _, uid := range m { res = append(res, uid) } return res }
[ "func", "UIDListMerge", "(", "list1", "[", "]", "UID", ",", "list2", "[", "]", "UID", ")", "[", "]", "UID", "{", "m", ":=", "make", "(", "map", "[", "string", "]", "UID", ")", "\n", "for", "_", ",", "uid", ":=", "range", "list1", "{", "m", "[...
// Merge two lists of UIDs. Duplicates will be dropped. Not stably ordered.
[ "Merge", "two", "lists", "of", "UIDs", ".", "Duplicates", "will", "be", "dropped", ".", "Not", "stably", "ordered", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/gregor1/extras.go#L492-L505
160,844
keybase/client
go/kbfs/tlfhandle/resolve.go
ResolveAgain
func (h *Handle) ResolveAgain( ctx context.Context, resolver idutil.Resolver, idGetter IDGetter, osg idutil.OfflineStatusGetter) (*Handle, error) { if h.IsFinal() { // Don't attempt to further resolve final handles. return h, nil } return h.ResolveAgainForUser( ctx, resolver, idGetter, osg, keybase1.UID(""))...
go
func (h *Handle) ResolveAgain( ctx context.Context, resolver idutil.Resolver, idGetter IDGetter, osg idutil.OfflineStatusGetter) (*Handle, error) { if h.IsFinal() { // Don't attempt to further resolve final handles. return h, nil } return h.ResolveAgainForUser( ctx, resolver, idGetter, osg, keybase1.UID(""))...
[ "func", "(", "h", "*", "Handle", ")", "ResolveAgain", "(", "ctx", "context", ".", "Context", ",", "resolver", "idutil", ".", "Resolver", ",", "idGetter", "IDGetter", ",", "osg", "idutil", ".", "OfflineStatusGetter", ")", "(", "*", "Handle", ",", "error", ...
// ResolveAgain tries to resolve any unresolved assertions in the // given handle and returns a new handle with the results. As an // optimization, if h contains no unresolved assertions, it just // returns itself.
[ "ResolveAgain", "tries", "to", "resolve", "any", "unresolved", "assertions", "in", "the", "given", "handle", "and", "returns", "a", "new", "handle", "with", "the", "results", ".", "As", "an", "optimization", "if", "h", "contains", "no", "unresolved", "assertio...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/tlfhandle/resolve.go#L433-L442
160,845
keybase/client
go/kbfs/tlfhandle/resolve.go
ResolvesTo
func (h Handle) ResolvesTo( ctx context.Context, codec kbfscodec.Codec, resolver idutil.Resolver, idGetter IDGetter, osg idutil.OfflineStatusGetter, other Handle) ( resolvesTo bool, partialResolvedH *Handle, err error) { // Check the conflict extension. var conflictAdded, finalizedAdded bool if !h.IsConflict() &&...
go
func (h Handle) ResolvesTo( ctx context.Context, codec kbfscodec.Codec, resolver idutil.Resolver, idGetter IDGetter, osg idutil.OfflineStatusGetter, other Handle) ( resolvesTo bool, partialResolvedH *Handle, err error) { // Check the conflict extension. var conflictAdded, finalizedAdded bool if !h.IsConflict() &&...
[ "func", "(", "h", "Handle", ")", "ResolvesTo", "(", "ctx", "context", ".", "Context", ",", "codec", "kbfscodec", ".", "Codec", ",", "resolver", "idutil", ".", "Resolver", ",", "idGetter", "IDGetter", ",", "osg", "idutil", ".", "OfflineStatusGetter", ",", "...
// ResolvesTo returns whether this handle resolves to the given one. // It also returns the partially-resolved version of h, i.e. h // resolved except for unresolved assertions in other; this should // equal other if and only if true is returned.
[ "ResolvesTo", "returns", "whether", "this", "handle", "resolves", "to", "the", "given", "one", ".", "It", "also", "returns", "the", "partially", "-", "resolved", "version", "of", "h", "i", ".", "e", ".", "h", "resolved", "except", "for", "unresolved", "ass...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/tlfhandle/resolve.go#L465-L542
160,846
keybase/client
go/kbfs/tlfhandle/resolve.go
MutuallyResolvesTo
func (h Handle) MutuallyResolvesTo( ctx context.Context, codec kbfscodec.Codec, resolver idutil.Resolver, idGetter IDGetter, osg idutil.OfflineStatusGetter, other Handle, rev kbfsmd.Revision, tlfID tlf.ID, log logger.Logger) error { handleResolvesToOther, partialResolvedHandle, err := h.ResolvesTo(ctx, codec, re...
go
func (h Handle) MutuallyResolvesTo( ctx context.Context, codec kbfscodec.Codec, resolver idutil.Resolver, idGetter IDGetter, osg idutil.OfflineStatusGetter, other Handle, rev kbfsmd.Revision, tlfID tlf.ID, log logger.Logger) error { handleResolvesToOther, partialResolvedHandle, err := h.ResolvesTo(ctx, codec, re...
[ "func", "(", "h", "Handle", ")", "MutuallyResolvesTo", "(", "ctx", "context", ".", "Context", ",", "codec", "kbfscodec", ".", "Codec", ",", "resolver", "idutil", ".", "Resolver", ",", "idGetter", "IDGetter", ",", "osg", "idutil", ".", "OfflineStatusGetter", ...
// MutuallyResolvesTo checks that the target handle, and the provided // `other` handle, resolve to each other.
[ "MutuallyResolvesTo", "checks", "that", "the", "target", "handle", "and", "the", "provided", "other", "handle", "resolve", "to", "each", "other", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/tlfhandle/resolve.go#L546-L584
160,847
keybase/client
go/kbfs/tlfhandle/resolve.go
ResolveImplicitTeam
func (nitk noImplicitTeamKBPKI) ResolveImplicitTeam( _ context.Context, _, _ string, _ tlf.Type, _ keybase1.OfflineAvailability) (idutil.ImplicitTeamInfo, error) { return idutil.ImplicitTeamInfo{}, errors.New("Skipping implicit team lookup for quick handle parsing") }
go
func (nitk noImplicitTeamKBPKI) ResolveImplicitTeam( _ context.Context, _, _ string, _ tlf.Type, _ keybase1.OfflineAvailability) (idutil.ImplicitTeamInfo, error) { return idutil.ImplicitTeamInfo{}, errors.New("Skipping implicit team lookup for quick handle parsing") }
[ "func", "(", "nitk", "noImplicitTeamKBPKI", ")", "ResolveImplicitTeam", "(", "_", "context", ".", "Context", ",", "_", ",", "_", "string", ",", "_", "tlf", ".", "Type", ",", "_", "keybase1", ".", "OfflineAvailability", ")", "(", "idutil", ".", "ImplicitTea...
// ResolveImplicitTeam implements the KBPKI interface for noImplicitTeamKBPKI.
[ "ResolveImplicitTeam", "implements", "the", "KBPKI", "interface", "for", "noImplicitTeamKBPKI", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/tlfhandle/resolve.go#L987-L992
160,848
keybase/client
go/kbfs/tlfhandle/resolve.go
ParseHandlePreferredQuick
func ParseHandlePreferredQuick( ctx context.Context, kbpki idutil.KBPKI, osg idutil.OfflineStatusGetter, name string, ty tlf.Type) (handle *Handle, err error) { // Override the KBPKI with one that doesn't try to resolve // implicit teams. kbpki = noImplicitTeamKBPKI{kbpki} return ParseHandlePreferred(ctx, kbpki, ...
go
func ParseHandlePreferredQuick( ctx context.Context, kbpki idutil.KBPKI, osg idutil.OfflineStatusGetter, name string, ty tlf.Type) (handle *Handle, err error) { // Override the KBPKI with one that doesn't try to resolve // implicit teams. kbpki = noImplicitTeamKBPKI{kbpki} return ParseHandlePreferred(ctx, kbpki, ...
[ "func", "ParseHandlePreferredQuick", "(", "ctx", "context", ".", "Context", ",", "kbpki", "idutil", ".", "KBPKI", ",", "osg", "idutil", ".", "OfflineStatusGetter", ",", "name", "string", ",", "ty", "tlf", ".", "Type", ")", "(", "handle", "*", "Handle", ","...
// ParseHandlePreferredQuick parses a handle from a name, without // doing this time consuming checks needed for implicit-team checking // or TLF-ID-fetching.
[ "ParseHandlePreferredQuick", "parses", "a", "handle", "from", "a", "name", "without", "doing", "this", "time", "consuming", "checks", "needed", "for", "implicit", "-", "team", "checking", "or", "TLF", "-", "ID", "-", "fetching", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/tlfhandle/resolve.go#L997-L1004
160,849
keybase/client
go/engine/login_load_user.go
newLoginLoadUser
func newLoginLoadUser(g *libkb.GlobalContext, username string) *loginLoadUser { return &loginLoadUser{ Contextified: libkb.NewContextified(g), username: strings.TrimSpace(username), } }
go
func newLoginLoadUser(g *libkb.GlobalContext, username string) *loginLoadUser { return &loginLoadUser{ Contextified: libkb.NewContextified(g), username: strings.TrimSpace(username), } }
[ "func", "newLoginLoadUser", "(", "g", "*", "libkb", ".", "GlobalContext", ",", "username", "string", ")", "*", "loginLoadUser", "{", "return", "&", "loginLoadUser", "{", "Contextified", ":", "libkb", ".", "NewContextified", "(", "g", ")", ",", "username", ":...
// newLoginLoadUser creates a loginLoadUser engine. `username` argument is // optional.
[ "newLoginLoadUser", "creates", "a", "loginLoadUser", "engine", ".", "username", "argument", "is", "optional", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/engine/login_load_user.go#L27-L32
160,850
keybase/client
go/protocol/keybase1/simple_fs.go
SimpleFSListRecursive
func (c SimpleFSClient) SimpleFSListRecursive(ctx context.Context, __arg SimpleFSListRecursiveArg) (err error) { err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSListRecursive", []interface{}{__arg}, nil) return }
go
func (c SimpleFSClient) SimpleFSListRecursive(ctx context.Context, __arg SimpleFSListRecursiveArg) (err error) { err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSListRecursive", []interface{}{__arg}, nil) return }
[ "func", "(", "c", "SimpleFSClient", ")", "SimpleFSListRecursive", "(", "ctx", "context", ".", "Context", ",", "__arg", "SimpleFSListRecursiveArg", ")", "(", "err", "error", ")", "{", "err", "=", "c", ".", "Cli", ".", "Call", "(", "ctx", ",", "\"", "\"", ...
// Begin recursive list of items in directory at path. // If `refreshSubscription` is true and the path is a KBFS path, simpleFS // will begin sending `FSPathUpdated` notifications for the for the // corresponding TLF, until another call refreshes the subscription on a // different TLF.
[ "Begin", "recursive", "list", "of", "items", "in", "directory", "at", "path", ".", "If", "refreshSubscription", "is", "true", "and", "the", "path", "is", "a", "KBFS", "path", "simpleFS", "will", "begin", "sending", "FSPathUpdated", "notifications", "for", "the...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/keybase1/simple_fs.go#L2068-L2071
160,851
keybase/client
go/protocol/keybase1/simple_fs.go
SimpleFSListRecursiveToDepth
func (c SimpleFSClient) SimpleFSListRecursiveToDepth(ctx context.Context, __arg SimpleFSListRecursiveToDepthArg) (err error) { err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSListRecursiveToDepth", []interface{}{__arg}, nil) return }
go
func (c SimpleFSClient) SimpleFSListRecursiveToDepth(ctx context.Context, __arg SimpleFSListRecursiveToDepthArg) (err error) { err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSListRecursiveToDepth", []interface{}{__arg}, nil) return }
[ "func", "(", "c", "SimpleFSClient", ")", "SimpleFSListRecursiveToDepth", "(", "ctx", "context", ".", "Context", ",", "__arg", "SimpleFSListRecursiveToDepthArg", ")", "(", "err", "error", ")", "{", "err", "=", "c", ".", "Cli", ".", "Call", "(", "ctx", ",", ...
// Begin recursive list of items in directory at path up to a given depth
[ "Begin", "recursive", "list", "of", "items", "in", "directory", "at", "path", "up", "to", "a", "given", "depth" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/keybase1/simple_fs.go#L2074-L2077
160,852
keybase/client
go/protocol/keybase1/simple_fs.go
SimpleFSReadList
func (c SimpleFSClient) SimpleFSReadList(ctx context.Context, opID OpID) (res SimpleFSListResult, err error) { __arg := SimpleFSReadListArg{OpID: opID} err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSReadList", []interface{}{__arg}, &res) return }
go
func (c SimpleFSClient) SimpleFSReadList(ctx context.Context, opID OpID) (res SimpleFSListResult, err error) { __arg := SimpleFSReadListArg{OpID: opID} err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSReadList", []interface{}{__arg}, &res) return }
[ "func", "(", "c", "SimpleFSClient", ")", "SimpleFSReadList", "(", "ctx", "context", ".", "Context", ",", "opID", "OpID", ")", "(", "res", "SimpleFSListResult", ",", "err", "error", ")", "{", "__arg", ":=", "SimpleFSReadListArg", "{", "OpID", ":", "opID", "...
// Get list of Paths in progress. Can indicate status of pending // to get more entries.
[ "Get", "list", "of", "Paths", "in", "progress", ".", "Can", "indicate", "status", "of", "pending", "to", "get", "more", "entries", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/keybase1/simple_fs.go#L2081-L2085
160,853
keybase/client
go/protocol/keybase1/simple_fs.go
SimpleFSCopy
func (c SimpleFSClient) SimpleFSCopy(ctx context.Context, __arg SimpleFSCopyArg) (err error) { err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSCopy", []interface{}{__arg}, nil) return }
go
func (c SimpleFSClient) SimpleFSCopy(ctx context.Context, __arg SimpleFSCopyArg) (err error) { err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSCopy", []interface{}{__arg}, nil) return }
[ "func", "(", "c", "SimpleFSClient", ")", "SimpleFSCopy", "(", "ctx", "context", ".", "Context", ",", "__arg", "SimpleFSCopyArg", ")", "(", "err", "error", ")", "{", "err", "=", "c", ".", "Cli", ".", "Call", "(", "ctx", ",", "\"", "\"", ",", "[", "]...
// Begin copy of file or directory
[ "Begin", "copy", "of", "file", "or", "directory" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/keybase1/simple_fs.go#L2088-L2091
160,854
keybase/client
go/protocol/keybase1/simple_fs.go
SimpleFSSymlink
func (c SimpleFSClient) SimpleFSSymlink(ctx context.Context, __arg SimpleFSSymlinkArg) (err error) { err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSSymlink", []interface{}{__arg}, nil) return }
go
func (c SimpleFSClient) SimpleFSSymlink(ctx context.Context, __arg SimpleFSSymlinkArg) (err error) { err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSSymlink", []interface{}{__arg}, nil) return }
[ "func", "(", "c", "SimpleFSClient", ")", "SimpleFSSymlink", "(", "ctx", "context", ".", "Context", ",", "__arg", "SimpleFSSymlinkArg", ")", "(", "err", "error", ")", "{", "err", "=", "c", ".", "Cli", ".", "Call", "(", "ctx", ",", "\"", "\"", ",", "["...
// Make a symlink of file or directory
[ "Make", "a", "symlink", "of", "file", "or", "directory" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/keybase1/simple_fs.go#L2094-L2097
160,855
keybase/client
go/protocol/keybase1/simple_fs.go
SimpleFSCopyRecursive
func (c SimpleFSClient) SimpleFSCopyRecursive(ctx context.Context, __arg SimpleFSCopyRecursiveArg) (err error) { err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSCopyRecursive", []interface{}{__arg}, nil) return }
go
func (c SimpleFSClient) SimpleFSCopyRecursive(ctx context.Context, __arg SimpleFSCopyRecursiveArg) (err error) { err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSCopyRecursive", []interface{}{__arg}, nil) return }
[ "func", "(", "c", "SimpleFSClient", ")", "SimpleFSCopyRecursive", "(", "ctx", "context", ".", "Context", ",", "__arg", "SimpleFSCopyRecursiveArg", ")", "(", "err", "error", ")", "{", "err", "=", "c", ".", "Cli", ".", "Call", "(", "ctx", ",", "\"", "\"", ...
// Begin recursive copy of directory
[ "Begin", "recursive", "copy", "of", "directory" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/keybase1/simple_fs.go#L2100-L2103
160,856
keybase/client
go/protocol/keybase1/simple_fs.go
SimpleFSRename
func (c SimpleFSClient) SimpleFSRename(ctx context.Context, __arg SimpleFSRenameArg) (err error) { err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSRename", []interface{}{__arg}, nil) return }
go
func (c SimpleFSClient) SimpleFSRename(ctx context.Context, __arg SimpleFSRenameArg) (err error) { err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSRename", []interface{}{__arg}, nil) return }
[ "func", "(", "c", "SimpleFSClient", ")", "SimpleFSRename", "(", "ctx", "context", ".", "Context", ",", "__arg", "SimpleFSRenameArg", ")", "(", "err", "error", ")", "{", "err", "=", "c", ".", "Cli", ".", "Call", "(", "ctx", ",", "\"", "\"", ",", "[", ...
// Rename file or directory, KBFS side only
[ "Rename", "file", "or", "directory", "KBFS", "side", "only" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/keybase1/simple_fs.go#L2112-L2115
160,857
keybase/client
go/protocol/keybase1/simple_fs.go
SimpleFSWrite
func (c SimpleFSClient) SimpleFSWrite(ctx context.Context, __arg SimpleFSWriteArg) (err error) { err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSWrite", []interface{}{__arg}, nil) return }
go
func (c SimpleFSClient) SimpleFSWrite(ctx context.Context, __arg SimpleFSWriteArg) (err error) { err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSWrite", []interface{}{__arg}, nil) return }
[ "func", "(", "c", "SimpleFSClient", ")", "SimpleFSWrite", "(", "ctx", "context", ".", "Context", ",", "__arg", "SimpleFSWriteArg", ")", "(", "err", "error", ")", "{", "err", "=", "c", ".", "Cli", ".", "Call", "(", "ctx", ",", "\"", "\"", ",", "[", ...
// Append content to opened file. // May be repeated until OpID is closed.
[ "Append", "content", "to", "opened", "file", ".", "May", "be", "repeated", "until", "OpID", "is", "closed", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/keybase1/simple_fs.go#L2142-L2145
160,858
keybase/client
go/protocol/keybase1/simple_fs.go
SimpleFSRemove
func (c SimpleFSClient) SimpleFSRemove(ctx context.Context, __arg SimpleFSRemoveArg) (err error) { err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSRemove", []interface{}{__arg}, nil) return }
go
func (c SimpleFSClient) SimpleFSRemove(ctx context.Context, __arg SimpleFSRemoveArg) (err error) { err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSRemove", []interface{}{__arg}, nil) return }
[ "func", "(", "c", "SimpleFSClient", ")", "SimpleFSRemove", "(", "ctx", "context", ".", "Context", ",", "__arg", "SimpleFSRemoveArg", ")", "(", "err", "error", ")", "{", "err", "=", "c", ".", "Cli", ".", "Call", "(", "ctx", ",", "\"", "\"", ",", "[", ...
// Remove file or directory from filesystem
[ "Remove", "file", "or", "directory", "from", "filesystem" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/keybase1/simple_fs.go#L2148-L2151
160,859
keybase/client
go/protocol/keybase1/simple_fs.go
SimpleFSStat
func (c SimpleFSClient) SimpleFSStat(ctx context.Context, __arg SimpleFSStatArg) (res Dirent, err error) { err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSStat", []interface{}{__arg}, &res) return }
go
func (c SimpleFSClient) SimpleFSStat(ctx context.Context, __arg SimpleFSStatArg) (res Dirent, err error) { err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSStat", []interface{}{__arg}, &res) return }
[ "func", "(", "c", "SimpleFSClient", ")", "SimpleFSStat", "(", "ctx", "context", ".", "Context", ",", "__arg", "SimpleFSStatArg", ")", "(", "res", "Dirent", ",", "err", "error", ")", "{", "err", "=", "c", ".", "Cli", ".", "Call", "(", "ctx", ",", "\""...
// Get info about file
[ "Get", "info", "about", "file" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/keybase1/simple_fs.go#L2154-L2157
160,860
keybase/client
go/protocol/keybase1/simple_fs.go
SimpleFSGetRevisions
func (c SimpleFSClient) SimpleFSGetRevisions(ctx context.Context, __arg SimpleFSGetRevisionsArg) (err error) { err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSGetRevisions", []interface{}{__arg}, nil) return }
go
func (c SimpleFSClient) SimpleFSGetRevisions(ctx context.Context, __arg SimpleFSGetRevisionsArg) (err error) { err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSGetRevisions", []interface{}{__arg}, nil) return }
[ "func", "(", "c", "SimpleFSClient", ")", "SimpleFSGetRevisions", "(", "ctx", "context", ".", "Context", ",", "__arg", "SimpleFSGetRevisionsArg", ")", "(", "err", "error", ")", "{", "err", "=", "c", ".", "Cli", ".", "Call", "(", "ctx", ",", "\"", "\"", ...
// Get revision info for a directory entry
[ "Get", "revision", "info", "for", "a", "directory", "entry" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/keybase1/simple_fs.go#L2160-L2163
160,861
keybase/client
go/protocol/keybase1/simple_fs.go
SimpleFSReadRevisions
func (c SimpleFSClient) SimpleFSReadRevisions(ctx context.Context, opID OpID) (res GetRevisionsResult, err error) { __arg := SimpleFSReadRevisionsArg{OpID: opID} err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSReadRevisions", []interface{}{__arg}, &res) return }
go
func (c SimpleFSClient) SimpleFSReadRevisions(ctx context.Context, opID OpID) (res GetRevisionsResult, err error) { __arg := SimpleFSReadRevisionsArg{OpID: opID} err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSReadRevisions", []interface{}{__arg}, &res) return }
[ "func", "(", "c", "SimpleFSClient", ")", "SimpleFSReadRevisions", "(", "ctx", "context", ".", "Context", ",", "opID", "OpID", ")", "(", "res", "GetRevisionsResult", ",", "err", "error", ")", "{", "__arg", ":=", "SimpleFSReadRevisionsArg", "{", "OpID", ":", "...
// Get list of revisions in progress. Can indicate status of pending // to get more revisions.
[ "Get", "list", "of", "revisions", "in", "progress", ".", "Can", "indicate", "status", "of", "pending", "to", "get", "more", "revisions", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/keybase1/simple_fs.go#L2167-L2171
160,862
keybase/client
go/protocol/keybase1/simple_fs.go
SimpleFSMakeOpid
func (c SimpleFSClient) SimpleFSMakeOpid(ctx context.Context) (res OpID, err error) { err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSMakeOpid", []interface{}{SimpleFSMakeOpidArg{}}, &res) return }
go
func (c SimpleFSClient) SimpleFSMakeOpid(ctx context.Context) (res OpID, err error) { err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSMakeOpid", []interface{}{SimpleFSMakeOpidArg{}}, &res) return }
[ "func", "(", "c", "SimpleFSClient", ")", "SimpleFSMakeOpid", "(", "ctx", "context", ".", "Context", ")", "(", "res", "OpID", ",", "err", "error", ")", "{", "err", "=", "c", ".", "Cli", ".", "Call", "(", "ctx", ",", "\"", "\"", ",", "[", "]", "int...
// Convenience helper for generating new random value
[ "Convenience", "helper", "for", "generating", "new", "random", "value" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/keybase1/simple_fs.go#L2174-L2177
160,863
keybase/client
go/protocol/keybase1/simple_fs.go
SimpleFSCancel
func (c SimpleFSClient) SimpleFSCancel(ctx context.Context, opID OpID) (err error) { __arg := SimpleFSCancelArg{OpID: opID} err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSCancel", []interface{}{__arg}, nil) return }
go
func (c SimpleFSClient) SimpleFSCancel(ctx context.Context, opID OpID) (err error) { __arg := SimpleFSCancelArg{OpID: opID} err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSCancel", []interface{}{__arg}, nil) return }
[ "func", "(", "c", "SimpleFSClient", ")", "SimpleFSCancel", "(", "ctx", "context", ".", "Context", ",", "opID", "OpID", ")", "(", "err", "error", ")", "{", "__arg", ":=", "SimpleFSCancelArg", "{", "OpID", ":", "opID", "}", "\n", "err", "=", "c", ".", ...
// Cancels a running operation, like copy.
[ "Cancels", "a", "running", "operation", "like", "copy", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/keybase1/simple_fs.go#L2188-L2192
160,864
keybase/client
go/protocol/keybase1/simple_fs.go
SimpleFSCheck
func (c SimpleFSClient) SimpleFSCheck(ctx context.Context, opID OpID) (res OpProgress, err error) { __arg := SimpleFSCheckArg{OpID: opID} err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSCheck", []interface{}{__arg}, &res) return }
go
func (c SimpleFSClient) SimpleFSCheck(ctx context.Context, opID OpID) (res OpProgress, err error) { __arg := SimpleFSCheckArg{OpID: opID} err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSCheck", []interface{}{__arg}, &res) return }
[ "func", "(", "c", "SimpleFSClient", ")", "SimpleFSCheck", "(", "ctx", "context", ".", "Context", ",", "opID", "OpID", ")", "(", "res", "OpProgress", ",", "err", "error", ")", "{", "__arg", ":=", "SimpleFSCheckArg", "{", "OpID", ":", "opID", "}", "\n", ...
// Check progress of pending operation
[ "Check", "progress", "of", "pending", "operation" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/keybase1/simple_fs.go#L2195-L2199
160,865
keybase/client
go/protocol/keybase1/simple_fs.go
SimpleFSGetOps
func (c SimpleFSClient) SimpleFSGetOps(ctx context.Context) (res []OpDescription, err error) { err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSGetOps", []interface{}{SimpleFSGetOpsArg{}}, &res) return }
go
func (c SimpleFSClient) SimpleFSGetOps(ctx context.Context) (res []OpDescription, err error) { err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSGetOps", []interface{}{SimpleFSGetOpsArg{}}, &res) return }
[ "func", "(", "c", "SimpleFSClient", ")", "SimpleFSGetOps", "(", "ctx", "context", ".", "Context", ")", "(", "res", "[", "]", "OpDescription", ",", "err", "error", ")", "{", "err", "=", "c", ".", "Cli", ".", "Call", "(", "ctx", ",", "\"", "\"", ",",...
// Get all the outstanding operations
[ "Get", "all", "the", "outstanding", "operations" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/keybase1/simple_fs.go#L2202-L2205
160,866
keybase/client
go/protocol/keybase1/simple_fs.go
SimpleFSWait
func (c SimpleFSClient) SimpleFSWait(ctx context.Context, opID OpID) (err error) { __arg := SimpleFSWaitArg{OpID: opID} err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSWait", []interface{}{__arg}, nil) return }
go
func (c SimpleFSClient) SimpleFSWait(ctx context.Context, opID OpID) (err error) { __arg := SimpleFSWaitArg{OpID: opID} err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSWait", []interface{}{__arg}, nil) return }
[ "func", "(", "c", "SimpleFSClient", ")", "SimpleFSWait", "(", "ctx", "context", ".", "Context", ",", "opID", "OpID", ")", "(", "err", "error", ")", "{", "__arg", ":=", "SimpleFSWaitArg", "{", "OpID", ":", "opID", "}", "\n", "err", "=", "c", ".", "Cli...
// Blocking wait for the pending operation to finish
[ "Blocking", "wait", "for", "the", "pending", "operation", "to", "finish" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/keybase1/simple_fs.go#L2208-L2212
160,867
keybase/client
go/protocol/keybase1/simple_fs.go
SimpleFSDumpDebuggingInfo
func (c SimpleFSClient) SimpleFSDumpDebuggingInfo(ctx context.Context) (err error) { err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSDumpDebuggingInfo", []interface{}{SimpleFSDumpDebuggingInfoArg{}}, nil) return }
go
func (c SimpleFSClient) SimpleFSDumpDebuggingInfo(ctx context.Context) (err error) { err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSDumpDebuggingInfo", []interface{}{SimpleFSDumpDebuggingInfoArg{}}, nil) return }
[ "func", "(", "c", "SimpleFSClient", ")", "SimpleFSDumpDebuggingInfo", "(", "ctx", "context", ".", "Context", ")", "(", "err", "error", ")", "{", "err", "=", "c", ".", "Cli", ".", "Call", "(", "ctx", ",", "\"", "\"", ",", "[", "]", "interface", "{", ...
// Instructs KBFS to dump debugging info into its logs.
[ "Instructs", "KBFS", "to", "dump", "debugging", "info", "into", "its", "logs", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/keybase1/simple_fs.go#L2215-L2218
160,868
keybase/client
go/protocol/keybase1/simple_fs.go
SimpleFSClearConflictState
func (c SimpleFSClient) SimpleFSClearConflictState(ctx context.Context, path Path) (err error) { __arg := SimpleFSClearConflictStateArg{Path: path} err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSClearConflictState", []interface{}{__arg}, nil) return }
go
func (c SimpleFSClient) SimpleFSClearConflictState(ctx context.Context, path Path) (err error) { __arg := SimpleFSClearConflictStateArg{Path: path} err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSClearConflictState", []interface{}{__arg}, nil) return }
[ "func", "(", "c", "SimpleFSClient", ")", "SimpleFSClearConflictState", "(", "ctx", "context", ".", "Context", ",", "path", "Path", ")", "(", "err", "error", ")", "{", "__arg", ":=", "SimpleFSClearConflictStateArg", "{", "Path", ":", "path", "}", "\n", "err",...
// Clear the conflict state of a TLF.
[ "Clear", "the", "conflict", "state", "of", "a", "TLF", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/keybase1/simple_fs.go#L2221-L2225
160,869
keybase/client
go/protocol/keybase1/simple_fs.go
SimpleFSSyncStatus
func (c SimpleFSClient) SimpleFSSyncStatus(ctx context.Context, filter ListFilter) (res FSSyncStatus, err error) { __arg := SimpleFSSyncStatusArg{Filter: filter} err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSSyncStatus", []interface{}{__arg}, &res) return }
go
func (c SimpleFSClient) SimpleFSSyncStatus(ctx context.Context, filter ListFilter) (res FSSyncStatus, err error) { __arg := SimpleFSSyncStatusArg{Filter: filter} err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSSyncStatus", []interface{}{__arg}, &res) return }
[ "func", "(", "c", "SimpleFSClient", ")", "SimpleFSSyncStatus", "(", "ctx", "context", ".", "Context", ",", "filter", "ListFilter", ")", "(", "res", "FSSyncStatus", ",", "err", "error", ")", "{", "__arg", ":=", "SimpleFSSyncStatusArg", "{", "Filter", ":", "fi...
// Get sync status.
[ "Get", "sync", "status", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/keybase1/simple_fs.go#L2228-L2232
160,870
keybase/client
go/protocol/keybase1/simple_fs.go
SimpleFSListFavorites
func (c SimpleFSClient) SimpleFSListFavorites(ctx context.Context) (res FavoritesResult, err error) { err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSListFavorites", []interface{}{SimpleFSListFavoritesArg{}}, &res) return }
go
func (c SimpleFSClient) SimpleFSListFavorites(ctx context.Context) (res FavoritesResult, err error) { err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSListFavorites", []interface{}{SimpleFSListFavoritesArg{}}, &res) return }
[ "func", "(", "c", "SimpleFSClient", ")", "SimpleFSListFavorites", "(", "ctx", "context", ".", "Context", ")", "(", "res", "FavoritesResult", ",", "err", "error", ")", "{", "err", "=", "c", ".", "Cli", ".", "Call", "(", "ctx", ",", "\"", "\"", ",", "[...
// simpleFSListFavorites gets the current favorites, ignored folders, and new // folders from the KBFS cache.
[ "simpleFSListFavorites", "gets", "the", "current", "favorites", "ignored", "folders", "and", "new", "folders", "from", "the", "KBFS", "cache", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/keybase1/simple_fs.go#L2270-L2273
160,871
keybase/client
go/protocol/keybase1/simple_fs.go
SimpleFSGetUserQuotaUsage
func (c SimpleFSClient) SimpleFSGetUserQuotaUsage(ctx context.Context) (res SimpleFSQuotaUsage, err error) { err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSGetUserQuotaUsage", []interface{}{SimpleFSGetUserQuotaUsageArg{}}, &res) return }
go
func (c SimpleFSClient) SimpleFSGetUserQuotaUsage(ctx context.Context) (res SimpleFSQuotaUsage, err error) { err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSGetUserQuotaUsage", []interface{}{SimpleFSGetUserQuotaUsageArg{}}, &res) return }
[ "func", "(", "c", "SimpleFSClient", ")", "SimpleFSGetUserQuotaUsage", "(", "ctx", "context", ".", "Context", ")", "(", "res", "SimpleFSQuotaUsage", ",", "err", "error", ")", "{", "err", "=", "c", ".", "Cli", ".", "Call", "(", "ctx", ",", "\"", "\"", ",...
// simpleFSGetUserQuotaUsage returns the quota usage for the logged-in // user. Any usage includes local journal usage as well.
[ "simpleFSGetUserQuotaUsage", "returns", "the", "quota", "usage", "for", "the", "logged", "-", "in", "user", ".", "Any", "usage", "includes", "local", "journal", "usage", "as", "well", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/keybase1/simple_fs.go#L2277-L2280
160,872
keybase/client
go/protocol/keybase1/simple_fs.go
SimpleFSGetTeamQuotaUsage
func (c SimpleFSClient) SimpleFSGetTeamQuotaUsage(ctx context.Context, teamName TeamName) (res SimpleFSQuotaUsage, err error) { __arg := SimpleFSGetTeamQuotaUsageArg{TeamName: teamName} err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSGetTeamQuotaUsage", []interface{}{__arg}, &res) return }
go
func (c SimpleFSClient) SimpleFSGetTeamQuotaUsage(ctx context.Context, teamName TeamName) (res SimpleFSQuotaUsage, err error) { __arg := SimpleFSGetTeamQuotaUsageArg{TeamName: teamName} err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSGetTeamQuotaUsage", []interface{}{__arg}, &res) return }
[ "func", "(", "c", "SimpleFSClient", ")", "SimpleFSGetTeamQuotaUsage", "(", "ctx", "context", ".", "Context", ",", "teamName", "TeamName", ")", "(", "res", "SimpleFSQuotaUsage", ",", "err", "error", ")", "{", "__arg", ":=", "SimpleFSGetTeamQuotaUsageArg", "{", "T...
// simpleFSGetTeamQuotaUsage returns the quota usage for the given team, if // the logged-in user has access to that team. Any usage includes // local journal usage as well.
[ "simpleFSGetTeamQuotaUsage", "returns", "the", "quota", "usage", "for", "the", "given", "team", "if", "the", "logged", "-", "in", "user", "has", "access", "to", "that", "team", ".", "Any", "usage", "includes", "local", "journal", "usage", "as", "well", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/keybase1/simple_fs.go#L2285-L2289
160,873
keybase/client
go/protocol/keybase1/simple_fs.go
SimpleFSReset
func (c SimpleFSClient) SimpleFSReset(ctx context.Context, path Path) (err error) { __arg := SimpleFSResetArg{Path: path} err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSReset", []interface{}{__arg}, nil) return }
go
func (c SimpleFSClient) SimpleFSReset(ctx context.Context, path Path) (err error) { __arg := SimpleFSResetArg{Path: path} err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSReset", []interface{}{__arg}, nil) return }
[ "func", "(", "c", "SimpleFSClient", ")", "SimpleFSReset", "(", "ctx", "context", ".", "Context", ",", "path", "Path", ")", "(", "err", "error", ")", "{", "__arg", ":=", "SimpleFSResetArg", "{", "Path", ":", "path", "}", "\n", "err", "=", "c", ".", "C...
// simpleFSReset completely resets the KBFS folder referenced in `path`. // It should only be called after explicit user confirmation.
[ "simpleFSReset", "completely", "resets", "the", "KBFS", "folder", "referenced", "in", "path", ".", "It", "should", "only", "be", "called", "after", "explicit", "user", "confirmation", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/keybase1/simple_fs.go#L2293-L2297
160,874
keybase/client
go/kbfs/libkbfs/mdserver_local_shared.go
isWriterOrValidRekey
func isWriterOrValidRekey(ctx context.Context, teamMemChecker kbfsmd.TeamMembershipChecker, codec kbfscodec.Codec, currentUID keybase1.UID, verifyingKey kbfscrypto.VerifyingKey, mergedMasterHead, newMd kbfsmd.RootMetadata, prevExtra, extra kbfsmd.ExtraMetadata) ( bool, error) { h, err := mergedMasterHead.MakeBareT...
go
func isWriterOrValidRekey(ctx context.Context, teamMemChecker kbfsmd.TeamMembershipChecker, codec kbfscodec.Codec, currentUID keybase1.UID, verifyingKey kbfscrypto.VerifyingKey, mergedMasterHead, newMd kbfsmd.RootMetadata, prevExtra, extra kbfsmd.ExtraMetadata) ( bool, error) { h, err := mergedMasterHead.MakeBareT...
[ "func", "isWriterOrValidRekey", "(", "ctx", "context", ".", "Context", ",", "teamMemChecker", "kbfsmd", ".", "TeamMembershipChecker", ",", "codec", "kbfscodec", ".", "Codec", ",", "currentUID", "keybase1", ".", "UID", ",", "verifyingKey", "kbfscrypto", ".", "Verif...
// Helper to aid in enforcement that only specified public keys can // access TLF metadata. mergedMasterHead can be nil, in which case // true is returned.
[ "Helper", "to", "aid", "in", "enforcement", "that", "only", "specified", "public", "keys", "can", "access", "TLF", "metadata", ".", "mergedMasterHead", "can", "be", "nil", "in", "which", "case", "true", "is", "returned", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/mdserver_local_shared.go#L48-L81
160,875
keybase/client
go/bind/keybase.go
Init
func Init(homeDir, mobileSharedHome, logFile, runModeStr string, accessGroupOverride bool, externalDNSNSFetcher ExternalDNSNSFetcher, nvh NativeVideoHelper) (err error) { defer func() { err = flattenError(err) if err == nil { setInited() } }() fmt.Printf("Go: Initializing: home: %s mobileSharedHome: %s\n"...
go
func Init(homeDir, mobileSharedHome, logFile, runModeStr string, accessGroupOverride bool, externalDNSNSFetcher ExternalDNSNSFetcher, nvh NativeVideoHelper) (err error) { defer func() { err = flattenError(err) if err == nil { setInited() } }() fmt.Printf("Go: Initializing: home: %s mobileSharedHome: %s\n"...
[ "func", "Init", "(", "homeDir", ",", "mobileSharedHome", ",", "logFile", ",", "runModeStr", "string", ",", "accessGroupOverride", "bool", ",", "externalDNSNSFetcher", "ExternalDNSNSFetcher", ",", "nvh", "NativeVideoHelper", ")", "(", "err", "error", ")", "{", "def...
// Init runs the Keybase services
[ "Init", "runs", "the", "Keybase", "services" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/bind/keybase.go#L133-L244
160,876
keybase/client
go/bind/keybase.go
LogSend
func LogSend(status string, feedback string, sendLogs bool, uiLogPath, traceDir, cpuProfileDir string) (res string, err error) { defer func() { err = flattenError(err) }() logSendContext.Logs.Desktop = uiLogPath logSendContext.Logs.Trace = traceDir logSendContext.Logs.CPUProfile = cpuProfileDir env := kbCtx.Env s...
go
func LogSend(status string, feedback string, sendLogs bool, uiLogPath, traceDir, cpuProfileDir string) (res string, err error) { defer func() { err = flattenError(err) }() logSendContext.Logs.Desktop = uiLogPath logSendContext.Logs.Trace = traceDir logSendContext.Logs.CPUProfile = cpuProfileDir env := kbCtx.Env s...
[ "func", "LogSend", "(", "status", "string", ",", "feedback", "string", ",", "sendLogs", "bool", ",", "uiLogPath", ",", "traceDir", ",", "cpuProfileDir", "string", ")", "(", "res", "string", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", ...
// LogSend sends a log to Keybase
[ "LogSend", "sends", "a", "log", "to", "Keybase" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/bind/keybase.go#L274-L282
160,877
keybase/client
go/bind/keybase.go
WriteB64
func WriteB64(str string) (err error) { defer func() { err = flattenError(err) }() if conn == nil { return errors.New("connection not initialized") } data, err := base64.StdEncoding.DecodeString(str) if err != nil { return fmt.Errorf("Base64 decode error: %s; %s", err, str) } n, err := conn.Write(data) if e...
go
func WriteB64(str string) (err error) { defer func() { err = flattenError(err) }() if conn == nil { return errors.New("connection not initialized") } data, err := base64.StdEncoding.DecodeString(str) if err != nil { return fmt.Errorf("Base64 decode error: %s; %s", err, str) } n, err := conn.Write(data) if e...
[ "func", "WriteB64", "(", "str", "string", ")", "(", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "err", "=", "flattenError", "(", "err", ")", "}", "(", ")", "\n", "if", "conn", "==", "nil", "{", "return", "errors", ".", "New", "(", ...
// WriteB64 sends a base64 encoded msgpack rpc payload
[ "WriteB64", "sends", "a", "base64", "encoded", "msgpack", "rpc", "payload" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/bind/keybase.go#L285-L302
160,878
keybase/client
go/bind/keybase.go
ReadB64
func ReadB64() (res string, err error) { defer func() { err = flattenError(err) }() if conn == nil { return "", errors.New("connection not initialized") } n, err := conn.Read(buffer) if n > 0 && err == nil { str := base64.StdEncoding.EncodeToString(buffer[0:n]) return str, nil } if err != nil { // Attem...
go
func ReadB64() (res string, err error) { defer func() { err = flattenError(err) }() if conn == nil { return "", errors.New("connection not initialized") } n, err := conn.Read(buffer) if n > 0 && err == nil { str := base64.StdEncoding.EncodeToString(buffer[0:n]) return str, nil } if err != nil { // Attem...
[ "func", "ReadB64", "(", ")", "(", "res", "string", ",", "err", "error", ")", "{", "defer", "func", "(", ")", "{", "err", "=", "flattenError", "(", "err", ")", "}", "(", ")", "\n", "if", "conn", "==", "nil", "{", "return", "\"", "\"", ",", "erro...
// ReadB64 is a blocking read for base64 encoded msgpack rpc data. // It is called serially by the mobile run loops.
[ "ReadB64", "is", "a", "blocking", "read", "for", "base64", "encoded", "msgpack", "rpc", "data", ".", "It", "is", "called", "serially", "by", "the", "mobile", "run", "loops", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/bind/keybase.go#L316-L334
160,879
keybase/client
go/bind/keybase.go
Reset
func Reset() error { if conn != nil { conn.Close() } var err error conn, err = kbCtx.LoopbackListener.Dial() if err != nil { return fmt.Errorf("Socket error: %s", err) } return nil }
go
func Reset() error { if conn != nil { conn.Close() } var err error conn, err = kbCtx.LoopbackListener.Dial() if err != nil { return fmt.Errorf("Socket error: %s", err) } return nil }
[ "func", "Reset", "(", ")", "error", "{", "if", "conn", "!=", "nil", "{", "conn", ".", "Close", "(", ")", "\n", "}", "\n\n", "var", "err", "error", "\n", "conn", ",", "err", "=", "kbCtx", ".", "LoopbackListener", ".", "Dial", "(", ")", "\n", "if",...
// Reset resets the socket connection
[ "Reset", "resets", "the", "socket", "connection" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/bind/keybase.go#L337-L348
160,880
keybase/client
go/bind/keybase.go
ForceGC
func ForceGC() { fmt.Printf("Flushing global caches\n") kbCtx.FlushCaches() fmt.Printf("Done flushing global caches\n") fmt.Printf("Starting force gc\n") debug.FreeOSMemory() fmt.Printf("Done force gc\n") }
go
func ForceGC() { fmt.Printf("Flushing global caches\n") kbCtx.FlushCaches() fmt.Printf("Done flushing global caches\n") fmt.Printf("Starting force gc\n") debug.FreeOSMemory() fmt.Printf("Done force gc\n") }
[ "func", "ForceGC", "(", ")", "{", "fmt", ".", "Printf", "(", "\"", "\\n", "\"", ")", "\n", "kbCtx", ".", "FlushCaches", "(", ")", "\n", "fmt", ".", "Printf", "(", "\"", "\\n", "\"", ")", "\n\n", "fmt", ".", "Printf", "(", "\"", "\\n", "\"", ")"...
// ForceGC Forces a gc
[ "ForceGC", "Forces", "a", "gc" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/bind/keybase.go#L351-L359
160,881
keybase/client
go/bind/keybase.go
pushPendingMessageFailure
func pushPendingMessageFailure(obrs []chat1.OutboxRecord, pusher PushNotifier) { for _, obr := range obrs { if !obr.IsUnfurl() { kbCtx.Log.Debug("pushPendingMessageFailure: pushing convID: %s", obr.ConvID) pusher.LocalNotification("failedpending", "Heads up! One or more pending messages failed to send. Tap...
go
func pushPendingMessageFailure(obrs []chat1.OutboxRecord, pusher PushNotifier) { for _, obr := range obrs { if !obr.IsUnfurl() { kbCtx.Log.Debug("pushPendingMessageFailure: pushing convID: %s", obr.ConvID) pusher.LocalNotification("failedpending", "Heads up! One or more pending messages failed to send. Tap...
[ "func", "pushPendingMessageFailure", "(", "obrs", "[", "]", "chat1", ".", "OutboxRecord", ",", "pusher", "PushNotifier", ")", "{", "for", "_", ",", "obr", ":=", "range", "obrs", "{", "if", "!", "obr", ".", "IsUnfurl", "(", ")", "{", "kbCtx", ".", "Log"...
// pushPendingMessageFailure sends at most one notification that a message // failed to send. We don't notify the user about background failures like // unfurling.
[ "pushPendingMessageFailure", "sends", "at", "most", "one", "notification", "that", "a", "message", "failed", "to", "send", ".", "We", "don", "t", "notify", "the", "user", "about", "background", "failures", "like", "unfurling", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/bind/keybase.go#L500-L511
160,882
keybase/client
go/bind/keybase.go
AppWillExit
func AppWillExit(pusher PushNotifier) { if !isInited() { return } defer kbCtx.Trace("AppWillExit", func() error { return nil })() ctx := context.Background() obrs, err := kbChatCtx.MessageDeliverer.ActiveDeliveries(ctx) if err == nil { // We are about to get killed with messages still to send, let the user ...
go
func AppWillExit(pusher PushNotifier) { if !isInited() { return } defer kbCtx.Trace("AppWillExit", func() error { return nil })() ctx := context.Background() obrs, err := kbChatCtx.MessageDeliverer.ActiveDeliveries(ctx) if err == nil { // We are about to get killed with messages still to send, let the user ...
[ "func", "AppWillExit", "(", "pusher", "PushNotifier", ")", "{", "if", "!", "isInited", "(", ")", "{", "return", "\n", "}", "\n", "defer", "kbCtx", ".", "Trace", "(", "\"", "\"", ",", "func", "(", ")", "error", "{", "return", "nil", "}", ")", "(", ...
// AppWillExit is called reliably on iOS when the app is about to terminate // not as reliably on android
[ "AppWillExit", "is", "called", "reliably", "on", "iOS", "when", "the", "app", "is", "about", "to", "terminate", "not", "as", "reliably", "on", "android" ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/bind/keybase.go#L515-L528
160,883
keybase/client
go/bind/keybase.go
AppBeginBackgroundTask
func AppBeginBackgroundTask(pusher PushNotifier) { if !isInited() { return } defer kbCtx.Trace("AppBeginBackgroundTask", func() error { return nil })() ctx := context.Background() // Poll active deliveries in case we can shutdown early beginTime := libkb.ForceWallClock(time.Now()) ticker := time.NewTicker(5 * ...
go
func AppBeginBackgroundTask(pusher PushNotifier) { if !isInited() { return } defer kbCtx.Trace("AppBeginBackgroundTask", func() error { return nil })() ctx := context.Background() // Poll active deliveries in case we can shutdown early beginTime := libkb.ForceWallClock(time.Now()) ticker := time.NewTicker(5 * ...
[ "func", "AppBeginBackgroundTask", "(", "pusher", "PushNotifier", ")", "{", "if", "!", "isInited", "(", ")", "{", "return", "\n", "}", "\n", "defer", "kbCtx", ".", "Trace", "(", "\"", "\"", ",", "func", "(", ")", "error", "{", "return", "nil", "}", ")...
// AppBeginBackgroundTask notifies us that an app background task has been started on our behalf. This // function will return once we no longer need any time in the background.
[ "AppBeginBackgroundTask", "notifies", "us", "that", "an", "app", "background", "task", "has", "been", "started", "on", "our", "behalf", ".", "This", "function", "will", "return", "once", "we", "no", "longer", "need", "any", "time", "in", "the", "background", ...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/bind/keybase.go#L571-L644
160,884
keybase/client
go/kbfs/libkbfs/crypto_local.go
NewCryptoLocal
func NewCryptoLocal(codec kbfscodec.Codec, signingKey kbfscrypto.SigningKey, cryptPrivateKey kbfscrypto.CryptPrivateKey, blockCryptVersioner blockCryptVersioner) *CryptoLocal { return &CryptoLocal{ MakeCryptoCommon(codec, blockCryptVersioner), kbfscrypto.SigningKeySigner{Key: signingKey}, cryptPrivateKey, m...
go
func NewCryptoLocal(codec kbfscodec.Codec, signingKey kbfscrypto.SigningKey, cryptPrivateKey kbfscrypto.CryptPrivateKey, blockCryptVersioner blockCryptVersioner) *CryptoLocal { return &CryptoLocal{ MakeCryptoCommon(codec, blockCryptVersioner), kbfscrypto.SigningKeySigner{Key: signingKey}, cryptPrivateKey, m...
[ "func", "NewCryptoLocal", "(", "codec", "kbfscodec", ".", "Codec", ",", "signingKey", "kbfscrypto", ".", "SigningKey", ",", "cryptPrivateKey", "kbfscrypto", ".", "CryptPrivateKey", ",", "blockCryptVersioner", "blockCryptVersioner", ")", "*", "CryptoLocal", "{", "retur...
// NewCryptoLocal constructs a new CryptoLocal instance with the given // signing key.
[ "NewCryptoLocal", "constructs", "a", "new", "CryptoLocal", "instance", "with", "the", "given", "signing", "key", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/crypto_local.go#L36-L46
160,885
keybase/client
go/kbfs/libkbfs/crypto_local.go
DecryptTLFCryptKeyClientHalf
func (c *CryptoLocal) DecryptTLFCryptKeyClientHalf(ctx context.Context, publicKey kbfscrypto.TLFEphemeralPublicKey, encryptedClientHalf kbfscrypto.EncryptedTLFCryptKeyClientHalf) ( kbfscrypto.TLFCryptKeyClientHalf, error) { return kbfscrypto.DecryptTLFCryptKeyClientHalf( c.cryptPrivateKey, publicKey, encryptedCli...
go
func (c *CryptoLocal) DecryptTLFCryptKeyClientHalf(ctx context.Context, publicKey kbfscrypto.TLFEphemeralPublicKey, encryptedClientHalf kbfscrypto.EncryptedTLFCryptKeyClientHalf) ( kbfscrypto.TLFCryptKeyClientHalf, error) { return kbfscrypto.DecryptTLFCryptKeyClientHalf( c.cryptPrivateKey, publicKey, encryptedCli...
[ "func", "(", "c", "*", "CryptoLocal", ")", "DecryptTLFCryptKeyClientHalf", "(", "ctx", "context", ".", "Context", ",", "publicKey", "kbfscrypto", ".", "TLFEphemeralPublicKey", ",", "encryptedClientHalf", "kbfscrypto", ".", "EncryptedTLFCryptKeyClientHalf", ")", "(", "...
// DecryptTLFCryptKeyClientHalf implements the Crypto interface for // CryptoLocal.
[ "DecryptTLFCryptKeyClientHalf", "implements", "the", "Crypto", "interface", "for", "CryptoLocal", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/crypto_local.go#L50-L56
160,886
keybase/client
go/kbfs/libkbfs/crypto_local.go
DecryptTLFCryptKeyClientHalfAny
func (c *CryptoLocal) DecryptTLFCryptKeyClientHalfAny(ctx context.Context, keys []EncryptedTLFCryptKeyClientAndEphemeral, _ bool) ( clientHalf kbfscrypto.TLFCryptKeyClientHalf, index int, err error) { if len(keys) == 0 { return kbfscrypto.TLFCryptKeyClientHalf{}, -1, errors.WithStack(NoKeysError{}) } var firs...
go
func (c *CryptoLocal) DecryptTLFCryptKeyClientHalfAny(ctx context.Context, keys []EncryptedTLFCryptKeyClientAndEphemeral, _ bool) ( clientHalf kbfscrypto.TLFCryptKeyClientHalf, index int, err error) { if len(keys) == 0 { return kbfscrypto.TLFCryptKeyClientHalf{}, -1, errors.WithStack(NoKeysError{}) } var firs...
[ "func", "(", "c", "*", "CryptoLocal", ")", "DecryptTLFCryptKeyClientHalfAny", "(", "ctx", "context", ".", "Context", ",", "keys", "[", "]", "EncryptedTLFCryptKeyClientAndEphemeral", ",", "_", "bool", ")", "(", "clientHalf", "kbfscrypto", ".", "TLFCryptKeyClientHalf"...
// DecryptTLFCryptKeyClientHalfAny implements the Crypto interface for // CryptoLocal.
[ "DecryptTLFCryptKeyClientHalfAny", "implements", "the", "Crypto", "interface", "for", "CryptoLocal", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/crypto_local.go#L60-L92
160,887
keybase/client
go/kbfs/libkbfs/crypto_local.go
DecryptTeamMerkleLeaf
func (c *CryptoLocal) DecryptTeamMerkleLeaf( ctx context.Context, teamID keybase1.TeamID, publicKey kbfscrypto.TLFEphemeralPublicKey, encryptedMerkleLeaf kbfscrypto.EncryptedMerkleLeaf, minKeyGen keybase1.PerTeamKeyGeneration) (decryptedData []byte, err error) { perTeamKeys := c.teamPrivateKeys[teamID] maxKeyGen ...
go
func (c *CryptoLocal) DecryptTeamMerkleLeaf( ctx context.Context, teamID keybase1.TeamID, publicKey kbfscrypto.TLFEphemeralPublicKey, encryptedMerkleLeaf kbfscrypto.EncryptedMerkleLeaf, minKeyGen keybase1.PerTeamKeyGeneration) (decryptedData []byte, err error) { perTeamKeys := c.teamPrivateKeys[teamID] maxKeyGen ...
[ "func", "(", "c", "*", "CryptoLocal", ")", "DecryptTeamMerkleLeaf", "(", "ctx", "context", ".", "Context", ",", "teamID", "keybase1", ".", "TeamID", ",", "publicKey", "kbfscrypto", ".", "TLFEphemeralPublicKey", ",", "encryptedMerkleLeaf", "kbfscrypto", ".", "Encry...
// DecryptTeamMerkleLeaf implements the Crypto interface for // CryptoLocal.
[ "DecryptTeamMerkleLeaf", "implements", "the", "Crypto", "interface", "for", "CryptoLocal", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/crypto_local.go#L119-L135
160,888
keybase/client
go/kbfs/libfs/update_history.go
GetEncodedUpdateHistory
func GetEncodedUpdateHistory( ctx context.Context, config libkbfs.Config, folderBranch data.FolderBranch) ( data []byte, t time.Time, err error) { history, err := config.KBFSOps().GetUpdateHistory(ctx, folderBranch) if err != nil { return nil, time.Time{}, err } data, err = json.Marshal(history) if err != ni...
go
func GetEncodedUpdateHistory( ctx context.Context, config libkbfs.Config, folderBranch data.FolderBranch) ( data []byte, t time.Time, err error) { history, err := config.KBFSOps().GetUpdateHistory(ctx, folderBranch) if err != nil { return nil, time.Time{}, err } data, err = json.Marshal(history) if err != ni...
[ "func", "GetEncodedUpdateHistory", "(", "ctx", "context", ".", "Context", ",", "config", "libkbfs", ".", "Config", ",", "folderBranch", "data", ".", "FolderBranch", ")", "(", "data", "[", "]", "byte", ",", "t", "time", ".", "Time", ",", "err", "error", "...
// GetEncodedUpdateHistory returns a JSON-encoded version of a TLF's // complete update history.
[ "GetEncodedUpdateHistory", "returns", "a", "JSON", "-", "encoded", "version", "of", "a", "TLF", "s", "complete", "update", "history", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libfs/update_history.go#L18-L34
160,889
keybase/client
go/kbfs/libkbfs/keycache.go
NewKeyCacheStandard
func NewKeyCacheStandard(capacity int) *KeyCacheStandard { head, err := lru.New(capacity) if err != nil { panic(err.Error()) } return &KeyCacheStandard{head} }
go
func NewKeyCacheStandard(capacity int) *KeyCacheStandard { head, err := lru.New(capacity) if err != nil { panic(err.Error()) } return &KeyCacheStandard{head} }
[ "func", "NewKeyCacheStandard", "(", "capacity", "int", ")", "*", "KeyCacheStandard", "{", "head", ",", "err", ":=", "lru", ".", "New", "(", "capacity", ")", "\n", "if", "err", "!=", "nil", "{", "panic", "(", "err", ".", "Error", "(", ")", ")", "\n", ...
// NewKeyCacheStandard constructs a new KeyCacheStandard with the given // cache capacity.
[ "NewKeyCacheStandard", "constructs", "a", "new", "KeyCacheStandard", "with", "the", "given", "cache", "capacity", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/keycache.go#L28-L34
160,890
keybase/client
go/kbfs/libkbfs/keycache.go
GetTLFCryptKey
func (k *KeyCacheStandard) GetTLFCryptKey(tlf tlf.ID, keyGen kbfsmd.KeyGen) ( kbfscrypto.TLFCryptKey, error) { cacheKey := keyCacheKey{tlf, keyGen} if entry, ok := k.lru.Get(cacheKey); ok { if key, ok := entry.(kbfscrypto.TLFCryptKey); ok { return key, nil } // shouldn't really be possible return kbfscryp...
go
func (k *KeyCacheStandard) GetTLFCryptKey(tlf tlf.ID, keyGen kbfsmd.KeyGen) ( kbfscrypto.TLFCryptKey, error) { cacheKey := keyCacheKey{tlf, keyGen} if entry, ok := k.lru.Get(cacheKey); ok { if key, ok := entry.(kbfscrypto.TLFCryptKey); ok { return key, nil } // shouldn't really be possible return kbfscryp...
[ "func", "(", "k", "*", "KeyCacheStandard", ")", "GetTLFCryptKey", "(", "tlf", "tlf", ".", "ID", ",", "keyGen", "kbfsmd", ".", "KeyGen", ")", "(", "kbfscrypto", ".", "TLFCryptKey", ",", "error", ")", "{", "cacheKey", ":=", "keyCacheKey", "{", "tlf", ",", ...
// GetTLFCryptKey implements the KeyCache interface for KeyCacheStandard.
[ "GetTLFCryptKey", "implements", "the", "KeyCache", "interface", "for", "KeyCacheStandard", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/keycache.go#L37-L48
160,891
keybase/client
go/kbfs/libkbfs/keycache.go
PutTLFCryptKey
func (k *KeyCacheStandard) PutTLFCryptKey( tlf tlf.ID, keyGen kbfsmd.KeyGen, key kbfscrypto.TLFCryptKey) error { cacheKey := keyCacheKey{tlf, keyGen} k.lru.Add(cacheKey, key) return nil }
go
func (k *KeyCacheStandard) PutTLFCryptKey( tlf tlf.ID, keyGen kbfsmd.KeyGen, key kbfscrypto.TLFCryptKey) error { cacheKey := keyCacheKey{tlf, keyGen} k.lru.Add(cacheKey, key) return nil }
[ "func", "(", "k", "*", "KeyCacheStandard", ")", "PutTLFCryptKey", "(", "tlf", "tlf", ".", "ID", ",", "keyGen", "kbfsmd", ".", "KeyGen", ",", "key", "kbfscrypto", ".", "TLFCryptKey", ")", "error", "{", "cacheKey", ":=", "keyCacheKey", "{", "tlf", ",", "ke...
// PutTLFCryptKey implements the KeyCache interface for KeyCacheStandard.
[ "PutTLFCryptKey", "implements", "the", "KeyCache", "interface", "for", "KeyCacheStandard", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/keycache.go#L51-L56
160,892
keybase/client
go/kbfs/libfs/json.go
PrettyJSON
func PrettyJSON(value interface{}) ([]byte, error) { data, err := json.MarshalIndent(value, "", " ") if err != nil { return nil, err } data = append(data, '\n') return data, nil }
go
func PrettyJSON(value interface{}) ([]byte, error) { data, err := json.MarshalIndent(value, "", " ") if err != nil { return nil, err } data = append(data, '\n') return data, nil }
[ "func", "PrettyJSON", "(", "value", "interface", "{", "}", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "data", ",", "err", ":=", "json", ".", "MarshalIndent", "(", "value", ",", "\"", "\"", ",", "\"", "\"", ")", "\n", "if", "err", "!=", ...
// PrettyJSON marshals a value to human-readable JSON.
[ "PrettyJSON", "marshals", "a", "value", "to", "human", "-", "readable", "JSON", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libfs/json.go#L12-L19
160,893
keybase/client
go/kbfs/kbfssync/semaphore.go
Count
func (s *Semaphore) Count() int64 { s.lock.RLock() defer s.lock.RUnlock() return s.count }
go
func (s *Semaphore) Count() int64 { s.lock.RLock() defer s.lock.RUnlock() return s.count }
[ "func", "(", "s", "*", "Semaphore", ")", "Count", "(", ")", "int64", "{", "s", ".", "lock", ".", "RLock", "(", ")", "\n", "defer", "s", ".", "lock", ".", "RUnlock", "(", ")", "\n", "return", "s", ".", "count", "\n", "}" ]
// Count returns the current resource count.
[ "Count", "returns", "the", "current", "resource", "count", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfssync/semaphore.go#L34-L38
160,894
keybase/client
go/kbfs/kbfssync/semaphore.go
tryAcquire
func (s *Semaphore) tryAcquire(n int64) (<-chan struct{}, int64) { s.lock.Lock() defer s.lock.Unlock() if n <= s.count { s.count -= n return nil, s.count } return s.onRelease, s.count }
go
func (s *Semaphore) tryAcquire(n int64) (<-chan struct{}, int64) { s.lock.Lock() defer s.lock.Unlock() if n <= s.count { s.count -= n return nil, s.count } return s.onRelease, s.count }
[ "func", "(", "s", "*", "Semaphore", ")", "tryAcquire", "(", "n", "int64", ")", "(", "<-", "chan", "struct", "{", "}", ",", "int64", ")", "{", "s", ".", "lock", ".", "Lock", "(", ")", "\n", "defer", "s", ".", "lock", ".", "Unlock", "(", ")", "...
// tryAcquire tries to acquire n resources. If successful, nil is // returned. Otherwise, a channel which will be closed when new // resources are available is returned. In either case, the // possibly-updated resource count is returned.
[ "tryAcquire", "tries", "to", "acquire", "n", "resources", ".", "If", "successful", "nil", "is", "returned", ".", "Otherwise", "a", "channel", "which", "will", "be", "closed", "when", "new", "resources", "are", "available", "is", "returned", ".", "In", "eithe...
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/kbfssync/semaphore.go#L44-L53
160,895
keybase/client
go/install/install_nix.go
LsofMount
func LsofMount(mountDir string, log Log) ([]CommonLsofResult, error) { log.Debug("Mount dir to lsof: %s", mountDir) if mountDir == "" { return nil, nil } if _, serr := os.Stat(mountDir); os.IsNotExist(serr) { log.Debug("%s, mount dir lsof target, doesn't exist", mountDir) return nil, nil } log.Debug("Check...
go
func LsofMount(mountDir string, log Log) ([]CommonLsofResult, error) { log.Debug("Mount dir to lsof: %s", mountDir) if mountDir == "" { return nil, nil } if _, serr := os.Stat(mountDir); os.IsNotExist(serr) { log.Debug("%s, mount dir lsof target, doesn't exist", mountDir) return nil, nil } log.Debug("Check...
[ "func", "LsofMount", "(", "mountDir", "string", ",", "log", "Log", ")", "(", "[", "]", "CommonLsofResult", ",", "error", ")", "{", "log", ".", "Debug", "(", "\"", "\"", ",", "mountDir", ")", "\n", "if", "mountDir", "==", "\"", "\"", "{", "return", ...
// LsofMount does not return an error if it was unable to lsof // the mountpoint or the mountpoint does not exist.
[ "LsofMount", "does", "not", "return", "an", "error", "if", "it", "was", "unable", "to", "lsof", "the", "mountpoint", "or", "the", "mountpoint", "does", "not", "exist", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/install/install_nix.go#L24-L48
160,896
keybase/client
go/kbfs/libfs/root_fs.go
Open
func (rfs *RootFS) Open(filename string) (f billy.File, err error) { if !rootWrappedNodeNames[filename] { // In particular, this FS doesn't let you open the folderlist // directories or anything in them. return nil, os.ErrNotExist } switch filename { case StatusFileName: return &wrappedReadFile{ name: S...
go
func (rfs *RootFS) Open(filename string) (f billy.File, err error) { if !rootWrappedNodeNames[filename] { // In particular, this FS doesn't let you open the folderlist // directories or anything in them. return nil, os.ErrNotExist } switch filename { case StatusFileName: return &wrappedReadFile{ name: S...
[ "func", "(", "rfs", "*", "RootFS", ")", "Open", "(", "filename", "string", ")", "(", "f", "billy", ".", "File", ",", "err", "error", ")", "{", "if", "!", "rootWrappedNodeNames", "[", "filename", "]", "{", "// In particular, this FS doesn't let you open the fol...
// Open implements the billy.Filesystem interface for RootFS.
[ "Open", "implements", "the", "billy", ".", "Filesystem", "interface", "for", "RootFS", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libfs/root_fs.go#L41-L60
160,897
keybase/client
go/kbfs/libfs/root_fs.go
OpenFile
func (rfs *RootFS) OpenFile(filename string, flag int, _ os.FileMode) ( f billy.File, err error) { if flag&os.O_CREATE != 0 { return nil, errors.New("RootFS can't create files") } return rfs.Open(filename) }
go
func (rfs *RootFS) OpenFile(filename string, flag int, _ os.FileMode) ( f billy.File, err error) { if flag&os.O_CREATE != 0 { return nil, errors.New("RootFS can't create files") } return rfs.Open(filename) }
[ "func", "(", "rfs", "*", "RootFS", ")", "OpenFile", "(", "filename", "string", ",", "flag", "int", ",", "_", "os", ".", "FileMode", ")", "(", "f", "billy", ".", "File", ",", "err", "error", ")", "{", "if", "flag", "&", "os", ".", "O_CREATE", "!="...
// OpenFile implements the billy.Filesystem interface for RootFS.
[ "OpenFile", "implements", "the", "billy", ".", "Filesystem", "interface", "for", "RootFS", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libfs/root_fs.go#L63-L70
160,898
keybase/client
go/kbfs/libfs/root_fs.go
Lstat
func (rfs *RootFS) Lstat(filename string) (fi os.FileInfo, err error) { if filename == "" { filename = "." } if filename == "." { return &wrappedReadFileInfo{ "keybase", 0, rfs.config.Clock().Now(), true}, nil } if !rootWrappedNodeNames[filename] { return nil, os.ErrNotExist } switch filename { case S...
go
func (rfs *RootFS) Lstat(filename string) (fi os.FileInfo, err error) { if filename == "" { filename = "." } if filename == "." { return &wrappedReadFileInfo{ "keybase", 0, rfs.config.Clock().Now(), true}, nil } if !rootWrappedNodeNames[filename] { return nil, os.ErrNotExist } switch filename { case S...
[ "func", "(", "rfs", "*", "RootFS", ")", "Lstat", "(", "filename", "string", ")", "(", "fi", "os", ".", "FileInfo", ",", "err", "error", ")", "{", "if", "filename", "==", "\"", "\"", "{", "filename", "=", "\"", "\"", "\n", "}", "\n", "if", "filena...
// Lstat implements the billy.Filesystem interface for RootFS.
[ "Lstat", "implements", "the", "billy", ".", "Filesystem", "interface", "for", "RootFS", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libfs/root_fs.go#L73-L98
160,899
keybase/client
go/kbfs/libfs/root_fs.go
Stat
func (rfs *RootFS) Stat(filename string) (fi os.FileInfo, err error) { return rfs.Lstat(filename) }
go
func (rfs *RootFS) Stat(filename string) (fi os.FileInfo, err error) { return rfs.Lstat(filename) }
[ "func", "(", "rfs", "*", "RootFS", ")", "Stat", "(", "filename", "string", ")", "(", "fi", "os", ".", "FileInfo", ",", "err", "error", ")", "{", "return", "rfs", ".", "Lstat", "(", "filename", ")", "\n", "}" ]
// Stat implements the billy.Filesystem interface for RootFS.
[ "Stat", "implements", "the", "billy", ".", "Filesystem", "interface", "for", "RootFS", "." ]
b352622cd8cc94798cfacbcb56ada203c18e519e
https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libfs/root_fs.go#L101-L103