mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 00:39:13 +00:00
feat: add backend
This commit is contained in:
parent
bc418ff248
commit
a838d994a6
68 changed files with 9561 additions and 0 deletions
28
internal/domain/client.go
Normal file
28
internal/domain/client.go
Normal file
|
@ -0,0 +1,28 @@
|
|||
package domain
|
||||
|
||||
type DownloadClientRepo interface {
|
||||
//FindByActionID(actionID int) ([]DownloadClient, error)
|
||||
List() ([]DownloadClient, error)
|
||||
FindByID(id int32) (*DownloadClient, error)
|
||||
Store(client DownloadClient) (*DownloadClient, error)
|
||||
Delete(clientID int) error
|
||||
}
|
||||
|
||||
type DownloadClient struct {
|
||||
ID int `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Type DownloadClientType `json:"type"`
|
||||
Enabled bool `json:"enabled"`
|
||||
Host string `json:"host"`
|
||||
Port int `json:"port"`
|
||||
SSL bool `json:"ssl"`
|
||||
Username string `json:"username"`
|
||||
Password string `json:"password"`
|
||||
}
|
||||
|
||||
type DownloadClientType string
|
||||
|
||||
const (
|
||||
DownloadClientTypeQbittorrent DownloadClientType = "QBITTORRENT"
|
||||
DownloadClientTypeDeluge DownloadClientType = "DELUGE"
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue