indexer

package
v1.9.9 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2017 License: MIT Imports: 43 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dir added in v1.7.0

func Dir(useLocal bool, name string) http.FileSystem

Dir returns a http.Filesystem for the embedded assets on a given prefix dir. If useLocal is true, the filesystem's contents are instead used.

func FS added in v1.7.0

func FS(useLocal bool) http.FileSystem

FS returns a http.Filesystem for the embedded assets. If useLocal is true, the filesystem's contents are instead used.

func FSByte added in v1.7.0

func FSByte(useLocal bool, name string) ([]byte, error)

FSByte returns the named file from the embedded assets. If useLocal is true, the filesystem's contents are instead used.

func FSMustByte added in v1.7.0

func FSMustByte(useLocal bool, name string) []byte

FSMustByte is the same as FSByte, but panics if name is not present.

func FSMustString added in v1.7.0

func FSMustString(useLocal bool, name string) string

FSMustString is the string version of FSMustByte.

func FSString added in v1.7.0

func FSString(useLocal bool, name string) (string, error)

FSString is the string version of FSByte.

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