highlight

package
v3.8.5 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

func NewController

func NewController(hlRepository highlightsRepository, usrRepository usersRepository, sender Sender, wordsPerMinute float64, idx IdxReaderWriter) *Controller

func (*Controller) Highlight

func (h *Controller) Highlight(c *fiber.Ctx) error

func (*Controller) Highlights

func (h *Controller) Highlights(c *fiber.Ctx) error

func (*Controller) Remove

func (h *Controller) Remove(c *fiber.Ctx) error

type IdxReaderWriter

type IdxReaderWriter interface {
	Search(keywords string, page, resultsPerPage int) (*search.PaginatedResult, error)
	Count() (uint64, error)
	Close() error
	Document(Slug string) (search.Document, error)
	Documents(IDs []string) ([]search.Document, error)
	SameSubjects(slug string, quantity int) ([]search.Document, error)
	SameAuthors(slug string, quantity int) ([]search.Document, error)
	SameSeries(slug string, quantity int) ([]search.Document, error)
	RemoveFile(file string) error
}

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

type Sender

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

Jump to

Keyboard shortcuts

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