Add base
This commit is contained in:
8
api/internal/core/entities/Download.go
Normal file
8
api/internal/core/entities/Download.go
Normal file
@@ -0,0 +1,8 @@
|
||||
package entities
|
||||
|
||||
type Download struct {
|
||||
ID string `json:"id"`
|
||||
Status string `json:"status"`
|
||||
Link string `json:"link"`
|
||||
Data string `json:"data"`
|
||||
}
|
||||
13
api/internal/core/ports/download_request/download_request.go
Normal file
13
api/internal/core/ports/download_request/download_request.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package download_request
|
||||
|
||||
import "downloader/internal/core/entities"
|
||||
|
||||
type Service interface {
|
||||
Schedule(provider string, link string) (entities.Download, error)
|
||||
Get(id string) (entities.Download, error)
|
||||
}
|
||||
|
||||
type Repository interface {
|
||||
Create(download entities.Download) (entities.Download, error)
|
||||
GetById(id string) (entities.Download, error)
|
||||
}
|
||||
Reference in New Issue
Block a user