importer

package
v0.10.0-beta.4 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: MIT Imports: 12 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
}

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            uint
	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