debrider

package
v1.0.0-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllDebrid

type AllDebrid struct {

	// Allow to set a custom HTTP transport (for test purposes)
	CustomTransport http.RoundTripper

	SupportedHostsRegex []*regexp.Regexp
	// contains filtered or unexported fields
}

AllDebrid is an interface for alldebrid.com

func (*AllDebrid) Auth

func (ad *AllDebrid) Auth(infos map[string]string) error

Auth initializes AllDebrid

func (*AllDebrid) Debrid

func (ad *AllDebrid) Debrid(uri string, options map[string]interface{}) (string, error)

Debrid debrid a given uri

func (*AllDebrid) Init

func (ad *AllDebrid) Init() error

Init initializes some Alldebrid things

func (*AllDebrid) IsDebridable

func (ad *AllDebrid) IsDebridable(uri string) bool

IsDebridable indicates if an uri is supported by AllDebrid

type Debrider

type Debrider interface {
	Init() error
	Auth(infos map[string]string) error
	Debrid(uri string, options map[string]interface{}) (string, error)

	// IsDebridable will be used to switch between multiple debriders
	IsDebridable(uri string) bool
}

Debrider takes an URI and return a debrided URI

func NewDebrider

func NewDebrider(name string, authInfos map[string]string) (Debrider, error)

NewDebrider returns a new initialized debrider

Authentication is optionnal to allow access to some methods which do not require it.

Jump to

Keyboard shortcuts

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