_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c159700
train
// pollOnce polls the API server once for which users have changed.
{ "resource": "" }
c159701
train
// makeUser either pulls a user from the in-memory table, or constructs a new // one. In either case, it updates the CA's `atime` bit for now for this user // record.
{ "resource": "" }
c159702
train
// repopulate is intended to repopulate our representation of the user with the // server's up-to-date notion of what the user looks like. If our version is recent // enough, this is a no-op. If not, we'll go to the server and send the main loop // a "Cleanup" event to eventually clean us out.
{ "resource": "" }
c159703
train
// isPopulated returned true if this user is populated and current enough to // trust.
{ "resource": "" }
c159704
train
// check that a user matches the given username and has the given key as one of // its valid keys. This is where the actually work of this whole library happens.
{ "resource": "" }
c159705
train
// checkUsername checks that a username is a match for this user.
{ "resource": "" }
c159706
train
// compareSibkeys returns true if the passed set of sibkeys is equal.
{ "resource": "" }
c159707
train
// compareSubkeys returns true if the passed set of subkeys is equal.
{ "resource": "" }
c159708
train
// Helper method for the two above.
{ "resource": "" }
c159709
train
// checkKey checks that the given key is still valid for this user.
{ "resource": "" }
c159710
train
// CheckUserKey is the main point of entry to this library. It takes as input a UID, a // username and a kid that should refer to a current valid triple, perhaps // extracted from a signed authentication statement. It returns an error if the // check fails, and nil otherwise. If username or kid are nil they aren't chec...
{ "resource": "" }
c159711
train
// CheckUsers is used to validate all provided UIDs are known.
{ "resource": "" }
c159712
train
// CompareUserKeys compares the passed sets to the sets known by the API server. // It returns true if the sets are equal.
{ "resource": "" }
c159713
train
// Excludes `Params` from being logged.
{ "resource": "" }
c159714
train
// For bigger groups, everything is slower, like the time to digest all required messages. So we're // going to inflate our timeouts.
{ "resource": "" }
c159715
train
// NewEventuallyConsistentQuotaUsage creates a new // EventuallyConsistentQuotaUsage object.
{ "resource": "" }
c159716
train
// NewEventuallyConsistentTeamQuotaUsage creates a new // EventuallyConsistentQuotaUsage object.
{ "resource": "" }
c159717
train
// Get returns KBFS bytes used and limit for user, for the current // default block type. To help avoid having too frequent calls into // bserver, caller can provide a positive tolerance, to accept stale // LimitBytes and UsageBytes data. If tolerance is 0 or negative, this // always makes a blocking RPC to bserver and...
{ "resource": "" }
c159718
train
// GetAllTypes is the same as Get, except it returns usage and limits // for all block types.
{ "resource": "" }
c159719
train
// NewKex2Provisionee creates a Kex2Provisionee engine.
{ "resource": "" }
c159720
train
// GetLogFactory implements GetLogFactory in kex2.Provisionee.
{ "resource": "" }
c159721
train
// HandleHello implements HandleHello in kex2.Provisionee.
{ "resource": "" }
c159722
train
// HandleHello2 implements HandleHello2 in kex2.Provisionee.
{ "resource": "" }
c159723
train
// HandleDidCounterSign implements HandleDidCounterSign in // kex2.Provisionee interface.
{ "resource": "" }
c159724
train
// updateTemporarySession commits the session token and csrf token to our temporary session, // stored in our provisional login context. We'll need that to post successfully.
{ "resource": "" }
c159725
train
// postSigs takes the HTTP args for the signing key and encrypt // key and posts them to the api server.
{ "resource": "" }
c159726
train
// saveKeys writes the device keys to LKSec.
{ "resource": "" }
c159727
train
// cacheKeys caches the device keys in the Account object.
{ "resource": "" }
c159728
train
// Buffer adds data to the internal paragraph buffer.
{ "resource": "" }
c159729
train
// makePad makes a whitespace pad that is l bytes long.
{ "resource": "" }
c159730
train
// specify replaces arbitrary strings of whitespace with // a single ' ' character. Also strips off leading and trailing // whitespace.
{ "resource": "" }
c159731
train
// Output a paragraph to the io.Writer, applying the proper // formatting.
{ "resource": "" }
c159732
train
// NewTlfEditHistoryFile returns a special read file that contains a text // representation of the file edit history for that TLF.
{ "resource": "" }
c159733
train
// The purpose of this function is to provide more // information in resolvingRequest, with the ability // to use the socket, since this is not available // at parse time.
{ "resource": "" }
c159734
train
// Show a non-team conv policy
{ "resource": "" }
c159735
train
// Show the team policy
{ "resource": "" }
c159736
train
// Show the channel's policy
{ "resource": "" }
c159737
train
// GetWithLifetime implements the BlockCache interface for BlockCacheStandard.
{ "resource": "" }
c159738
train
// Get implements the BlockCache interface for BlockCacheStandard.
{ "resource": "" }
c159739
train
// CheckForKnownPtr implements the BlockCache interface for BlockCacheStandard.
{ "resource": "" }
c159740
train
// SetCleanBytesCapacity implements the BlockCache interface for // BlockCacheStandard.
{ "resource": "" }
c159741
train
// Put implements the BlockCache interface for BlockCacheStandard. // This method is idempotent for a given ptr, but that invariant is // not currently goroutine-safe, and it does not hold if a block size // changes between Puts. That is, we assume that a cached block // associated with a given pointer will never chang...
{ "resource": "" }
c159742
train
// DeletePermanent implements the BlockCache interface for // BlockCacheStandard.
{ "resource": "" }
c159743
train
// DeleteTransient implements the BlockCache interface for BlockCacheStandard.
{ "resource": "" }
c159744
train
// DeleteKnownPtr implements the BlockCache interface for BlockCacheStandard.
{ "resource": "" }
c159745
train
// copied from loginProvision
{ "resource": "" }
c159746
train
// copied from loginProvision // makeDeviceKeysWithSigner creates device keys given a signing // key.
{ "resource": "" }
c159747
train
// copied from loginProvision // makeDeviceWrapArgs creates a base set of args for DeviceWrap. // It ensures that LKSec is created. It also gets a new device // name for this device.
{ "resource": "" }
c159748
train
// Copied from loginProvision. makeDeviceKeys uses DeviceWrap to // generate device keys and sets active device.
{ "resource": "" }
c159749
train
// Start starts the kbfsgit logic, and begins listening for git // commands from `input` and responding to them via `output`.
{ "resource": "" }
c159750
train
// Error implements the error interface for TlfNameNotCanonical.
{ "resource": "" }
c159751
train
// SafeWriteToFile to safely write to a file. Use mode=0 for default permissions.
{ "resource": "" }
c159752
train
// Contains returns true if string is contained in string slice
{ "resource": "" }
c159753
train
// IsIn checks for needle in haystack, ci means case-insensitive.
{ "resource": "" }
c159754
train
// IsPossiblePhoneNumber checks if s is string of digits in phone number format
{ "resource": "" }
c159755
train
// MakeURI makes a URI string out of the given protocol and // host strings, adding necessary punctuation in between.
{ "resource": "" }
c159756
train
// RemoveNilErrors returns error slice with ni errors removed.
{ "resource": "" }
c159757
train
// CombineErrors returns a single error for multiple errors, or nil if none.
{ "resource": "" }
c159758
train
// SplitByRunes splits string by runes
{ "resource": "" }
c159759
train
// DigestForFileAtPath returns a SHA256 digest for file at specified path
{ "resource": "" }
c159760
train
// Digest returns a SHA256 digest
{ "resource": "" }
c159761
train
// JoinPredicate joins strings with predicate
{ "resource": "" }
c159762
train
// LogTagsFromContext is a wrapper around logger.LogTagsFromContext // that simply casts the result to the type expected by // rpc.Connection.
{ "resource": "" }
c159763
train
// MobilePermissionDeniedCheck panics if err is a permission denied error // and if app is a mobile app. This has caused issues opening config.json // and secretkeys files, where it seems to be stuck in a permission // denied state and force-killing the app is the only option.
{ "resource": "" }
c159764
train
// IsNoSpaceOnDeviceError will return true if err is an `os` error // for "no space left on device".
{ "resource": "" }
c159765
train
// AcquireWithTimeout attempts to acquire a lock with a timeout. // Convenience wrapper around AcquireWithContext. // Returns nil if the lock was acquired. // Returns context.DeadlineExceeded if it was not.
{ "resource": "" }
c159766
train
// DirSize walks the file tree the size of the given directory
{ "resource": "" }
c159767
train
// NewProofInfo creates a new ProofInfo
{ "resource": "" }
c159768
train
// CheckProof verifies one proof by running the pvl on the provided proof information.
{ "resource": "" }
c159769
train
// Get the list of scripts for a given service.
{ "resource": "" }
c159770
train
// Check that a chunk of PVL is valid code. // Will always accept valid code, but may not always notice invalidities.
{ "resource": "" }
c159771
train
// Run each script on each TXT record of each domain. // Succeed if any succeed.
{ "resource": "" }
c159772
train
// Run each script on each TXT record of the domain.
{ "resource": "" }
c159773
train
// stepInstruction decides which instruction to run.
{ "resource": "" }
c159774
train
// Take a regex descriptor, do variable substitution, and build a regex.
{ "resource": "" }
c159775
train
// Use a custom error spec to derive an error. // spec can be none // Copies over the error code if none is specified.
{ "resource": "" }
c159776
train
// Write implements the fs.HandleWriter interface for // ReclaimQuotaFile. Note a write triggers quota reclamation, but // does not wait for it to finish. If you want to wait, write to // SyncFromServerFileName.
{ "resource": "" }
c159777
train
// NewListTrackers creates a TrackerList engine for uid.
{ "resource": "" }
c159778
train
// List returns the array of trackers for this user.
{ "resource": "" }
c159779
train
// NewDeviceAdd creates a DeviceAdd engine.
{ "resource": "" }
c159780
train
// EnableAdminFeature returns true if admin features should be enabled // for the currently-logged-in user.
{ "resource": "" }
c159781
train
// setHomeTlfIdsForDbcAndFavorites sets the user's home TLFs on the disk // block cache and the favorites cache.
{ "resource": "" }
c159782
train
// serviceLoggedIn should be called when a new user logs in. It // shouldn't be called again until after serviceLoggedOut is called.
{ "resource": "" }
c159783
train
// serviceLoggedOut should be called when the current user logs out.
{ "resource": "" }
c159784
train
// NewKeyServerMeasured creates and returns a new KeyServerMeasured // instance with the given delegate and registry.
{ "resource": "" }
c159785
train
// GetTLFCryptKeyServerHalf implements the KeyServer interface for // KeyServerMeasured.
{ "resource": "" }
c159786
train
// PutTLFCryptKeyServerHalves implements the KeyServer interface for // KeyServerMeasured.
{ "resource": "" }
c159787
train
// DeleteTLFCryptKeyServerHalf implements the KeyServer interface for // KeyServerMeasured.
{ "resource": "" }
c159788
train
// Eq returns true if the two device IDs are equal
{ "resource": "" }
c159789
train
// Eq returns true if the two session IDs are equal
{ "resource": "" }
c159790
train
// NewConn establishes a Kex session based on the given secret. Will work for // both ends of the connection, regardless of which order the two started // their connection. Will communicate with the other end via the given message router. // You can specify an optional timeout to cancel any reads longer than that timeo...
{ "resource": "" }
c159791
train
// Read data from the connection, returning plaintext data if all // cryptographic checks passed. Obeys the `net.Conn` interface. // Returns the number of bytes read into the output buffer.
{ "resource": "" }
c159792
train
// Write data to the connection, encrypting and MAC'ing along the way. // Obeys the `net.Conn` interface
{ "resource": "" }
c159793
train
// Close the connection to the server, sending an empty buffer via POST // through the `MessageRouter`. Fulfills the `net.Conn` interface
{ "resource": "" }
c159794
train
// SetReadDeadline sets the deadline for future Read calls. // A zero value for t means Read will not time out.
{ "resource": "" }
c159795
train
// NewHasServerKeys creates a HasServerKeys engine.
{ "resource": "" }
c159796
train
// NewSessionHandler creates a SessionHandler for the xp transport.
{ "resource": "" }
c159797
train
// CurrentSession uses the global session to find the session. If // the user isn't logged in, it returns libkb.NoSessionError. // // This function was modified to use cached information instead // of loading the full self user. // // This does do a full call to sesscheck and ensures that the // session token is valid...
{ "resource": "" }
c159798
train
// NewClaimSeqnoProvider creates a ClaimSeqnoProvider for use in relay claims.
{ "resource": "" }
c159799
train
// Load a Team from the TeamLoader. // Can be called from inside the teams package.
{ "resource": "" }