loader

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 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 added in v0.10.0

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

func NewFolder added in v0.10.0

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

func (*Folder) ListMagnets added in v0.10.0

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

func (*Folder) ListTorrentPaths added in v0.10.0

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