Documentation ¶
Index ¶
- func CastDbIDToString(dbID thread.ID) string
- func FindOrCreateDeterministicThread(ctx context.Context, variant DeterministicThreadVariant, threadName string, ...) (*thread.ID, error)
- func GetThreadContext(parentCtx context.Context, threadName string, dbID thread.ID, hub bool, ...) (context.Context, error)
- func IsMetaFileName(pathOrName string) bool
- func MapDirEntryToFileInfo(entry bucketsproto.ListPathResponse, itemPath string) domain.FileInfo
- func NewDeterministicThreadID(kc keychain.Keychain, threadVariant DeterministicThreadVariant) (thread.ID, error)
- func ParseDbIDFromString(dbID string) (*thread.ID, error)
- func RandBytes(size int) ([]byte, error)
- type DeterministicThreadVariant
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CastDbIDToString ¶
func FindOrCreateDeterministicThread ¶ added in v0.0.30
func FindOrCreateDeterministicThread( ctx context.Context, variant DeterministicThreadVariant, threadName string, kc keychain.Keychain, st store.Store, threads *tc.Client, cfg config.Config, netc *nc.Client, hnetc *nc.Client, hubAuth hub.HubAuth, shouldForceRestore bool, dbCollectionConfigs []db.CollectionConfig, ) (*thread.ID, error)
Finds or creates a thread that's based on the user private key and the specified variant Using the same private key, variant and thread name will always end up generating the same key
func GetThreadContext ¶
func GetThreadContext(parentCtx context.Context, threadName string, dbID thread.ID, hub bool, kc keychain.Keychain, hubAuth hub.HubAuth, threadsClient *tc.Client) (context.Context, error)
Readies a context to access a thread given its name and dbid
func IsMetaFileName ¶ added in v0.0.22
func MapDirEntryToFileInfo ¶ added in v0.0.33
func MapDirEntryToFileInfo(entry bucketsproto.ListPathResponse, itemPath string) domain.FileInfo
Types ¶
type DeterministicThreadVariant ¶
type DeterministicThreadVariant string
const ( MetathreadThreadVariant DeterministicThreadVariant = "metathread" MirrorBucketVariant DeterministicThreadVariant = "mirror_bucket" )
func MirrorBucketVariantGen ¶ added in v0.0.30
func MirrorBucketVariantGen(mirrorBucketSlug string) DeterministicThreadVariant
Click to show internal directories.
Click to hide internal directories.