api

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AniSource added in v0.7.1

type AniSource interface {
	Parse(opt *models.AnimeParseOptions) *models.AnimeEntity
}

type CacheGetter

type CacheGetter interface {
	Get(bucket string, key, val interface{}) error
	GetValue(bucket string, key interface{}) (int64, string, error)
	GetAll(bucket string, tk, tv interface{}, fn func(k, v interface{}))
	ListBucket() []string
	ListKey(bucket string) []string
}

type CacheOpener

type CacheOpener interface {
	Open(file string)
	Close()
}

type CacheSetter

type CacheSetter interface {
	Add(bucket string)
	Put(bucket string, key, val interface{}, ttl int64)
	BatchPut(bucket string, key, val []interface{}, ttl int64)
	Delete(bucket string, key interface{}) error
}

type Cacher

type Cacher interface {
	CacheOpener
	CacheSetter
	CacheGetter
}

type Downloader added in v0.7.1

type Downloader interface {
	Connected() bool
	Start(ctx context.Context)
	List(opt *models.ClientListOptions) []*models.TorrentItem
	Add(opt *models.ClientAddOptions)
	Delete(opt *models.ClientDeleteOptions)
	GetContent(opt *models.ClientGetOptions) []*models.TorrentContentItem
}

type DownloaderManagerCacheDeleter

type DownloaderManagerCacheDeleter interface {
	DeleteCache(fullname string)
}

type Feed added in v0.7.1

type Feed interface {
	Parse(opts ...any) []*models.FeedItem
}

type Filter added in v0.7.1

type Filter interface {
	Filter([]*models.FeedItem) []*models.FeedItem
}

type FilterManager

type FilterManager interface {
	Update(ctx context.Context, items []*models.FeedItem)
}

type Plugin added in v0.7.1

type Plugin interface {
	Type() string
	PluginLoader
	PluginRunner
	PluginVariable
}

type PluginLoader added in v0.7.1

type PluginLoader interface {
	Load(opts *models.PluginLoadOptions)
}

type PluginRunner added in v0.7.1

type PluginRunner interface {
	Run(function string, params models.Object) models.Object
}

type PluginVariable added in v0.7.1

type PluginVariable interface {
	Get(varName string) interface{}
	Set(varName string, val interface{})
}

type Task added in v0.7.1

type Task interface {
	Cron() string
	NextTime() time.Time
	Name() string
	Run(params ...interface{})
}

Jump to

Keyboard shortcuts

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