Documentation ¶
Index ¶
- Constants
- Variables
- func HAMTContents(ctx context.Context, bs blockservice.BlockService, id cid.Cid) (map[string]string, error)
- func Merge(ctx context.Context, aFs, bFs WNFS) (err error)
- func NodeIsPrivate(n Node) bool
- type CommitResult
- type Factory
- type HistoryEntry
- type Key
- type Node
- type PosixFS
- type PrivateFS
- type PrivateName
- type StructuredDataFile
- type WNFS
Constants ¶
View Source
const ( // PreviousLinkName is the string for a historical backpointer in wnfs PreviousLinkName = "previous" // FileHierarchyNamePrivate is the root of encrypted files on WNFS FileHierarchyNamePrivate = "private" // FileHierarchyNamePublic is the root of public files on WNFS FileHierarchyNamePublic = "public" // FileHierarchyNamePretty is a link to a read-only branch at the root of a WNFS FileHierarchyNamePretty = "p" )
Variables ¶
View Source
var NewKey = private.NewKey
Functions ¶
func HAMTContents ¶
func HAMTContents(ctx context.Context, bs blockservice.BlockService, id cid.Cid) (map[string]string, error)
func NodeIsPrivate ¶
Types ¶
type CommitResult ¶
type CommitResult struct { Root cid.Cid PrivateName *PrivateName PrivateKey *Key }
type Factory ¶
type Factory struct { BlockService blockservice.BlockService Ratchets ratchet.Store Decryption private.DecryptionStore }
type HistoryEntry ¶
type HistoryEntry = base.HistoryEntry
type PosixFS ¶
type PosixFS interface { // directories (trees) Ls(pathStr string) ([]fs.DirEntry, error) Mkdir(pathStr string) error // files Write(pathStr string, f fs.File) error Cat(pathStr string) ([]byte, error) Open(pathStr string) (fs.File, error) // general // Mv(from, to string) error Cp(pathStr, srcPathStr string, src fs.FS) error Rm(pathStr string) error }
type PrivateFS ¶
type PrivateFS interface { RootKey() private.Key PrivateName() (PrivateName, error) }
type PrivateName ¶
type StructuredDataFile ¶
func NewLDFile ¶
func NewLDFile(name string, data interface{}) StructuredDataFile
type WNFS ¶
type WNFS interface { fs.FS fs.ReadDirFile // wnfs root is a directory file PosixFS PrivateFS Cid() cid.Cid History(ctx context.Context, pathStr string, generations int) ([]HistoryEntry, error) Commit() (CommitResult, error) }
func FromCID ¶
func FromCID(ctx context.Context, bserv blockservice.BlockService, rs ratchet.Store, id cid.Cid, rootKey Key, rootName PrivateName) (WNFS, error)
func NewEmptyFS ¶
func NewEmptyFS(ctx context.Context, bserv blockservice.BlockService, rs ratchet.Store, rootKey Key) (WNFS, error)
Click to show internal directories.
Click to hide internal directories.