Documentation
¶
Overview ¶
Package downloadhandling provides access to download handling settings (completed/failed download automation, check interval, remote path mappings).
Index ¶
- type RemotePathMapping
- type Service
- func (s *Service) CheckInterval(ctx context.Context) (time.Duration, error)
- func (s *Service) CreateRemotePathMapping(ctx context.Context, host, remotePath, localPath string) (RemotePathMapping, error)
- func (s *Service) DeleteRemotePathMapping(ctx context.Context, id string) error
- func (s *Service) Get(ctx context.Context) (Settings, error)
- func (s *Service) ListRemotePathMappings(ctx context.Context) ([]RemotePathMapping, error)
- func (s *Service) Update(ctx context.Context, settings Settings) (Settings, error)
- type Settings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RemotePathMapping ¶
RemotePathMapping is the application-level view of a remote_path_mappings row.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service exposes read/write access to download handling settings and remote path mapping CRUD.
func NewService ¶
NewService creates a new Service backed by the given Querier.
func (*Service) CheckInterval ¶
CheckInterval returns the polling interval as a time.Duration. Falls back to 60 seconds if the stored value is <= 0.
func (*Service) CreateRemotePathMapping ¶
func (s *Service) CreateRemotePathMapping(ctx context.Context, host, remotePath, localPath string) (RemotePathMapping, error)
CreateRemotePathMapping inserts a new remote path mapping and returns it.
func (*Service) DeleteRemotePathMapping ¶
DeleteRemotePathMapping removes a remote path mapping by ID.
func (*Service) ListRemotePathMappings ¶
func (s *Service) ListRemotePathMappings(ctx context.Context) ([]RemotePathMapping, error)
ListRemotePathMappings returns all configured remote path mappings.