Versions in this module Expand all Collapse all v0 v0.0.26 Nov 26, 2025 Changes in this version + const Delimiter + const DocType + const FileType + const ROOT_NAME + const SchemaVersion + func DocumentsFileTree(tree *HashTree) *filetree.FileTreeCtx + func FileHashAndSize(file string) ([]byte, int64, error) + func HashEntries(entries []*Entry) (string, error) + func Sync(b *BlobStorage, tree *HashTree, operation func(t *HashTree) error) error + type ApiCtx struct + Http *transport.HttpClientCtx + func CreateCtx(http *transport.HttpClientCtx) (*ApiCtx, error) + func (ctx *ApiCtx) CreateDir(parentId, name string, notify bool) (*model.Document, error) + func (ctx *ApiCtx) DeleteEntry(node *model.Node) error + func (ctx *ApiCtx) FetchDocument(docId, dstPath string) error + func (ctx *ApiCtx) Filetree() *filetree.FileTreeCtx + func (ctx *ApiCtx) MoveEntry(src, dstDir *model.Node, name string) (*model.Node, error) + func (ctx *ApiCtx) Nuke() (err error) + func (ctx *ApiCtx) Refresh() error + func (ctx *ApiCtx) SyncComplete() error + func (ctx *ApiCtx) UploadDocument(parentId string, sourceDocPath string, notify bool) (*model.Document, error) + type BlobDoc struct + Files []*Entry + Metadata archive.MetadataFile + func NewBlobDoc(name, documentId, colType, parentId string) *BlobDoc + func (d *BlobDoc) AddFile(e *Entry) error + func (d *BlobDoc) IndexReader() (io.ReadCloser, error) + func (d *BlobDoc) Line() string + func (d *BlobDoc) MetadataHashAndReader() (hash string, reader io.Reader, err error) + func (d *BlobDoc) Mirror(e *Entry, r RemoteStorage) error + func (d *BlobDoc) ReadMetadata(fileEntry *Entry, r RemoteStorage) error + func (d *BlobDoc) Rehash() error + func (d *BlobDoc) ToDocument() *model.Document + type BlobStorage struct + func NewBlobStorage(http *transport.HttpClientCtx) *BlobStorage + func (b *BlobStorage) GetReader(hash string) (io.ReadCloser, error) + func (b *BlobStorage) GetRootIndex() (string, int64, error) + func (b *BlobStorage) GetUrl(hash string) (string, error) + func (b *BlobStorage) PutRootUrl(hash string, gen int64) (string, int64, error) + func (b *BlobStorage) PutUrl(hash string) (string, int64, error) + func (b *BlobStorage) SyncComplete(gen int64) error + func (b *BlobStorage) UploadBlob(hash string, reader io.Reader) error + func (b *BlobStorage) WriteRootIndex(roothash string, gen int64) (int64, error) + type Entry struct + DocumentID string + Hash string + Size int64 + Subfiles int + Type string + func (d *Entry) Line() string + type FieldReader struct + func NewFieldReader(line string) FieldReader + func (fr *FieldReader) HasNext() bool + func (fr *FieldReader) Next() (string, error) + type HashTree struct + CacheVersion int + Docs []*BlobDoc + Generation int64 + Hash string + func BuildTree(provider RemoteStorage) (*HashTree, error) + func (t *HashTree) Add(d *BlobDoc) error + func (t *HashTree) FindDoc(id string) (*BlobDoc, error) + func (t *HashTree) IndexReader() (io.ReadCloser, error) + func (t *HashTree) Mirror(r RemoteStorage, maxconcurrent int) error + func (t *HashTree) Rehash() error + func (t *HashTree) Remove(id string) error + type RemoteStorage interface + GetReader func(hash string) (io.ReadCloser, error) + GetRootIndex func() (hash string, generation int64, err error) + type RemoteStorageWriter interface + GetWriter func(hash string, writer io.WriteCloser) error + UpdateRootIndex func(hash string, generation int64) (gen int64, err error)