first commit
This commit is contained in:
19
pkg/downloader/event.go
Normal file
19
pkg/downloader/event.go
Normal file
@ -0,0 +1,19 @@
|
||||
package downloader
|
||||
|
||||
type EventKey string
|
||||
|
||||
const (
|
||||
EventKeyStart EventKey = "start"
|
||||
EventKeyPause EventKey = "pause"
|
||||
EventKeyContinue EventKey = "continue"
|
||||
EventKeyProgress EventKey = "progress"
|
||||
EventKeyError EventKey = "error"
|
||||
EventKeyDone EventKey = "done"
|
||||
EventKeyFinally EventKey = "finally"
|
||||
)
|
||||
|
||||
type Event struct {
|
||||
Key EventKey
|
||||
Task *TaskInfo
|
||||
Err error
|
||||
}
|
Reference in New Issue
Block a user