importer

package
v0.7.14 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrImportClosed = errors.New("import closed")
)

Functions

This section is empty.

Types

type ActiveImport

type ActiveImport interface {
	Import(items ...Item) error
	Drain()
	Closed() bool
	Close() error
	Err() error
	ImportedHashes() []protocol.ID
}

type ImportErrors

type ImportErrors []ImportItemsError

func (ImportErrors) Error

func (e ImportErrors) Error() string

func (ImportErrors) IsNil

func (e ImportErrors) IsNil() bool

func (ImportErrors) OrNil

func (e ImportErrors) OrNil() error

type ImportItemsError

type ImportItemsError struct {
	Items []Item
	Err   error
}

func (ImportItemsError) Error

func (e ImportItemsError) Error() string

type Importer

type Importer interface {
	New(ctx context.Context, info Info) ActiveImport
}

type Info

type Info struct {
	ID string
}

type Item

type Item struct {
	Source          string
	InfoHash        protocol.ID
	Name            string
	Size            uint64
	Private         bool
	ContentType     model.NullContentType
	ContentSource   model.NullString
	ContentID       model.NullString
	Title           model.NullString
	ReleaseDate     model.Date
	ReleaseYear     model.Year
	Episodes        model.Episodes
	VideoResolution model.NullVideoResolution
	VideoSource     model.NullVideoSource
	VideoCodec      model.NullVideoCodec
	Video3d         model.NullVideo3d
	VideoModifier   model.NullVideoModifier
	ReleaseGroup    model.NullString
	PublishedAt     time.Time
}

type Params

type Params struct {
	fx.In
	Dao lazy.Lazy[*dao.Query]
}

type Result

type Result struct {
	fx.Out
	Importer lazy.Lazy[Importer]
}

func New

func New(p Params) Result

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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