Versions in this module Expand all Collapse all v3 v3.2.3 Dec 12, 2024 v3.2.2 Nov 12, 2024 Changes in this version + const StatusCompleted + const StatusDownloading + const StatusErrored + const StatusPending + func PlaylistDetect(req DownloadRequest, mq *MessageQueue, db *MemoryDB) error + type AbortRequest struct + Id string + type CustomTemplate struct + Content string + Id string + Name string + type DownloadInfo struct + ACodec string + CreatedAt time.Time + Extension string + FileName string + OriginalURL string + Resolution string + Size int32 + Thumbnail string + Title string + URL string + VCodec string + type DownloadOutput struct + Filename string + Path string + SavedFilePath string + type DownloadProgress struct + ETA float32 + Percentage string + Speed float32 + Status int + type DownloadRequest struct + Id string + Params []string + Path string + Rename string + URL string + type LoadBalancer struct + func (b *LoadBalancer) Balance(work chan Process) + type MemoryDB struct + func NewMemoryDB() *MemoryDB + func (m *MemoryDB) All() *[]ProcessResponse + func (m *MemoryDB) Delete(id string) + func (m *MemoryDB) Get(id string) (*Process, error) + func (m *MemoryDB) Keys() *[]string + func (m *MemoryDB) Persist() error + func (m *MemoryDB) Restore(mq *MessageQueue) + func (m *MemoryDB) Set(process *Process) string + type MessageQueue struct + func NewMessageQueue() (*MessageQueue, error) + func (m *MessageQueue) Publish(p *Process) + func (m *MessageQueue) SetupConsumers() + type Node struct + Value T + type Pool []*Worker + func (h *Pool) Pop() any + func (h *Pool) Push(x any) + func (h Pool) Len() int + func (h Pool) Less(i, j int) bool + func (h Pool) Swap(i, j int) + type PostprocessTemplate struct + FilePath string + type Process struct + Id string + Info DownloadInfo + Livestream bool + Output DownloadOutput + Params []string + Progress DownloadProgress + Url string + func (p *Process) Complete() + func (p *Process) GetFileName(o *DownloadOutput) error + func (p *Process) Kill() error + func (p *Process) SetMetadata() error + func (p *Process) SetPending() + func (p *Process) Start() + type ProcessResponse struct + Id string + Info DownloadInfo + Output DownloadOutput + Params []string + Progress DownloadProgress + type ProgressTemplate struct + Eta float32 + Percentage string + Size string + Speed float32 + type Session struct + Processes []ProcessResponse + type SetCookiesRequest struct + Cookies string + type Stack struct + Nodes []*Node[T] + func NewStack[T any]() *Stack[T] + func (s *Stack[T]) IsEmpty() bool + func (s *Stack[T]) IsNotEmpty() bool + func (s *Stack[T]) Pop() *Node[T] + func (s *Stack[T]) Push(val T) + type Worker struct + func (w *Worker) Work(done chan *Worker)