mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-14 12:23:43 +00:00
feat: extension on start event (#239)
This commit is contained in:
23 files changed
+292
-101
No files matched your search
+9
-1
@@ -9,6 +9,15 @@ import (
|
||||
type Request struct {
|
||||
URL string `json:"url"`
|
||||
Extra any `json:"extra"`
|
||||
// Labels is used to mark the download task
|
||||
Labels map[string]string `json:"labels"`
|
||||
}
|
||||
|
||||
func (r *Request) Validate() error {
|
||||
if r.URL == "" {
|
||||
return fmt.Errorf("invalid request url")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Resource download resource
|
||||
@@ -36,7 +45,6 @@ func (r *Resource) Validate() error {
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
||||
}
|
||||
|
||||
func (r *Resource) CalcSize() {
|
||||
|
||||
Reference in new issue
Block a user