repos

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2022 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BooksLevelBleve added in v1.14.0

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

func NewBooksLevelBleve added in v1.14.0

func NewBooksLevelBleve(batchSize int,
	buckets map[BucketType]*leveldb.DB,
	index bleve.Index,
	encode entities.IMarshal,
	decode entities.IUnmarshal,
	logger zerolog.Logger,
) *BooksLevelBleve

func (*BooksLevelBleve) AppendFreqs added in v1.14.0

func (r *BooksLevelBleve) AppendFreqs(bucket BucketType, items entities.ItemFreqMap) (err error)

func (*BooksLevelBleve) Close added in v1.14.0

func (r *BooksLevelBleve) Close() error

func (*BooksLevelBleve) FindBooks added in v1.14.0

func (r *BooksLevelBleve) FindBooks(queryStr string,
	idxField entities.IndexField, idxFieldVal string, pager pagination.IPager,
) ([]entities.Book, error)

func (*BooksLevelBleve) GetAuthorsBooks added in v1.14.0

func (r *BooksLevelBleve) GetAuthorsBooks(limit int, authors []string, except *entities.Book) (res []entities.Book, err error)

func (*BooksLevelBleve) GetAuthorsByPrefix added in v1.14.0

func (r *BooksLevelBleve) GetAuthorsByPrefix(prefix string, pager pagination.IPager) (entities.FreqsItems, error)

func (*BooksLevelBleve) GetAuthorsSeries added in v1.14.0

func (r *BooksLevelBleve) GetAuthorsSeries(authors []string, except []string) (entities.FreqsItems, error)

func (*BooksLevelBleve) GetByID added in v1.14.0

func (r *BooksLevelBleve) GetByID(bookID string) (*entities.Book, error)

func (*BooksLevelBleve) GetCnt added in v1.14.0

func (r *BooksLevelBleve) GetCnt(bucket BucketType) (res uint64, err error)

func (*BooksLevelBleve) GetGenres added in v1.14.0

func (r *BooksLevelBleve) GetGenres(pager pagination.IPager) (entities.FreqsItems, error)

func (*BooksLevelBleve) GetLangs added in v1.14.0

func (r *BooksLevelBleve) GetLangs() (entities.FreqsItems, error)

func (*BooksLevelBleve) GetLibs added in v1.14.0

func (r *BooksLevelBleve) GetLibs() (entities.FreqsItems, error)

func (*BooksLevelBleve) GetSeriesBooks added in v1.14.0

func (r *BooksLevelBleve) GetSeriesBooks(limit int, series []string, except *entities.Book) (res []entities.Book, err error)

func (*BooksLevelBleve) GetSeriesByPrefix added in v1.14.0

func (r *BooksLevelBleve) GetSeriesByPrefix(prefix string, pager pagination.IPager) (entities.FreqsItems, error)

func (*BooksLevelBleve) GetTotal added in v1.14.0

func (r *BooksLevelBleve) GetTotal() (total uint64)

func (*BooksLevelBleve) IterateOver added in v1.14.0

func (r *BooksLevelBleve) IterateOver(handlers ...func(*entities.Book) error) error

func (*BooksLevelBleve) Remove added in v1.14.0

func (r *BooksLevelBleve) Remove(bookID string) error

func (*BooksLevelBleve) SaveBook added in v1.14.0

func (r *BooksLevelBleve) SaveBook(book *entities.Book) (err error)

type BucketType added in v1.14.0

type BucketType string
const (
	BucketAuthors BucketType = "authors"
	BucketBooks   BucketType = "books"
	BucketSeries  BucketType = "series"
	BucketGenres  BucketType = "genres"
	BucketLibs    BucketType = "libs"
	BucketLangs   BucketType = "langs"
)

type LibMarks added in v1.12.0

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

func NewLibMarks added in v1.12.0

func NewLibMarks(db *leveldb.DB) *LibMarks

func (*LibMarks) AddMark added in v1.12.0

func (r *LibMarks) AddMark(mark string) error

func (*LibMarks) Close added in v1.14.0

func (r *LibMarks) Close() error

func (*LibMarks) MarkExists added in v1.12.0

func (r *LibMarks) MarkExists(mark string) bool

type LibraryFs added in v1.14.0

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

func NewLibraryFs added in v1.14.0

func NewLibraryFs(libs entities.Libraries, executor pipeline.Dispatcher, logger zerolog.Logger) *LibraryFs

func (*LibraryFs) AppendFB2Book added in v1.14.0

func (r *LibraryFs) AppendFB2Book(book *entities.Book) error

func (*LibraryFs) AppendFB2Books added in v1.14.0

func (r *LibraryFs) AppendFB2Books(books []entities.Book)

Jump to

Keyboard shortcuts

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