fs

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2020 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	Cfg config.Config
}

Storage file system document storage

func (*Storage) GetAllMetadata

func (fs *Storage) GetAllMetadata(withBlob bool) (result []*messages.RawDocument, err error)

GetAllMetadata load all metadata

func (*Storage) GetDocument

func (fs *Storage) GetDocument(id string) (io.ReadCloser, error)

GetDocument Opens a document by id

func (*Storage) GetMetadata

func (fs *Storage) GetMetadata(id string, withBlob bool) (*messages.RawDocument, error)

GetMetadata loads a document's metadata

func (*Storage) GetStorageURL

func (fs *Storage) GetStorageURL(id string) string

func (*Storage) RegisterRoutes

func (fs *Storage) RegisterRoutes(router *gin.Engine)

func (*Storage) RemoveDocument

func (fs *Storage) RemoveDocument(id string) error

RemoveDocument remove document

func (*Storage) StoreDocument

func (fs *Storage) StoreDocument(stream io.ReadCloser, id string) error

StoreDocument stores a document

func (*Storage) UpdateMetadata

func (fs *Storage) UpdateMetadata(r *messages.RawDocument) error

UpdateMetadata updates the metadata of a document

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL