Documentation
¶
Index ¶
- Variables
- type DownloadListResult
- type FileListResult
- type Service
- func (s *Service) ActiveDownloads() []downloader.DownloadProgress
- func (s *Service) CancelDownload(id string) error
- func (s *Service) CreateWebhook(name, url string, events []string) (generated.Webhook, error)
- func (s *Service) DeleteFile(id string) error
- func (s *Service) DeleteWebhook(id int) error
- func (s *Service) DownloadFile(id string)
- func (s *Service) DownloadPendingFiles(productID string)
- func (s *Service) GetFile(id string) (generated.FileWithHistory, error)
- func (s *Service) GetProduct(id string) (generated.ProductWithDeliveries, error)
- func (s *Service) GetSchedule() ([]generated.ProductSchedule, error)
- func (s *Service) GetSource(id string) (generated.Source, error)
- func (s *Service) GetStats() (generated.StatsResponse, error)
- func (s *Service) HealthCheck() generated.HealthResponse
- func (s *Service) ListDownloads(status *string, offset, limit int) (DownloadListResult, error)
- func (s *Service) ListFiles(sourceID, productID *string, status *generated.ListFilesParamsStatus, ...) (FileListResult, error)
- func (s *Service) ListProducts(sourceID *string) ([]generated.Product, error)
- func (s *Service) ListSources() ([]generated.Source, error)
- func (s *Service) ListWebhooks() ([]generated.Webhook, error)
- func (s *Service) ResetFile(id string) error
- func (s *Service) SkipFile(id string) error
- func (s *Service) StatusVersion() uint64
- func (s *Service) SyncProduct(ctx context.Context, id string) error
- func (s *Service) SyncProductFull(productID string) error
- func (s *Service) SyncSourceFiles(sourceID string) error
- func (s *Service) SyncSourceProducts(sourceID string) error
- func (s *Service) TestCredentials(ctx context.Context, id string, credentials map[string]string) error
- func (s *Service) UnskipFile(id string) error
- func (s *Service) UpdateProductSchedule(productID string, req generated.UpdateScheduleRequest) (generated.ProductSchedule, error)
- func (s *Service) UpdateSource(ctx context.Context, id string, enabled *bool, credentials *map[string]string) (generated.Source, error)
- func (s *Service) UpdateWebhook(id int, req generated.UpdateWebhookRequest) (generated.Webhook, error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type DownloadListResult ¶
type DownloadListResult struct {
Downloads []generated.DownloadEntry
Total int
}
type FileListResult ¶
type Service ¶
type Service struct {
DB *database.DB
Auth *auth.Service
Registry *sources.Registry
Downloader *downloader.Downloader
Scheduler *scheduler.Scheduler // can be nil (CLI mode)
Hooks *hooks.Manager
Version string
// contains filtered or unexported fields
}
func (*Service) ActiveDownloads ¶
func (s *Service) ActiveDownloads() []downloader.DownloadProgress
func (*Service) CancelDownload ¶
func (*Service) CreateWebhook ¶
func (*Service) DeleteFile ¶
func (*Service) DeleteWebhook ¶
func (*Service) DownloadFile ¶
func (*Service) DownloadPendingFiles ¶
func (*Service) GetProduct ¶
func (s *Service) GetProduct(id string) (generated.ProductWithDeliveries, error)
func (*Service) GetSchedule ¶
func (s *Service) GetSchedule() ([]generated.ProductSchedule, error)
func (*Service) HealthCheck ¶
func (s *Service) HealthCheck() generated.HealthResponse
func (*Service) ListDownloads ¶
func (s *Service) ListDownloads(status *string, offset, limit int) (DownloadListResult, error)
func (*Service) ListFiles ¶
func (s *Service) ListFiles(sourceID, productID *string, status *generated.ListFilesParamsStatus, offset, limit int) (FileListResult, error)
func (*Service) ListProducts ¶
func (*Service) ResetFile ¶
NOTE: There is a small TOCTOU race between the IsActive check and the delete. In the worst case, a download that starts between the check and delete will have its entry removed, causing it to appear as "available" again. This is acceptable since the window is very narrow and the consequence is a re-download, not data loss.
func (*Service) StatusVersion ¶
func (*Service) SyncProductFull ¶
func (*Service) SyncSourceFiles ¶
func (*Service) SyncSourceProducts ¶
func (*Service) TestCredentials ¶
func (*Service) UnskipFile ¶
func (*Service) UpdateProductSchedule ¶
func (s *Service) UpdateProductSchedule(productID string, req generated.UpdateScheduleRequest) (generated.ProductSchedule, error)
func (*Service) UpdateSource ¶
func (*Service) UpdateWebhook ¶
Click to show internal directories.
Click to hide internal directories.