torsaver

package module
v0.0.0-...-209ab56 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2019 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultAriaRPC = "http://localhost:6800/jsonrpc"

DefaultAriaRPC ...

View Source
var DefaultAriaSecret = ""

DefaultAriaSecret ...

View Source
var DefaultNYAAURL = `https://sukebei.nyaa.si`

DefaultNYAAURL ...

View Source
var DefaultSavePath = "tmp"

DefaultSavePath ...

View Source
var DefaultTimeOutSecond time.Duration = 3

DefaultTimeOutSecond ...

Functions

func Get

func Get(url string) (data []byte, e error)

Get ...

func Hash

func Hash(url string) string

Hash ...

func NewRPCClient

func NewRPCClient(ctx context.Context) (cli rpc.Client, e error)

NewRPCClient ...

func RegisterCache

func RegisterCache()

RegisterCache ...

func RegisterProxy

func RegisterProxy(addr string, args ...ProxyArgs) (e error)

RegisterProxy ...

func Wrap

func Wrap(e error, msg string) error

Wrap ...

Types

type Nyaa

type Nyaa struct {
	Aria     rpc.Client
	User     string //user:NewDragon,offkab
	F        string
	Category string
	Query    string
	Sort     string
	Order    string
	Page     int
	// contains filtered or unexported fields
}

Nyaa ...

func (Nyaa) CurrentPage

func (n Nyaa) CurrentPage() int

func (Nyaa) Download

func (n Nyaa) Download(idx int) (e error)

Download ...

func (Nyaa) DownloadAll

func (n Nyaa) DownloadAll() (e error)

DownloadAll ...

func (*Nyaa) Find

func (n *Nyaa) Find(name string) error

Find ...

func (*Nyaa) Limit

func (n *Nyaa) Limit(i int)

Limit ...

func (Nyaa) List

func (n Nyaa) List() (l []string)

List ...

func (Nyaa) Save

func (n Nyaa) Save(idx int) (e error)

Save ...

func (Nyaa) SaveAll

func (n Nyaa) SaveAll() (e error)

SaveAll ...

func (*Nyaa) SetPage

func (n *Nyaa) SetPage(p int)

type NyaaOption

type NyaaOption func(nyaa *Nyaa)

NyaaOption ...

type NyaaTorrent

type NyaaTorrent struct {
	ID        string
	Link      string
	Category  string
	Name      string
	File      string
	Magnet    string
	Size      string
	Date      string
	Seeders   string
	Leechers  string
	Downloads string
}

NyaaTorrent ...

type ProxyArgs

type ProxyArgs func(cli *http.Client)

ProxyArgs ...

func TimeOut

func TimeOut(sec int) ProxyArgs

TimeOut ...

type Saver

type Saver interface {
	Limit(i int)
	CurrentPage() int
	SetPage(int)
	Find(name string) (e error)
	Save(idx int) (e error)
	SaveAll() (e error)
	Download(idx int) (e error)
	DownloadAll() (e error)
	List() []string
}

Saver ...

func NewNyaa

func NewNyaa(opts ...NyaaOption) Saver

NewNyaa ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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