indexer

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2018 License: MIT Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListBuiltins added in v1.8.1

func ListBuiltins() ([]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 DefinitionLoader added in v1.7.0

type DefinitionLoader interface {
	List() ([]string, error)
	Load(key string) (*IndexerDefinition, error)
}
var (
	ErrUnknownIndexer       = errors.New("Unknown indexer")
	DefaultDefinitionLoader DefinitionLoader
)

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"`
	Ratio        ratioBlock        `yaml:"ratio"`
	Search       searchBlock       `yaml:"search"`
	// contains filtered or unexported fields
}

func LoadEnabledDefinitions added in v1.8.6

func LoadEnabledDefinitions(conf config.Config) ([]*IndexerDefinition, error)

func ParseDefinition

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

func ParseDefinitionFile

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

func (*IndexerDefinition) Stats added in v1.8.5

type IndexerDefinitionStats added in v1.8.5

type IndexerDefinitionStats struct {
	Size    int64
	ModTime time.Time
	Hash    string
	Source  string
}

type Runner

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

func NewRunner

func NewRunner(def *IndexerDefinition, opts RunnerOpts) *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) Ratio added in v1.8.0

func (r *Runner) Ratio() (string, error)

func (*Runner) Search

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

type RunnerOpts added in v1.7.0

type RunnerOpts struct {
	Config     config.Config
	CachePages bool
	Transport  http.RoundTripper
}

type Tester added in v1.3.0

type Tester struct {
	Runner *Runner
	Opts   TesterOpts
	Output io.Writer
}

func (*Tester) Test added in v1.3.0

func (t *Tester) Test() (err 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
y or Y : Canonical URL