Documentation
¶
Index ¶
- Constants
- Variables
- type AddMagnetData
- type AddMagnetParams
- type AddNewzData
- type AddNewzParams
- type CheckMagnetData
- type CheckMagnetDataItem
- type CheckMagnetParams
- type CheckNewzData
- type CheckNewzDataItem
- type CheckNewzParams
- type Ctx
- type File
- type GenerateLinkData
- type GenerateLinkParams
- type GenerateNewzLinkData
- type GenerateNewzLinkParams
- type GetMagnetData
- type GetMagnetParams
- type GetNewzData
- type GetNewzParams
- type GetUserParams
- type GetWebzData
- type GetWebzParams
- type ListMagnetsData
- type ListMagnetsDataItem
- type ListMagnetsParams
- type ListNewzData
- type ListNewzDataItem
- type ListNewzParams
- type ListWebzData
- type ListWebzDataItem
- type ListWebzParams
- type MagnetFile
- type MagnetFileType
- type MagnetStatus
- type NewzFile
- type NewzStatus
- type NewzStore
- type RemoveMagnetData
- type RemoveMagnetParams
- type RemoveNewzData
- type RemoveNewzParams
- type Store
- type StoreCode
- type StoreName
- type User
- type UserSubscriptionStatus
- type WebzFile
- type WebzStore
Constants ¶
View Source
const ( MagnetFileTypeFile = "file" MagnetFileTypeFolder = "folder" )
Variables ¶
View Source
var ErrInvalidName = errors.New("invalid store name")
Functions ¶
This section is empty.
Types ¶
type AddMagnetData ¶
type AddMagnetData struct {
Id string `json:"id"`
Hash string `json:"hash"`
Magnet string `json:"magnet"`
Name string `json:"name"`
Size int64 `json:"size"`
Status MagnetStatus `json:"status"`
Files []MagnetFile `json:"files"`
Private bool `json:"private,omitempty"`
AddedAt time.Time `json:"added_at"`
}
type AddMagnetParams ¶
type AddMagnetParams struct {
Ctx
Magnet string
Torrent *multipart.FileHeader
ClientIP string
// contains filtered or unexported fields
}
func (*AddMagnetParams) GetTorrentMeta ¶
type AddNewzData ¶
type AddNewzData struct {
Id string `json:"id"`
Hash string `json:"hash"`
Status NewzStatus `json:"status"`
}
type AddNewzParams ¶
type AddNewzParams struct {
Ctx
File *multipart.FileHeader
Link string
ClientIP string
}
type CheckMagnetData ¶
type CheckMagnetData struct {
Items []CheckMagnetDataItem `json:"items"`
}
type CheckMagnetDataItem ¶
type CheckMagnetDataItem struct {
Hash string `json:"hash"`
Magnet string `json:"magnet"`
Name string `json:"name,omitempty"`
Size int64 `json:"-"`
Status MagnetStatus `json:"status"`
Files []MagnetFile `json:"files"`
}
type CheckMagnetParams ¶
type CheckNewzData ¶
type CheckNewzData struct {
Items []CheckNewzDataItem `json:"items"`
}
type CheckNewzDataItem ¶
type CheckNewzDataItem struct {
Hash string `json:"hash"`
Status NewzStatus `json:"status"`
Files []NewzFile `json:"files"`
}
type CheckNewzParams ¶
type GenerateLinkData ¶
type GenerateLinkParams ¶
type GenerateNewzLinkData ¶
type GenerateNewzLinkData struct {
Link string `json:"link"`
}
type GenerateNewzLinkParams ¶
type GetMagnetData ¶
type GetMagnetData struct {
Id string `json:"id"`
Name string `json:"name"`
Hash string `json:"hash"`
Size int64 `json:"size"`
Status MagnetStatus `json:"status"`
Files []MagnetFile `json:"files"`
Private bool `json:"private,omitempty"`
AddedAt time.Time `json:"added_at"`
}
type GetMagnetParams ¶
type GetNewzData ¶
type GetNewzParams ¶
type GetUserParams ¶
type GetUserParams struct {
Ctx
}
type GetWebzData ¶
type GetWebzParams ¶
type ListMagnetsData ¶
type ListMagnetsData struct {
Items []ListMagnetsDataItem `json:"items"`
TotalItems int `json:"total_items"`
}
type ListMagnetsDataItem ¶
type ListMagnetsParams ¶
type ListNewzData ¶
type ListNewzData struct {
Items []ListNewzDataItem `json:"items"`
TotalItems int `json:"total_items"`
}
type ListNewzDataItem ¶
type ListNewzParams ¶
type ListWebzData ¶
type ListWebzData struct {
Items []ListWebzDataItem `json:"items"`
TotalItems int `json:"total_items"`
}
type ListWebzDataItem ¶
type ListWebzParams ¶
type MagnetFile ¶
type MagnetFile struct {
Idx int `json:"index"`
Link string `json:"link,omitempty"`
Path string `json:"path"`
Name string `json:"name"`
Size int64 `json:"size"`
VideoHash string `json:"video_hash,omitempty"`
MediaInfo *media_info.MediaInfo `json:"media_info,omitempty"`
Source string `json:"source,omitempty"`
}
func (*MagnetFile) GetIdx ¶
func (f *MagnetFile) GetIdx() int
func (*MagnetFile) GetLink ¶
func (f *MagnetFile) GetLink() string
func (*MagnetFile) GetName ¶
func (f *MagnetFile) GetName() string
func (*MagnetFile) GetPath ¶
func (f *MagnetFile) GetPath() string
func (*MagnetFile) GetSize ¶
func (f *MagnetFile) GetSize() int64
type MagnetFileType ¶
type MagnetFileType string
type MagnetStatus ¶
type MagnetStatus string
const ( MagnetStatusCached MagnetStatus = "cached" // cached in store, ready to download instantly MagnetStatusQueued MagnetStatus = "queued" MagnetStatusDownloading MagnetStatus = "downloading" MagnetStatusProcessing MagnetStatus = "processing" // compressing / moving MagnetStatusDownloaded MagnetStatus = "downloaded" MagnetStatusUploading MagnetStatus = "uploading" MagnetStatusFailed MagnetStatus = "failed" MagnetStatusInvalid MagnetStatus = "invalid" MagnetStatusUnknown MagnetStatus = "unknown" )
type NewzFile ¶
type NewzStatus ¶
type NewzStatus string
const ( NewzStatusCached NewzStatus = "cached" NewzStatusQueued NewzStatus = "queued" NewzStatusDownloading NewzStatus = "downloading" NewzStatusProcessing NewzStatus = "processing" NewzStatusDownloaded NewzStatus = "downloaded" NewzStatusFailed NewzStatus = "failed" NewzStatusInvalid NewzStatus = "invalid" NewzStatusUnknown NewzStatus = "unknown" )
type NewzStore ¶
type NewzStore interface {
GetName() StoreName
GetUser(params *GetUserParams) (*User, error)
CheckNewz(params *CheckNewzParams) (*CheckNewzData, error)
AddNewz(params *AddNewzParams) (*AddNewzData, error)
GetNewz(params *GetNewzParams) (*GetNewzData, error)
ListNewz(params *ListNewzParams) (*ListNewzData, error)
RemoveNewz(params *RemoveNewzParams) (*RemoveNewzData, error)
GenerateNewzLink(params *GenerateNewzLinkParams) (*GenerateNewzLinkData, error)
}
type RemoveMagnetData ¶
type RemoveMagnetData struct {
Id string `json:"id"`
}
type RemoveMagnetParams ¶
type RemoveNewzData ¶
type RemoveNewzData struct {
Id string `json:"id"`
}
type RemoveNewzParams ¶
type Store ¶
type Store interface {
GetName() StoreName
GetUser(params *GetUserParams) (*User, error)
CheckMagnet(params *CheckMagnetParams) (*CheckMagnetData, error)
AddMagnet(params *AddMagnetParams) (*AddMagnetData, error)
GetMagnet(params *GetMagnetParams) (*GetMagnetData, error)
ListMagnets(params *ListMagnetsParams) (*ListMagnetsData, error)
RemoveMagnet(params *RemoveMagnetParams) (*RemoveMagnetData, error)
GenerateLink(params *GenerateLinkParams) (*GenerateLinkData, error)
}
type StoreCode ¶
type StoreCode string
const ( StoreCodeAllDebrid StoreCode = "ad" StoreCodeDebrider StoreCode = "dr" StoreCodeDebridLink StoreCode = "dl" StoreCodeEasyDebrid StoreCode = "ed" StoreCodeOffcloud StoreCode = "oc" StoreCodePikPak StoreCode = "pp" StoreCodePremiumize StoreCode = "pm" StoreCodeRealDebrid StoreCode = "rd" StoreCodeStremThru StoreCode = "st" StoreCodeTorBox StoreCode = "tb" )
type StoreName ¶
type StoreName string
const ( StoreNameAlldebrid StoreName = "alldebrid" StoreNameDebrider StoreName = "debrider" StoreNameDebridLink StoreName = "debridlink" StoreNameEasyDebrid StoreName = "easydebrid" StoreNameOffcloud StoreName = "offcloud" StoreNamePikPak StoreName = "pikpak" StoreNamePremiumize StoreName = "premiumize" StoreNameRealDebrid StoreName = "realdebrid" StoreNameStremThru StoreName = "stremthru" StoreNameTorBox StoreName = "torbox" )
type User ¶
type User struct {
Id string `json:"id"`
Email string `json:"email"`
SubscriptionStatus UserSubscriptionStatus `json:"subscription_status"`
HasUsenet bool `json:"has_usenet"`
}
type UserSubscriptionStatus ¶
type UserSubscriptionStatus string
const ( UserSubscriptionStatusPremium UserSubscriptionStatus = "premium" UserSubscriptionStatusTrial UserSubscriptionStatus = "trial" UserSubscriptionStatusExpired UserSubscriptionStatus = "expired" )
type WebzFile ¶
type WebzStore ¶
type WebzStore interface {
GetWebz(params *GetWebzParams) (*GetWebzData, error)
ListWebz(params *ListWebzParams) (*ListWebzData, error)
}
Click to show internal directories.
Click to hide internal directories.