indexer

package
Version: v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2016 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnknownIndexer = errors.New("Unknown indexer")
View Source
var (
	WriteCache = false
)

Functions

func ListDefinitions

func ListDefinitions() ([]string, error)

Types

type Aggregate added in v1.5.0

type Aggregate []torznab.Indexer

func (Aggregate) Capabilities added in v1.5.0

func (ag Aggregate) Capabilities() torznab.Capabilities

func (Aggregate) Download added in v1.5.0

func (ag Aggregate) Download(u string) (io.ReadCloser, http.Header, error)

func (Aggregate) Info added in v1.5.0

func (ag Aggregate) Info() torznab.Info

func (Aggregate) Search added in v1.5.0

func (ag Aggregate) Search(query torznab.Query) ([]torznab.ResultItem, error)

type IndexerDefinition

type IndexerDefinition struct {
	Site         string            `yaml:"site"`
	Settings     []settingsField   `yaml:"settings"`
	Name         string            `yaml:"name"`
	Description  string            `yaml:"description"`
	Language     string            `yaml:"language"`
	Links        stringorslice     `yaml:"links"`
	Capabilities capabilitiesBlock `yaml:"caps"`
	Login        loginBlock        `yaml:"login"`
	Search       searchBlock       `yaml:"search"`
}

func LoadDefinition

func LoadDefinition(key string) (*IndexerDefinition, error)

func ParseDefinition

func ParseDefinition(src []byte) (*IndexerDefinition, error)

func ParseDefinitionFile

func ParseDefinitionFile(f *os.File) (*IndexerDefinition, error)

type Runner

type Runner struct {
	Definition *IndexerDefinition
	Browser    browser.Browsable
	Cookies    http.CookieJar
	Config     config.Config
	Logger     logrus.FieldLogger
	// contains filtered or unexported fields
}

func NewRunner

func NewRunner(def *IndexerDefinition, conf config.Config) *Runner

func (*Runner) Capabilities

func (r *Runner) Capabilities() torznab.Capabilities

func (*Runner) Download

func (r *Runner) Download(u string) (io.ReadCloser, http.Header, error)

func (*Runner) Info

func (r *Runner) Info() torznab.Info

func (*Runner) Search

func (r *Runner) Search(query torznab.Query) ([]torznab.ResultItem, error)

type Tester added in v1.3.0

type Tester struct {
	Runner *Runner
	Opts   TesterOpts
}

func (*Tester) Test added in v1.3.0

func (t *Tester) Test() error

type TesterOpts added in v1.3.0

type TesterOpts struct {
	Download bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL