indexer

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseManager

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

BaseManager is the concrete implementation of the Manager interface.

func NewManager

func NewManager(s store, l logger) *BaseManager

NewManager initializes a new manager with a physical file store.

func (*BaseManager) AddIndexer

func (m *BaseManager) AddIndexer(idx Indexer)

AddIndexer registers a new indexer (usually a CachedIndexer) to the manager.

func (*BaseManager) GetNZB

func (m *BaseManager) GetNZB(ctx context.Context, res *domain.Release) (io.ReadCloser, error)

GetNZB handles retrieving nzb from cache or downloading from an indexer. Returns io.ReaderCloser so it can returned as a HTTP response or parsed for download

func (*BaseManager) GetResultByID

func (m *BaseManager) GetResultByID(ctx context.Context, id string) (*domain.Release, error)

GetResultByID looks up a search result in the manager's memory

func (*BaseManager) SearchAll

func (m *BaseManager) SearchAll(ctx context.Context, query string) ([]*domain.Release, error)

SearchAll queries all indexers loaded by the manager

type Indexer

type Indexer interface {
	Name() string
	Search(ctx context.Context, query string) ([]*domain.Release, error)
	DownloadNZB(ctx context.Context, res *domain.Release) (io.ReadCloser, error)
}

Indexer is the contract any source (Newznab, Local, Scraper) must fulfill

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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