package
4.3.2+incompatible
Repository: https://github.com/qbit/client.git
Documentation: pkg.go.dev

# README

The core logic for KBFS. Presentation layers should using the interfaces in this library, particularly KBFSOps, to interact with KBFS.

(TODO: Fill in more details.)

# Functions

AddDeviceForLocalUserOrBust creates a new device for a user and returns the index for that device.
AddEmptyTeamsForTest creates teams for the given names with empty membership lists.
AddEmptyTeamsForTestOrBust is like AddEmptyTeamsForTest, but dies if there's an error.
AddFlags adds libkbfs flags to the given FlagSet.
AddFlagsWithDefaults adds libkbfs flags to the given FlagSet, given a set of default flags.
AddImplicitTeamForTest adds an implicit team with a TLF ID.
AddImplicitTeamForTestOrBust is like AddImplicitTeamForTest, but dies if there's an error.
AddNewAssertionForTest makes newAssertion, which should be a single assertion that doesn't already resolve to anything, resolve to the same UID as oldAssertion, which should be an arbitrary assertion that does already resolve to something.
AddNewAssertionForTestOrBust is like AddNewAssertionForTest, but dies if there's an error.
AddTeamKeyForTest adds a new key for the given team.
AddTeamKeyForTestOrBust is like AddTeamKeyForTest, but dies if there's an error.
AddTeamReaderForTest makes the given user a team reader.
AddTeamReaderForTestOrBust is like AddTeamWriterForTest, but dies if there's an error.
AddTeamWriterForTest makes the given user a team writer.
AddTeamWriterForTestOrBust is like AddTeamWriterForTest, but dies if there's an error.
BoolForString returns false if trimmed string is "" (empty), "0", "false", or "no".
ChangeTeamNameForTest renames a team.
ChangeTeamNameForTestOrBust is like ChangeTeamNameForTest, but dies if there's an error.
CheckConfigAndShutdown shuts down the given config, but fails the test if there's an error.
ConfigAsUser clones a test configuration in default init mode, setting another user as the logged in user.
ConfigAsUserWithMode clones a test configuration in the given mode, setting another user as the logged in user.
ConvertIdentifyError converts a errors during identify into KBFS errors.
CtxWithRandomIDReplayable returns a replayable context with a random id associated with the given log key.
DecodeRootMetadataSigned deserializes a metadata block into the specified versioned structure.
DefaultInitParams returns default init params.
DisableCRForTesting stops conflict resolution for the given folder.
DisableUpdatesForTesting stops the given folder from acting on new updates.
DumpPrivateMetadata returns a detailed dump of the given PrivateMetadata's contents.
EnableAdminFeature returns true if admin features should be enabled for the currently-logged-in user.
EnableImplicitTeamsForTest causes the mdserver to stop returning random TLF IDs for new TLFs.
FillInDiskSpaceStatus fills in the `OutOfSyncSpace`, prefetchStatus, and local disk space fields of the given status.
FillInJournalStatusUnflushedPaths adds the unflushed paths to the given journal status.
ForceQuotaReclamationForTesting kicks off quota reclamation under the given config, for the given folder-branch.
GetDefaultsUsageString returns a string describing the default values of flags based on the run mode.
GetHandleFromFolderNameAndType returns a TLFHandle given a folder name (e.g., "u1,u2#u3") and a TLF type.
GetJournalManager returns the JournalManager tied to a particular config.
GetLocalDiskStats returns the local disk stats, according to the disk block cache.
GetLocalUsageString returns a string describing the flags to use to run in a local testing environment.
GetMDRevisionByTime returns the revision number of the earliest merged MD of `handle` with a server timestamp greater or equal to `serverTime`.
GetRemoteUsageString returns a string describing the flags to use to run against remote KBFS servers.
GetRootNodeForTest gets the root node for the given TLF name, which must be canonical, creating it if necessary.
GetRootNodeOrBust gets the root node for the given TLF name, which must be canonical, creating it if necessary, and failing if there's an error.
Init initializes a config and returns it.
InitLog sets up logging switching to a log file if necessary.
InitLogWithPrefix sets up logging switching to a log file if necessary, given a prefix and a default log path.
InitWithLogPrefix initializes a config and returns it, given a prefix.
IsOnlyWriterInNonTeamTlf returns true if and only if the TLF described by h is a non-team TLF, and the currently logged-in user is the only writer for the TLF.
IsWriterFromHandle checks whether the given UID is a writer for the given handle.
MakeCopyWithDecryptedPrivateData makes a copy of the given IRMD, decrypting it with the given IRMD with keys.
MakeCryptoCommon returns a default CryptoCommon object.
MakeImmutableBareRootMetadata makes a new ImmutableBareRootMetadata from the given BareRootMetadata and its corresponding MdID.
MakeImmutableRootMetadata makes a new ImmutableRootMetadata from the given RMD and its corresponding MdID.
MakeRandomRequestID generates a random ID suitable for tagging a request in KBFS, and very likely to be universally unique.
MakeTestBlockServerOrBust makes a block server from the given arguments and environment variables.
MakeTestConfigOrBust creates and returns a config suitable for unit-testing with the given list of users.
MakeTestConfigOrBustLoggedIn creates and returns a config suitable for unit-testing with the given list of users.
MakeTestConfigOrBustLoggedInWithMode creates and returns a config suitable for unit-testing with the given mode and list of users.
NewBlockOpsStandard creates a new BlockOpsStandard.
NewBlockServerDir constructs a new BlockServerDisk that stores its data in the given directory.
NewBlockServerMeasured creates and returns a new BlockServerMeasured instance with the given delegate and registry.
NewBlockServerMemory constructs a new BlockServerMemory that stores its data in memory.
NewBlockServerRemote constructs a new BlockServerRemote for the given address.
NewBlockServerTempDir constructs a new BlockServerDisk that stores its data in a temp directory which is cleaned up on shutdown.
NewChatRPC constructs a new RPC based chat implementation.
NewCoalescingContext creates a new CoalescingContext.
NewConfigLocal constructs a new ConfigLocal with some default components that don't depend on a logger.
NewConflictResolver constructs a new ConflictResolver (and launches any necessary background goroutines).
NewCountMeter returns a new CountMeter.
NewCryptoClientRPC constructs a new RPC based Crypto implementation.
NewCryptoLocal constructs a new CryptoLocal instance with the given signing key.
NewDiskBlockCacheRemote creates a new remote disk cache client.
NewDiskBlockCacheService creates a new DiskBlockCacheService.
NewEmptyTLFReaderKeyBundle creates a new empty kbfsmd.TLFReaderKeyBundleV2.
NewEmptyTLFWriterKeyBundle creates a new empty kbfsmd.TLFWriterKeyBundleV2.
NewEventuallyConsistentMerkleRoot creates a new EventuallyConsistentMerkleRoot object.
NewEventuallyConsistentQuotaUsage creates a new EventuallyConsistentQuotaUsage object.
NewEventuallyConsistentTeamQuotaUsage creates a new EventuallyConsistentQuotaUsage object.
NewFavorites constructs a new Favorites instance.
NewImpatientDebugDumper creates a new *ImpatientDebugDumper, which logs with a logger made by config.MakeLogger("IGD"), and dumps goroutines if an operation takes longer than dumpIn.
NewImpatientDebugDumperForForcedDumps creates a new *ImpatientDebugDumper, just as above, though without launching any background goroutines or allowing the user to begin any time-tracked tasks.
NewInfiniteChannelWrapper returns a wrapper around a new infinite channel.
NewInitModeFromType returns an InitMode object corresponding to the given type.
NewKBFSOpsStandard constructs a new KBFSOpsStandard object.
NewKBFSService creates a new KBFSService.
NewKBPKIClient returns a new KBPKIClient with the given service.
NewKeybaseDaemonDisk constructs a KeybaseDaemonLocal object given a set of possible users, and one user that should be "logged in".
NewKeybaseDaemonMemory constructs a KeybaseDaemonLocal object given a set of possible users, and one user that should be "logged in".
NewKeybaseDaemonRPC makes a new KeybaseDaemonRPC that makes RPC calls using the socket of the given Keybase context.
NewKeybaseServiceBase makes a new KeybaseService.
NewKeybaseServiceMeasured creates and returns a new KeybaseServiceMeasured instance with the given delegate and registry.
NewKeyCacheMeasured creates and returns a new KeyCacheMeasured instance with the given delegate and registry.
NewKeyCacheStandard constructs a new KeyCacheStandard with the given cache capacity.
NewKeyManagerStandard returns a new KeyManagerStandard.
NewMDCacheStandard constructs a new MDCacheStandard using the given cache capacity.
NewMDOpsStandard returns a new MDOpsStandard.
NewMDServerDir constructs a new MDServerDisk that stores its data in the given directory.
NewMDServerMemory constructs a new MDServerMemory object that stores all data in-memory.
NewMDServerRemote returns a new instance of MDServerRemote.
NewMDServerTempDir constructs a new MDServerDisk that stores its data in a temp directory which is cleaned up on shutdown.
NewNaïveStaller returns a new NaïveStaller.
NewOngoingWorkLimiter creates a new *OngoingWorkLimiter with capacity of maxNumOngoingWorks.
NewRekeyFSM creates a new rekey FSM.
NewRekeyNotNeededEvent creates a rekeyNotNeededEvent typed event.
NewRekeyPermissionError constructs a RekeyPermissionError for the given directory and user.
NewRekeyQueueStandard creates a new rekey queue.
NewRekeyRequestEvent creates a non-delayed rekey request Event.
NewRekeyRequestWithPaperPromptEvent creates a non-delayed rekey request Event that causes a paper prompt.
NewReporterKBPKI creates a new ReporterKBPKI.
NewReporterSimple creates a new ReporterSimple.
NewSharedKeybaseConnection returns a connection that tries to connect to the local keybase daemon.
NewStateChecker returns a new StateChecker instance.
NewWriteUnsupportedError returns unsupported error trying to write a file.
NewXattrStoreFromBlockMetadataStore returns a XattrStore which is a wrapper around the passed in store.
PrefetchStatusFromProtocol transforms a kbgitkbfs.PrefetchStatus to a PrefetchStatus, while validating its value.
PutBlockCheckLimitErrs is a thin wrapper around putBlockToServer (which calls either bserver.Put or bserver.AddBlockReference) that reports quota and disk limit errors.
QuotaUsageLogModule makes a log module for a quota usage log.
RegisterOps registers all op types with the given codec.
RemoveTeamWriterForTest removes the given user from a team.
RemoveTeamWriterForTestOrBust is like RemoveTeamWriterForTest, but dies if there's an error.
RequestRekeyAndWaitForOneFinishEvent sends a rekey request to the FSM associated with tlfID, and wait for exact one rekeyFinished event.
ResetRootBlock creates a new empty dir block and sets the given metadata's root block to it.
RestartCRForTesting re-enables conflict resolution for the given folder.
RevokeDeviceForLocalUserOrBust revokes a device for a user in the given index.
SetCRFailureForTesting sets whether CR should always fail on the folder branch.
SetGlobalMerkleRootForTest sets the global Merkle root and time.
SetGlobalMerkleRootForTestOrBust is like SetGlobalMerkleRootForTest, but dies if there's an error.
SetKbfsMerkleRootForTest sets a Merkle root for the given KBFS tree ID.
SetKbfsMerkleRootForTestOrBust is like SetKbfsMerkleRootForTest, but dies if there's an error.
Shutdown does any necessary shutdown tasks for libkbfs.
SignBareRootMetadata signs the given BareRootMetadata and returns a *RootMetadataSigned object.
StallBlockOp sets a wrapped BlockOps in config so that the specified Op, stalledOp, is stalled.
StallMDOp sets a wrapped MDOps in config so that the specified Op, stalledOp, is stalled.
SwitchDeviceForLocalUserOrBust switches the current user's current device.
TLFJournalEnabled returns true if journaling is enabled for the given TLF.
VersionString returns semantic version string.
WaitForTLFJournal waits for the corresponding journal to flush, if one exists.

# Constants

BlockRequestPrefetchTail indicates that the block is being tracked in the prefetcher, but shouldn't kick off any more prefetches.
BlockRequestPrefetchTailWithSync indicates that the block is being tracked in the prefetcher and goes in the sync cache, but shouldn't kick off any more prefetches.
BlockRequestPrefetchUntilFull prefetches starting from the given block (but does not sync the blocks) until the working set cache is full, and then it stops prefetching.
BlockRequestSolo indicates that no action should take place after fetching the block.
BlockRequestSoloWithSync indicates the the requested block should be put in the sync cache, but no prefetching should be triggered.
BlockRequestWithDeepSync is the same as above, except both the prefetching and the sync flags propagate to the child, so the whole tree root at the block is prefetched and synced.
BlockRequestWithPrefetch indicates that a prefetch should be triggered after fetching the block.
BlockRequestWithSyncAndPrefetch indicates that the block should be stored in the sync cache after fetching it, as well as triggering a prefetch of one level of child blocks (and the syncing doesn't propagate to the child blocks).
BServerDefaultPingIntervalSeconds is the default interval on which the client should contact the block server.
BServerPingTimeout is how long to wait for a ping response before breaking the connection and trying to reconnect.
ConflictStorageRootPrefix is the prefix of the temp directory made for the conflict resolution disk cache.
CtxAllowNameKey can be used to set a value in a context, and that value will be treated as an allowable directory entry name, even if it also matches a disallowed prefix.
CtxBackgroundSyncKey is set in the context for any change notifications that are triggered from a background sync.
CtxCRIDKey is the type of the tag for unique operation IDs related to conflict resolution.
CtxCROpID is the display name for the unique operation conflict resolution ID tag.
CtxFBMIDKey is the type of the tag for unique operation IDs within folderBlockManager.
CtxFBMOpID is the display name for the unique operation folderBlockManager ID tag.
CtxFBOIDKey is the type of the tag for unique operation IDs within folderBranchOps.
CtxFBOOpID is the display name for the unique operation folderBranchOps ID tag.
CtxInitID is the display name for the unique operation init ID tag.
CtxInitKey is the type of the tag for unique operation IDs for KBFS init.
CtxJournalIDKey is the type of the tag for unique operation IDs within background journal work.
CtxJournalOpID is the display name for the unique operation enqueued journal ID tag.
CtxKeybaseServiceIDKey is the type of the tag for unique operation IDs used while servicing incoming keybase requests.
CtxKeybaseServiceOpID is the display name for the unique operation enqueued rekey ID tag.
CtxMDSRIDKey is the type of the tag for unique operation IDs within MDServerRemote.
CtxMDSROpID is the display name for the unique operation MDServerRemote ID tag.
CtxReadWriteKey is a context key to indicate that a read-only node should be treated as read-write.
CtxRekeyIDKey is the type of the tag for unique operation IDs within an enqueued Rekey.
CtxRekeyOpID is the display name for the unique operation enqueued rekey ID tag.
DefaultBlocksInMemCache is the number of blocks we should keep in the cache.
DiskBlockAnyCache indicates that any disk block cache is fine.
DiskBlockCacheStartStateFailed represents when the cache has failed to start.
DiskBlockCacheStartStateStarted represents when the cache has started.
DiskBlockCacheStartStateStarting represents when the cache is starting.
DiskBlockSyncCache indicates that the sync cache should be used.
DiskBlockWorkingSetCache indicates that the working set cache should be used.
DiskCacheModeLocal indicates to use a local disk cache.
DiskCacheModeOff indicates to leave off the disk cache.
DiskCacheModeRemote indicates to use a remote disk cache.
DiskMDCacheStartStateFailed represents when the cache has failed to start.
DiskMDCacheStartStateStarted represents when the cache has started.
DiskMDCacheStartStateStarting represents when the cache is starting.
DiskQuotaCacheStartStateFailed represents when the cache has failed to start.
DiskQuotaCacheStartStateStarted represents when the cache has started.
DiskQuotaCacheStartStateStarting represents when the cache is starting.
ECMRID is used in EventuallyConsistentMerkleRoot for only background RPCs.
ECQUID is used in EventuallyConsistentQuotaUsage for only background RPCs.
EnvTestBServerAddr is the environment variable name for a block server address.
EnvTestMDServerAddr is the environment variable name for an mdserver address.
FavoritesOpAdd means TLF should be added to favorites.
FavoritesOpAddNewlyCreated means TLF should be added to favorites, and it should be considered newly created.
FavoritesOpNoChange means no changes regarding to favorites should be made.
FavoritesOpRemove means TLF should be removed from favorites.
FavoritesRefreshModeBlocking means to refresh the favorites outside of the main loop.
FavoritesRefreshModeInMainFavoritesLoop means to refresh the favorites in the main loop, blocking any favorites requests after until the refresh is done.
FinishedPrefetch represents a block whose full subtree is synced.
25 MB.
ForcedBranchSquashRevThreshold is the minimum number of MD revisions in the journal that will trigger an automatic branch conversion (and subsequent resolution).
GitStorageRootPrefix is the prefix of the temp storage root directory made for single-op git operations.
Service names used in ConnectionStatus.
InitConstrained is a mode where KBFS reads and writes data, but constrains itself to using fewer resources (e.g.
InitConstrainedString is for when KBFS will use constrained resources.
InitDefault is the normal mode for when KBFS data will be read and written.
InitDefaultString is the normal mode for when KBFS data will be read and written.
InitMemoryLimited is a mode where KBFS reads and writes data, but constrains its memory use even further.
InitMemoryLimitedString is for when KBFS will use memory limited resources.
InitMinimal is for when KBFS will only be used as a MD lookup layer (e.g., for chat on mobile).
InitMinimalString is for when KBFS will only be used as a MD lookup layer (e.g., for chat on mobile).
InitSingleOp is a mode for when KBFS is only needed for a single logical operation; no rekeys or update subscriptions is needed, and some naming restrictions are lifted (e.g., `.kbfs_` filenames are allowed).
InitSingleOpString is for when KBFS will only be used for a single logical operation (e.g., as a git remote helper).
Service names used in ConnectionStatus.
Service names used in ConnectionStatus.
Service names used in ConnectionStatus.
MdServerBackgroundRekeyPeriod is how long the rekey checker waits between runs on average.
MdServerDefaultPingIntervalSeconds is the default interval on which the client should contact the MD Server.
MdServerPingTimeout is how long to wait for a ping response before breaking the connection and trying to reconnect.
Service names used in ConnectionStatus.
NoExcl indicates O_EXCL is not set.
NonexistentSignal is a signal that will never be used by the OS.
NoPrefetch represents an entry that hasn't been prefetched.
ReadMode indicates that an error happened while trying to read.
RPCReconnectInterval specifies the time between reconnect attempts for RPC Connections.
SIGPWR is the power failure signal on Linux.
stallable Block Ops and MD Ops.
stallable Block Ops and MD Ops.
stallable Block Ops and MD Ops.
stallable Block Ops and MD Ops.
stallable Block Ops and MD Ops.
stallable Block Ops and MD Ops.
stallable Block Ops and MD Ops.
stallable Block Ops and MD Ops.
stallable Block Ops and MD Ops.
stallable Block Ops and MD Ops.
stallable Block Ops and MD Ops.
stallable Block Ops and MD Ops.
stallable Block Ops and MD Ops.
stallable Block Ops and MD Ops.
stallable Block Ops and MD Ops.
stallable Block Ops and MD Ops.
StatusCodeDiskBlockCacheError is a generic disk cache error.
StatusCodeDiskMDCacheError is a generic disk cache error.
StatusCodeDiskQuotaCacheError is a generic disk cache error.
TempdirServerAddr is the special value of the EnvTest{B,MD}ServerAddr environment value to signify that an on-disk implementation of the {b,md}server should be used with a temporary directory.
TLFJournalBackgroundWorkEnabled indicates that the journal should be doing background work.
TLFJournalBackgroundWorkPaused indicates that the journal should not currently be doing background work.
TLFJournalSingleOpBackgroundWorkEnabled indicates that the journal should make all of its work visible to other readers as a single operation.
TriggeredPrefetch represents a block for which prefetching has been triggered, but the full tree has not been completed.
WithExcl indicates O_EXCL is set.
WriteMode indicates that an error happened while trying to write.
New types can only be added at end.

# Variables

ErrCRFailForTesting indicates that CR is disabled for a test.
ErrNoSettingsDB is returned when there is no settings DB potentially due to multiple concurrent KBFS instances.
ErrorFile is the name of the virtual file in KBFS that should contain the last reported error(s).
ErrTooManyCRAttempts is an error that indicates that CR has failed too many times, and it being stopped.
ErrUnrecognizedPrefetchStatus is returned when trying to unmarshal a prefetch status from JSON if the prefetch status is unrecognized.
NoCurrentSessionExpectedError is the error text that will get converted into a NoCurrentSessionError.
PrereleaseBuild is set at compile time for prerelease builds.

# Structs

BadCryptoError indicates that KBFS performed a bad crypto operation.
BadCryptoMDError indicates that KBFS performed a bad crypto operation, specifically on a MD object.
BadMDError indicates that the system is storing corrupt MD object for the given TLF ID.
BlockChanges tracks the set of blocks that changed in a commit, and the operations that made the changes.
BlockDecodeError indicates that a block couldn't be decoded as expected; probably it is the wrong type.
BlockMetadataValue represents the value stored in the block metadata store.
BlockOpsStandard implements the BlockOps interface by relaying requests to the block server.
BlockServerDisk implements the BlockServer interface by just storing blocks in a local disk store.
BlockServerMeasured delegates to another BlockServer instance but also keeps track of stats.
BlockServerMemory implements the BlockServer interface by just storing blocks in memory.
BlockServerRemote implements the BlockServer interface and represents a remote KBFS block server.
ChatRPC is an RPC based implementation for chat.
CoalescingContext allows many contexts to be treated as one.
ConfigLocal implements the Config interface using purely local server objects (no KBFS operations used RPCs).
ConflictJournalRecord contains info for TLF journals that are currently in conflict on the local device.
ConflictResolver is responsible for resolving conflicts in the background.
CountMeter counts ticks with a sliding window into the past.
CRWrapError wraps an error that happens during conflict resolution.
CryptoClient is a keybase1.CryptoInterface based implementation for Crypto.
CryptoClientRPC is an RPC based implementation for Crypto.
CryptoCommon contains many of the function implementations need for the Crypto interface, which can be reused by other implementations.
CryptoLocal implements the Crypto interface by using a local signing key and a local crypt private key.
DirNotEmptyError indicates that the user tried to unlink a subdirectory that was not empty.
DirtyBlockCacheDisk stores dirty blocks in a local disk block cache, rather than keeping them in memory.
DisallowedPrefixError indicates that the user attempted to create an entry using a name with a disallowed prefix.
DiskBlockCacheError is a generic disk cache error.
DiskBlockCacheLocal is the standard implementation for DiskBlockCache.
DiskBlockCacheMetadata packages the metadata needed to make decisions on cache eviction.
DiskBlockCacheRemote implements a client to access a remote DiskBlockCacheService.
DiskBlockCacheService delegates requests for blocks to this KBFS instance's disk cache.
DiskBlockCacheStatus represents the status of the disk cache.
DiskCacheClosedError indicates that the disk cache has been closed, and thus isn't accepting any more operations.
DiskCacheStartingError indicates that the disk cache has not yet started, so it isn't yet accepting operations.
DiskCacheTooFullForBlockError indicates that the disk cache is too full to fetch a block requested with the `StopIfFull` action type.
DiskMDCacheError is a generic disk cache error.
DiskMDCacheLocal is the standard implementation for DiskMDCache.
DiskMDCacheStatus represents the status of the MD cache.
DiskQuotaCacheError is a generic disk cache error.
DiskQuotaCacheLocal is the standard implementation for DiskQuotaCache.
DiskQuotaCacheStatus represents the status of the Quota cache.
ECMRCtxTagKey is the type for unique ECMR background operation IDs.
ECQUCtxTagKey is the type for unique ECQU background operation IDs.
EmptyNameError indicates that the user tried to use an empty name for the given BlockRef.
EncryptedTLFCryptKeyClientAndEphemeral has what's needed to request a client half decryption.
ErrBlockMetadataStoreShutdown is returned when methods are called on diskBlockMetadataStore when it's already shutdown.
ErrDiskLimitTimeout is returned when putBlockData exceeds diskLimitTimeout when trying to acquire bytes to put.
ErrorFileAccessError indicates that the user tried to perform an operation on the ErrorFile that is not allowed.
ErrStillStagedAfterCR indicates that conflict resolution failed to take the FBO out of staging.
EventuallyConsistentMerkleRoot keeps tracks of the current global Merkle root, in a way user of which can choose to accept stale data to reduce calls to the API server.
EventuallyConsistentQuotaUsage keeps tracks of quota usage, in a way user of which can choose to accept stale data to reduce calls into block servers.
ExclOnUnmergedError happens when an operation with O_EXCL set when fbo is on an unmerged local revision.
Favorites manages a user's favorite list.
FolderBranchStatus is a simple data structure describing the current status of a particular folder-branch.
FolderNotResetOnServer indicates that a folder can't be reset by the user, because it hasn't yet been reset on the mdserver.
FolderSyncConfig is the on-disk representation for a TLF sync config.
FolderSyncEncryptedPartialPaths describes an encrypted block containing the paths of a partial sync config.
GCOp is an op that represents garbage-collecting the history of a folder (which may involve unreferencing blocks that previously held operation lists.
ImmutableBareRootMetadata is a thin wrapper around a BareRootMetadata and a kbfsmd.ExtraMetadata that takes ownership of it and does not ever modify it again.
ImmutableRootMetadata is a thin wrapper around a ReadOnlyRootMetadata that takes ownership of it and does not ever modify it again.
ImpatientDebugDumper dumps all running goroutines if an operation takes longer than a preset value.
IncompatibleHandleError indicates that somethine tried to update the head of a TLF with a RootMetadata with an incompatible handle.
InconsistentEncodedSizeError is raised when a dirty block has a non-zero encoded size.
InfiniteChannelWrapper is a wrapper to allow us to select on sending to an infinite channel without fearing a panic when we Close() it.
InitParams contains the initialization parameters for Init().
InvalidBlockRefError indicates an invalid block reference was encountered.
InvalidDataVersionError indicates that an invalid data version was used.
InvalidFavoritesOpError indicates an unknown FavoritesOp has been provided.
InvalidOpError is returned when an operation is called that isn't supported by the current implementation.
InvalidParentPathError indicates a path without a valid parent was encountered.
InvalidPathError indicates an invalid path was encountered.
InvalidVersionError indicates that we have encountered some new data version we don't understand, and we don't know how to handle it.
JournalManager is the server that handles write journals.
JournalManagerStatus represents the overall status of the JournalManager for display in diagnostics.
KBFSErrorUnwrapper unwraps errors from the KBFS service.
KBFSOpsStandard implements the KBFSOps interface, and is go-routine safe by forwarding requests to individual per-folder-branch handlers that are go-routine-safe.
KBFSService represents a running KBFS service.
KBFSStatus represents the content of the top-level status file.
KBPKIClient uses a KeybaseService.
KeybaseDaemonLocal implements KeybaseDaemon using an in-memory user and session store, and a given favorite store.
KeybaseDaemonRPC implements the KeybaseService interface using RPC calls.
KeybaseServiceBase implements most of KeybaseService from protocol defined clients.
KeybaseServiceMeasured delegates to another KeybaseService instance but also keeps track of stats.
KeyCacheHitError indicates that a key matching the given TLF ID and key generation was found in cache but the object type was unknown.
KeyCacheMeasured delegates to another KeyCache instance but also keeps track of stats.
KeyCacheMissError indicates that a key matching the given TLF ID and key generation wasn't found in cache.
KeyCacheStandard is an LRU-based implementation of the KeyCache interface.
KeyHalfMismatchError is returned when the key server doesn't return the expected key half.
KeyManagerStandard implements the KeyManager interface by fetching keys from KeyOps and KBPKI, and computing the complete keys necessary to run KBFS.
LevelDb is a libkbfs wrapper for leveldb.DB.
MDCacheStandard implements a simple LRU cache for per-folder metadata objects.
MDJournalConflictError is an error that is returned when a put detects a rewritten journal.
MDMismatchError indicates an inconsistent or unverifiable MD object for the given top-level folder.
MDOpsStandard provides plaintext RootMetadata objects to upper layers, and processes RootMetadataSigned objects (encrypted and signed) suitable for passing to/from the MDServer backend.
MDServerDisconnected indicates the MDServer has been disconnected for clients waiting on an update channel.
MDServerDisk stores all info on disk, either in levelDBs, or disk journals and flat files for the actual MDs.
MDServerMemory just stores metadata objects in memory.
MDServerRemote is an implementation of the MDServer interface.
MDUpdateInvertError indicates that we tried to apply a revision that was not the next in line.
MDWriteNeededInRequest indicates that the system needs MD write permissions to successfully complete an operation, so it should retry in mdWrite mode.
MDWrittenAfterRevokeError indicates that we failed to verify an MD revision because it was written after the last valid revision that the corresponding device could have written.
MeterSnapshot is a read-only copy of another Meter.
MeterStatus represents the status of a rate meter.
NaïveStaller is used to stall certain ops in BlockServer or MDOps.
NameTooLongError indicates that the user tried to write a directory entry name that would be bigger than KBFS's supported size.
NeedOtherRekeyError indicates that the folder in question needs to be rekeyed for the local device, and can only done so by one of the other users.
NeedSelfRekeyError indicates that the folder in question needs to be rekeyed for the local device, and can be done so by one of the other user's devices.
NewDataVersionError indicates that the data at the given path has been written using a new data version that our client doesn't understand.
NextMDNotCachedError indicates we haven't cached the next MD after the given Merkle seqno.
NoChainFoundError indicates that a conflict resolution chain corresponding to the given pointer could not be found.
NodeChange represents a change made to a node as part of an atomic file system operation.
NodeMetadata has metadata about a node needed for higher level operations.
NodeNotFoundError indicates that we tried to find a node for the given BlockPointer and failed.
NoKeysError indicates that no keys were provided for a decryption allowing multiple device keys.
NoMergedMDError indicates that no MDs for this folder have been created yet.
NonExistentTeamForHandleError indicates that we're trying to create a TLF for a handle that has no corresponding implicit team yet.
NoopBlockMetadataStore satisfies the BlockMetadataStore interface but does nothing.
NoSuchFolderListError indicates that the user tried to access a subdirectory of /keybase that doesn't exist.
NoSuchMDError indicates that there is no MD object for the given folder, revision, and merged status.
NoSuchTlfHandleError indicates we were unable to resolve a folder ID to a folder handle.
NoSuchTlfIDError indicates we were unable to resolve a folder handle to a folder ID.
NotDirBlockError indicates that a file block was expected but a block of a different type was found.
NotDirError indicates that the user tried to perform a dir-specific operation on something that isn't a directory.
NotFileBlockError indicates that a file block was expected but a block of a different type was found.
NotFileError indicates that the user tried to perform a file-specific operation on something that isn't a file.
NotPermittedWhileDirtyError indicates that some operation failed because of outstanding dirty files, and may be retried later.
NoUpdatesWhileDirtyError indicates that updates aren't being accepted while a TLF is locally dirty.
OfflineArchivedError indicates trying to access archived data while offline.
OfflineUnsyncedError indicates trying to access unsynced data while offline.
OngoingWorkLimiter limits maximum number of routines that can work on a same type of thing at the same time.
OpCommon are data structures needed by all ops.
OpsCantHandleFavorite means that folderBranchOps wasn't able to deal with a favorites request.
OpSummary describes the changes performed by a single op, and is suitable for encoding directly as JSON.
OutdatedVersionError indicates that we have encountered some new data version we don't understand, and the user should be prompted to upgrade.
OverQuotaWarning indicates that the user is over their quota, and is being slowed down by the server.
ParentNodeNotFoundError indicates that we tried to update a Node's parent with a BlockPointer that we don't yet know about.
PrefetchProgress tracks the number of bytes fetched for the block tree rooted at a given block, along with the known total number of bytes in that tree, and the start time of the prefetch.
PrivateMetadata contains the portion of metadata that's secret for private directories.
ReadonlyNode is a read-only node by default, unless `CtxReadWriteKey` has a value set in the context.
A ReadOnlyRootMetadata is a thin wrapper around a *RootMetadata.
RekeyConflictError indicates a conflict happened while trying to rekey.
RekeyEvent describes an event to send into the RekeyFSM.
RekeyIncompleteError is returned when a rekey is partially done but needs a writer to finish it.
RekeyPermissionError indicates that the user tried to rekey a top-level folder in a manner inconsistent with their permissions.
RekeyQueueStandard implements the RekeyQueue interface.
RekeyResult represents the result of an rekey operation.
RenameAcrossDirsError indicates that the user tried to do an atomic rename across directories.
ReportedError represents an error reported by KBFS.
ReporterKBPKI implements the Notify function of the Reporter interface in addition to embedding ReporterSimple for error tracking.
ReporterSimple remembers the last maxErrors errors, or all errors if maxErrors < 1.
RevGarbageCollectedError indicates that the user is trying to access a revision that's already been garbage-collected.
RevokedDeviceVerificationError indicates that the user is trying to verify a key that has been revoked.
A RootMetadata is a BareRootMetadata but with a deserialized PrivateMetadata.
RootMetadataSigned is a wrapper around kbfsmd.RootMetadataSigned that adds an untrusted server timestamp.
SettingsDB stores KBFS user settings for a given device.
SharedKeybaseTransport is a ConnectionTransport implementation that uses a shared local socket to a keybase daemon.
SizeFlag is for specifying sizes with the flag package.
StateChecker verifies that the server-side state for KBFS is consistent.
StatusUpdate is a dummy type used to indicate status has been updated.
TimeoutError is just a replacement for context.DeadlineExceeded with a more friendly error string.
TlfAccessError that the user tried to perform an unpermitted operation on a top-level folder.
TLFJournalStatus represents the status of a TLF's journal for display in diagnostics.
TLFUpdateHistory gives all the summaries of all updates in a TLF's history.
TooLowByteCountError indicates that size of a block is smaller than the expected size.
UnexpectedUnmergedPutError indicates that we tried to do an unmerged put when that was disallowed.
UnmergedError indicates that fbo is on an unmerged local revision.
UnmergedSelfConflictError indicates that we hit a conflict on the unmerged branch, so a previous MD PutUnmerged we thought had failed, had actually succeeded.
UnsupportedOpInUnlinkedDirError indicates an error when trying to create a file.
UnverifiableTlfUpdateError indicates that a MD update could not be verified.
UpdateSummary describes the operations done by a single MD revision.
VerifyingKeyNotFoundError indicates that a verifying key matching the given one couldn't be found.
WrapError simply wraps an error in a fmt.Stringer interface, so that it can be reported.
WriteRange represents a file modification.
WriterDeviceDateConflictRenamer renames a file using a username, device name, and date.
WriteToReadonlyNodeError indicates an error when trying to write a node that's marked as read-only.
WriteUnsupportedError indicates an error when trying to write a file.
WrongOpsError indicates that an unexpected path got passed into a FolderBranchOps instance.

# Interfaces

BlockMetadataStore defines a type that stores block metadata locally on device.
BlockOps gets and puts data blocks to a BlockServer.
BlockRetriever specifies how to retrieve blocks.
BlockServer gets and puts opaque data blocks.
Chat specifies a minimal interface for Keybase chatting.
Clock is an interface for getting the current time.
Config collects all the singleton instance instantiations needed to run KBFS in one place.
ConflictRenamer deals with names for conflicting directory entries.
Crypto signs, verifies, encrypts, and decrypts stuff.
DiskBlockCache caches blocks to the disk.
DiskLimiter is an interface for limiting disk usage.
DiskMDCache caches encrypted MD objects to the disk.
DiskQuotaCache caches encrypts per-ID quotas to the disk.
InitMode encapsulates mode differences.
KBFSOps handles all file system operations.
KBPKI interacts with the Keybase daemon to fetch user info.
KeybaseService is an interface for communicating with the keybase service.
KeybaseServiceCn defines methods needed to construct KeybaseService and Crypto implementations.
KeyCache handles caching for both TLFCryptKeys and BlockCryptKeys.
KeyManager fetches and constructs the keys needed for KBFS file operations.
KeyMetadataWithRootDirEntry is like KeyMetadata, but can also return the root dir entry for the associated MD update.
MDCache gets and puts plaintext top-level metadata into the cache.
MDOps gets and puts root metadata to an MDServer.
MDServer gets and puts metadata for each top-level directory.
Node represents a direct pointer to a file or directory in KBFS.
NodeCache holds Nodes, and allows libkbfs to update them when things change about the underlying KBFS blocks.
NodeID is a unique but transient ID for a Node.
Notifier notifies registrants of directory changes.
Observer can be notified that there is an available update for a given directory.
Prefetcher is an interface to a block prefetcher.
RekeyFSM is a Finite State Machine (FSM) for housekeeping rekey states for a FolderBranch.
RekeyQueue is a managed queue of folders needing some rekey action taken upon them by the current client.
Reporter exports events (asynchronously) to any number of sinks.
Subscriber defines a type that can be used to subscribe to different topic.
SubscriptionManager manages subscriptions.
SubscriptionManagerPublisher associates with one SubscriptionManager, and is used to publish changes to subscribers mangaged by it.
SubscriptionNotifier defines a group of methods for notifying about changes on subscribed topics.
Tracer maybe adds traces to contexts.
Warninger is an interface that only waprs the Warning method.
XattrStore defines a type that handles locally stored xattr values by interacting with a BlockMetadataStore.

# Type aliases

AdditionalProtocolCreator creates an additional protocol.
BlockMetadataUpdater defines a function to update a BlockMetadataValue.
BlockRequestAction indicates what kind of action should be taken after successfully fetching a block.
ChatChannelNewMessageCB is a callback function that can be called when there's a new message on a given conversation.
Context defines the environment for this package.
CtxAllowNameKeyType is the type for a context allowable name override key.
CtxBackgroundSyncKeyType is the type for a context background sync key.
CtxCRTagKey is the type used for unique context tags related to conflict resolution.
CtxFBMTagKey is the type used for unique context tags within folderBlockManager.
CtxFBOTagKey is the type used for unique context tags within folderBranchOps.
CtxInitTagKey is the type used for unique context tags for KBFS init.
CtxJournalTagKey is the type used for unique context tags within background journal work.
CtxKeybaseServiceTagKey is the type used for unique context tags used while servicing incoming keybase requests.
CtxMDSRTagKey is the type used for unique context tags within MDServerRemote.
CtxReadWriteKeyType is the type of the key for overriding read-only nodes.
CtxRekeyTagKey is the type used for unique context tags within an enqueued Rekey.
DiskBlockCacheStartState represents whether this disk block cache has started or failed.
DiskBlockCacheType specifies a type of an on-disk block cache.
DiskCacheMode represents the mode of initialization for the disk cache.
DiskMDCacheStartState represents whether this disk MD cache has started or failed.
DiskQuotaCacheStartState represents whether this disk Quota cache has started or failed.
ErrorModeType indicates what type of operation was being attempted when an error was reported.
Excl indicates whether O_EXCL is set on a fuse call.
FavoritesOp defines an operation related to favorites.
FavoritesRefreshMode controls how a favorites refresh happens.
InitModeType indicates how KBFS should configure itself at runtime.
PrefetchStatus denotes the prefetch status of a block.
StallableBlockOp defines an Op that is stallable using StallBlockOp.
StallableMDOp defines an Op that is stallable using StallMDOp.
SubscriptionID identifies a subscription.
TLFJournalBackgroundWorkStatus indicates whether a journal should be doing background work or not.
XattrType represents the xattr type.