package
5.5.2+incompatible
Repository: https://github.com/keycase/client-fork.git
Documentation: pkg.go.dev
# README
tlf
Top-level folder (TLF)-related types and functions for KBFS.
Errors returned by ID from this package are wrapped with pkg/errors, and so need errors.Cause() to unwrap them.
TODO: Do the other types in this package.
# Functions
CanonicalToPreferredName returns the preferred TLF name, given a canonical name and a username.
ContainsLocalConflictExtensionPrefix returns true if the string contains the local conflict string.
FakeID creates a fake public or private TLF ID from the given byte.
FakeIDByte returns the byte used to create a fake TLF ID with FakeID.
MakeCanonicalName makes a CanonicalName from components.
MakeCanonicalNameForTeam makes a CanonicalName from components for a team.
MakeHandle creates a Handle from the given list of readers and writers.
MakeIDFromTeam makes a deterministic TLF ID from a team ID and an epoch representing how many times a new TLF has been needed for this team.
MakeRandomID makes a random ID using a cryptographically secure RNG.
NewHandleExtension returns a new HandleExtension struct populated with the date from the given time and conflict number.
NewTestHandleExtensionStaticTime returns a new HandleExtension struct populated with a static date for testing.
NormalizeAssertionOrName normalizes the given assertion or name `s`.
NormalizeNamesInTLF takes a split TLF name and, without doing any resolutions or identify calls, normalizes all elements of the name.
ParseHandleExtensionSuffix parses a TLF handle extension suffix string.
ParseID parses a hex encoded ID.
ParseTlfTypeFromPath parses str into a Type.
SplitAndNormalizeTLFName returns separate lists of normalized writer and reader names, as well as the extension suffix, of the given `name`.
SplitExtension separates any extension suffix from the assertions.
SplitName splits a TLF name into components.
TypeFromFolderType returns the Type corresponding to the given keybase1.FolderType.
UserIsOnlyWriter returns true if and only if username is the only writer in a TLF represented by canon.
# Constants
HandleExtensionConflict means the handle conflicted as a result of a social assertion resolution.
HandleExtensionFinalized means the folder ended up with no more valid writers as a result of an account reset.
HandleExtensionLocalConflict means the handle conflicted as a result of a local conflict branch.
HandleExtensionSep is the string that separates the folder participants from an extension suffix in the TLF name.
HandleExtensionStaticTestDate is a static date used for tests (2016-03-14).
HandleExtensionUnknown means the type is unknown.
Private represents a private TLF between one or more individual users.
PrivateKeying specifies the TLF keying mode used in classic private TLFs.
Public represents a public TLF for one or more individual users.
PublicKeying specifies the TLF keying mode used in classic public TLFs.
PublicUIDName is the name given to keybase1.PublicUID.
ReaderSep is the string that separates readers from writers in a TLF name.
SingleTeam represents a private TLF for a single Keybase team.
TeamKeying specifies the TLF keying mode used for SingleTeam or implicit team backed TLFs.
TlfHandleExtensionSep is the string that separates the folder participants from an extension suffix in the TLF name.
Unknown is a placeholder type for when TLF type information is not available.
UnknownKeying is a placeholder type for when TLF keying mode is unknown.
# Variables
NullID is an empty ID.
# Structs
BadNameError indicates a top-level folder name that has an incorrect format.
BadTLFNameError indicates a top-level folder name that has an incorrect format.
ErrUnknownTLFType is returned by ParseTlfType when an unknown TLF type string is provided.
Handle uniquely identified top-level folders by readers and writers.
HandleExtension is information which identifies a particular extension.
HandleExtensionMismatchError indicates the expected extension doesn't match the server's extension for the given handle.
ID is a top-level folder ID.
InvalidIDError indicates that a TLF ID string is not parseable or invalid.
NameNotCanonical indicates that a name isn't a canonical, and that another (not necessarily canonical) name should be tried.
NoSuchNameError indicates that the user tried to access a subdirectory entry that doesn't exist.
NoSuchUserError indicates that the given user couldn't be resolved.
# Type aliases
CanonicalName is a string containing the canonical name of a TLF.
HandleExtensionList allows us to sort extensions by type.
HandleExtensionType is the type of extension.
KeyingType represents a TLF keying mode.
PreferredName is a preferred TLF name.
SocialAssertionList can be used to lexicographically sort SocialAssertions.
Type is the type of TLF represented by a particular ID (e.g., public, private, etc.).
UIDList can be used to lexicographically sort UserOrTeamIDs.