loader

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

func NewConfig

func NewConfig(r []*config.Route) *Config

func (*Config) ListMagnets

func (l *Config) ListMagnets() (map[string][]string, error)

func (*Config) ListTorrentPaths

func (l *Config) ListTorrentPaths() (map[string][]string, error)

type DB

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

func NewDB

func NewDB(path string) (*DB, error)

func (*DB) AddMagnet

func (l *DB) AddMagnet(r, m string) error

func (*DB) Close

func (l *DB) Close() error

func (*DB) ListMagnets

func (l *DB) ListMagnets() (map[string][]string, error)

func (*DB) ListTorrentPaths

func (l *DB) ListTorrentPaths() (map[string][]string, error)

func (*DB) RemoveFromHash

func (l *DB) RemoveFromHash(r, h string) (bool, error)

type Folder

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

func NewFolder

func NewFolder(r []*config.Route) *Folder

func (*Folder) ListMagnets

func (f *Folder) ListMagnets() (map[string][]string, error)

func (*Folder) ListTorrentPaths

func (f *Folder) ListTorrentPaths() (map[string][]string, error)

type Loader

type Loader interface {
	ListMagnets() (map[string][]string, error)
	ListTorrentPaths() (map[string][]string, error)
}

type LoaderAdder

type LoaderAdder interface {
	Loader

	RemoveFromHash(r, h string) (bool, error)
	AddMagnet(r, m string) error
}

Jump to

Keyboard shortcuts

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