storage

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 29, 2021 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DocumentStorer

type DocumentStorer interface {
	StoreDocument(uid, docid string, s io.ReadCloser) error
	RemoveDocument(uid, docid string) error
	GetDocument(uid, docid string) (io.ReadCloser, error)
	ExportDocument(uid, docid, outputType string, exportOption ExportOption) (io.ReadCloser, error)

	// GetStorageURL creates a short lived url
	GetStorageURL(uid, docid string) (string, time.Time, error)

	RegisterRoutes(*gin.Engine)
}

DocumentStorer stores documents

type ExportOption added in v0.0.4

type ExportOption int
const (
	ExportWithAnnotations ExportOption = iota
	ExportOnlyAnnotations
)

type MetadataStorer added in v0.0.4

type MetadataStorer interface {
	UpdateMetadata(uid string, r *messages.RawDocument) error
	GetAllMetadata(uid string) ([]*messages.RawDocument, error)
	GetMetadata(uid, docid string) (*messages.RawDocument, error)
}

MetadataStorer manages document metadata

type UserStorer added in v0.0.4

type UserStorer interface {
	GetUsers() ([]*model.User, error)
	GetUser(string) (*model.User, error)
	RegisterUser(u *model.User) error
	UpdateUser(u *model.User) error
}

UserStorer holds informations about users

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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