Documentation
¶
Index ¶
- type DLClientTestResult
- type Input
- type Service
- func (s *Service) Create(ctx context.Context, input Input) (*db.DownloadClient, error)
- func (s *Service) Delete(ctx context.Context, id string) error
- func (s *Service) Get(ctx context.Context, id string) (*db.DownloadClient, error)
- func (s *Service) List(ctx context.Context) ([]db.DownloadClient, error)
- func (s *Service) SetNotifier(fn ServiceNotifier)
- func (s *Service) Test(ctx context.Context, kind, host string, port int, useSSL bool) DLClientTestResult
- func (s *Service) Update(ctx context.Context, id string, input Input) (*db.DownloadClient, error)
- type ServiceNotifier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DLClientTestResult ¶
type DLClientTestResult struct {
Success bool `json:"success"`
Message string `json:"message"`
Duration string `json:"duration"`
}
DLClientTestResult holds the outcome of a download client connectivity test.
type Input ¶
type Input struct {
Name string `json:"name"`
Kind string `json:"kind"` // qbittorrent, deluge, transmission, sabnzbd, nzbget
Protocol string `json:"protocol"` // torrent, usenet
Enabled bool `json:"enabled"`
Priority int `json:"priority"`
Host string `json:"host"`
Port int `json:"port"`
UseSSL bool `json:"use_ssl"`
Username string `json:"username"`
Password string `json:"password"`
Category string `json:"category"`
Directory string `json:"directory"`
Settings string `json:"settings"`
}
Input is the data needed to create or update a download client.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service manages download client configurations.
func NewService ¶
NewService creates a new download client service.
func (*Service) SetNotifier ¶
func (s *Service) SetNotifier(fn ServiceNotifier)
SetNotifier sets the function called to notify services when download clients change.
type ServiceNotifier ¶
ServiceNotifier is called to notify services when download clients change.
Click to show internal directories.
Click to hide internal directories.