author

package
v4.21.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: GPL-3.0 Imports: 25 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
	CacheDir            string
	AuthorImageMaxWidth 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 IdxReader, cfg Config, dataSource DataSource, appFs afero.Fs, embeddedImagesFS fs.FS) *Controller

func (*Controller) Documents added in v4.7.0

func (a *Controller) Documents(c fiber.Ctx) error

func (*Controller) Image added in v4.7.0

func (a *Controller) Image(c fiber.Ctx) error

func (*Controller) Summary added in v4.7.0

func (a *Controller) Summary(c fiber.Ctx) error

func (*Controller) Update added in v4.7.0

func (a *Controller) Update(c fiber.Ctx) error

func (*Controller) UploadImage added in v4.17.0

func (a *Controller) UploadImage(c fiber.Ctx) error

type DataSource added in v4.7.0

type DataSource interface {
	SearchAuthor(name string, languages []string) (model.Author, error)
	RetrieveAuthor(IDs []string, languages []string) (model.Author, error)
}

type IdxReader

type IdxReader interface {
	SearchByAuthor(searchFields index.SearchFields, page, resultsPerPage int) (result.Paginated[[]index.Document], error)
	Author(slug, lang string) (index.Author, error)
	IndexAuthor(author index.Author) error
	Languages() ([]string, error)
}

IdxReader defines a set of author reading operations over an index

type Sender

type Sender interface {
	From() string
}

Jump to

Keyboard shortcuts

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