QBitRun/lib/qbitrun/qbitrun.go

38 lines
912 B
Go

package qbitrun
type QBitRun struct {
context RunnerContext
workflow WorkflowDir
}
// New creates a QBitRun instance intended for single session.
//
// QBitRun assumes ownership of the WorkflowDir and will close all files
// when the session is done.
//
// Users must not use or modify the []io.ReadCloser in the WorkflowDir after
// calling this function, especially if the WorkflowDir is created using
// WorkflowFromReadClosers or WorkflowFromReaders.
func New(workflows WorkflowDir, ctx RunnerContext) *QBitRun {
return &QBitRun{
context: ctx,
workflow: workflows,
}
}
type RunnerContext struct {
TorrentName string
Category string
Tags []string
ContentPath string
RootPath string
SavePath string
NumberOfFiles int
TorrentSize uint64
CurrentTracker string
InfoHashV1 string
InfoHashV2 string
TorrentID string
AddEvent bool
}