document

package
v4.17.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	WordsPerMinute        float64
	LibraryPath           string
	HomeDir               string
	CoverMaxWidth         int
	Hostname              string
	Port                  int
	UploadDocumentMaxSize int
	ClientImageCacheTTL   int
	ServerImageCacheTTL   int
}

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

func NewController

func NewController(hlRepository highlightsRepository, readingRepository readingRepository, sender Sender, idx IdxReaderWriter, metadataReaders map[string]metadata.Reader, appFs afero.Fs, cfg Config) *Controller

func (*Controller) Cover

func (d *Controller) Cover(c *fiber.Ctx) error

func (*Controller) Delete

func (d *Controller) Delete(c *fiber.Ctx) error

func (*Controller) Detail

func (d *Controller) Detail(c *fiber.Ctx) error

func (*Controller) Download

func (d *Controller) Download(c *fiber.Ctx) error

func (*Controller) GetPosition added in v4.14.0

func (d *Controller) GetPosition(c *fiber.Ctx) error

func (*Controller) Reader

func (d *Controller) Reader(c *fiber.Ctx) error

func (*Controller) Search

func (d *Controller) Search(c *fiber.Ctx) error

func (*Controller) Send

func (d *Controller) Send(c *fiber.Ctx) error

func (*Controller) ToggleComplete added in v4.15.0

func (d *Controller) ToggleComplete(c *fiber.Ctx) error

ToggleComplete marks a document as complete or incomplete If a date is provided in the request body, it sets the completion date to that value If no date is provided (POST), it toggles between complete (with current date) and incomplete

func (*Controller) UpdatePosition added in v4.14.0

func (d *Controller) UpdatePosition(c *fiber.Ctx) error

func (*Controller) Upload

func (d *Controller) Upload(c *fiber.Ctx) error

func (*Controller) UploadForm

func (d *Controller) UploadForm(c *fiber.Ctx) error

type IdxReaderWriter

type IdxReaderWriter interface {
	Search(searchFields index.SearchFields, page, resultsPerPage int) (result.Paginated[[]index.Document], error)
	Count() (uint64, error)
	Close() error
	Document(Slug string) (index.Document, error)
	SameSubjects(slug string, quantity int) ([]index.Document, error)
	SameAuthors(slug string, quantity int) ([]index.Document, error)
	SameSeries(slug string, quantity int) ([]index.Document, error)
	AddFile(file string) (string, error)
	RemoveFile(file string) error
	Documents(IDs []string, sortBy []string) ([]index.Document, error)
	Languages() ([]string, error)
}

IdxReaderWriter defines a set of reading and writing operations over an index

type Sender

type Sender interface {
	SendDocument(address, subject, libraryPath, fileName string) error
	From() string
}

Jump to

Keyboard shortcuts

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