client

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2025 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deluge

type Deluge struct {
	Host     *string `validate:"required"`
	Port     *uint   `validate:"required"`
	Login    *string `validate:"required"`
	Password *string `validate:"required"`
	V2       bool
	// contains filtered or unexported fields
}

func (*Deluge) AddFreeSpace

func (c *Deluge) AddFreeSpace(bytes int64)

func (*Deluge) Connect

func (c *Deluge) Connect() error

func (*Deluge) GetCurrentFreeSpace

func (c *Deluge) GetCurrentFreeSpace(path string) (int64, error)

func (*Deluge) GetFreeSpace

func (c *Deluge) GetFreeSpace() float64

func (*Deluge) GetTorrents

func (c *Deluge) GetTorrents() (map[string]config.Torrent, error)

func (*Deluge) LabelPathMap

func (c *Deluge) LabelPathMap() map[string]string

func (*Deluge) LoadLabelPathMap

func (c *Deluge) LoadLabelPathMap() error

func (*Deluge) RemoveTorrent

func (c *Deluge) RemoveTorrent(hash string, deleteData bool) (bool, error)

func (*Deluge) SetTorrentLabel

func (c *Deluge) SetTorrentLabel(hash string, label string, hardlink bool) error

func (*Deluge) ShouldIgnore

func (c *Deluge) ShouldIgnore(t *config.Torrent) (bool, error)

func (*Deluge) ShouldRelabel

func (c *Deluge) ShouldRelabel(t *config.Torrent) (string, bool, error)

func (*Deluge) ShouldRemove

func (c *Deluge) ShouldRemove(t *config.Torrent) (bool, error)

func (*Deluge) Type

func (c *Deluge) Type() string

type Interface

type Interface interface {
	Type() string
	Connect() error
	GetTorrents() (map[string]config.Torrent, error)
	RemoveTorrent(string, bool) (bool, error)
	SetTorrentLabel(hash string, label string, hardlink bool) error
	GetCurrentFreeSpace(string) (int64, error)
	AddFreeSpace(int64)
	GetFreeSpace() float64
	LoadLabelPathMap() error
	LabelPathMap() map[string]string

	ShouldIgnore(*config.Torrent) (bool, error)
	ShouldRemove(*config.Torrent) (bool, error)
	ShouldRelabel(*config.Torrent) (string, bool, error)
}

func NewClient

func NewClient(clientType string, clientName string, exp *expression.Expressions) (Interface, error)

func NewDeluge

func NewDeluge(name string, exp *expression.Expressions) (Interface, error)

type QBittorrent

type QBittorrent struct {
	Url                       *string `validate:"required"`
	User                      string
	Password                  string
	EnableAutoTmmAfterRelabel bool
	// contains filtered or unexported fields
}

func (*QBittorrent) AddFreeSpace

func (c *QBittorrent) AddFreeSpace(bytes int64)

func (*QBittorrent) AddTags

func (c *QBittorrent) AddTags(hash string, tags []string) error

func (*QBittorrent) Connect

func (c *QBittorrent) Connect() error

func (*QBittorrent) CreateTags

func (c *QBittorrent) CreateTags(tags []string) error

func (*QBittorrent) DeleteTags

func (c *QBittorrent) DeleteTags(tags []string) error

func (*QBittorrent) GetCurrentFreeSpace

func (c *QBittorrent) GetCurrentFreeSpace(path string) (int64, error)

func (*QBittorrent) GetFreeSpace

func (c *QBittorrent) GetFreeSpace() float64

func (*QBittorrent) GetTorrents

func (c *QBittorrent) GetTorrents() (map[string]config.Torrent, error)

func (*QBittorrent) LabelPathMap

func (c *QBittorrent) LabelPathMap() map[string]string

func (*QBittorrent) LoadLabelPathMap

func (c *QBittorrent) LoadLabelPathMap() error

func (*QBittorrent) RemoveTags

func (c *QBittorrent) RemoveTags(hash string, tags []string) error

func (*QBittorrent) RemoveTorrent

func (c *QBittorrent) RemoveTorrent(hash string, deleteData bool) (bool, error)

func (*QBittorrent) SetTorrentLabel

func (c *QBittorrent) SetTorrentLabel(hash string, label string, hardlink bool) error

func (*QBittorrent) ShouldIgnore

func (c *QBittorrent) ShouldIgnore(t *config.Torrent) (bool, error)

func (*QBittorrent) ShouldRelabel

func (c *QBittorrent) ShouldRelabel(t *config.Torrent) (string, bool, error)

func (*QBittorrent) ShouldRemove

func (c *QBittorrent) ShouldRemove(t *config.Torrent) (bool, error)

func (*QBittorrent) ShouldRetag

func (c *QBittorrent) ShouldRetag(t *config.Torrent) (RetagInfo, bool, error)

func (*QBittorrent) Type

func (c *QBittorrent) Type() string

type RetagInfo

type RetagInfo struct {
	Add    []string
	Remove []string
}

type TagInterface

type TagInterface interface {
	Interface

	ShouldRetag(*config.Torrent) (RetagInfo, bool, error)
	AddTags(string, []string) error
	RemoveTags(string, []string) error
	CreateTags([]string) error
	DeleteTags([]string) error
}

func NewQBittorrent

func NewQBittorrent(name string, exp *expression.Expressions) (TagInterface, error)

Jump to

Keyboard shortcuts

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