Versions in this module Expand all Collapse all v0 v0.1.0 Nov 9, 2026 Changes in this version + const ActionInstall + const ActionUninstall + const ActionUpdate + const KindNetworkPush + const KindPackage + const MaxIconBytes + const MaxImageBytes + const MaxImageRetries + const MaxImageRetryAfter + const MaxImageRetryDelay + const PackageIconRef + const RetryLevelDefault + const RetryLevelPackage + const RetryLevelSource + const Unbounded + var DefaultConfigFollowUp = []time.Duration + var DefaultImageRetries = []time.Duration + var DefaultRecheck = []time.Duration + var DefaultStartupGrace = []time.Duration + var DefaultStartupWindow = 30 * time.Second + var ErrBadConfig = errors.New("plugins: invalid configuration") + var ErrBadImageRetries = errors.New("at most 5 waits, each from 0 to 30000 ms") + var ErrDisabled = errors.New("plugins: the plugin is disabled") + var ErrIDTaken = errors.New("plugins: a plugin with this ID exists") + var ErrInvalidID = errors.New("plugins: the ID must be lowercase letters, digits, '-' or '_' (up to 40)") + var ErrInvalidURL = errors.New("plugins: the URL must be http(s)://host[:port]") + var ErrNoConfig = errors.New("plugins: the plugin has no configuration") + var ErrNoHealthChecks = errors.New("plugins: the plugin doesn't run source health checks") + var ErrNoJobs = errors.New("plugins: the plugin has no jobs") + var ErrNoPackages = errors.New("plugins: the plugin doesn't install packages") + var ErrNotFound = errors.New("plugins: not found") + var ErrSourceAbsent = errors.New("plugins: the plugin no longer lists this source") + var ErrUnsupported = errors.New("plugins: the source doesn't support this") + func AcceptsProfiles(info *sourcev1.PluginInfo) bool + func AcceptsSolver(info *sourcev1.PluginInfo) bool + func HasHealthChecks(info *sourcev1.PluginInfo) bool + func HasJobs(info *sourcev1.PluginInfo) bool + func HasPackages(info *sourcev1.PluginInfo) bool + func ImageKey(sourceID string) string + func PackageKey(pluginID, pkg string) string + func RatingName(r sourcev1.ContentRating) string + func RemoteDialer(u, apiKey string) client.Client + type Config struct + Schema *structpb.Struct + Values map[string]any + type Dialer func(url, apiKey string) client.Client + type Host struct + func NewHost(st *store.Store, box *secret.Box, dial Dialer, log *slog.Logger) *Host + func (h *Host) Applied(ctx context.Context, sourceID string) (string, string, error) + func (h *Host) CancelJobRun(ctx context.Context, id, run string) (*jobsv1.JobRunSummary, error) + func (h *Host) Chapters(ctx context.Context, v Viewer, id, key string) ([]*sourcev1.Chapter, error) + func (h *Host) ClearPackageImageRetries(ctx context.Context, pluginID, pkg string) error + func (h *Host) ClearSourceImageRetries(ctx context.Context, sourceID string) error + func (h *Host) Client(ctx context.Context, id string) (client.Client, error) + func (h *Host) Config(ctx context.Context, id string) (Config, error) + func (h *Host) Delete(ctx context.Context, id string) error + func (h *Host) Filters(ctx context.Context, v Viewer, id string) (*sourcev1.GetFiltersResponse, error) + func (h *Host) Get(ctx context.Context, id string) (Plugin, error) + func (h *Host) Icon(ctx context.Context, id, ref string) (string, io.Reader, error) + func (h *Host) Image(ctx context.Context, v Viewer, id, ref string) (string, []byte, error) + func (h *Host) Job(ctx context.Context, id, job string) (*jobsv1.Job, error) + func (h *Host) JobRun(ctx context.Context, id, run string) (*jobsv1.JobRun, error) + func (h *Host) JobRuns(ctx context.Context, id, job string, status jobsv1.JobRunStatus, ...) ([]*jobsv1.JobRunSummary, string, error) + func (h *Host) Jobs(ctx context.Context, id string) ([]*jobsv1.Job, error) + func (h *Host) Latest(ctx context.Context, v Viewer, id string, page uint32) (Page, error) + func (h *Host) List(ctx context.Context) ([]Plugin, error) + func (h *Host) ListChapters(ctx context.Context, v Viewer, id, key string, refresh bool) ([]*sourcev1.Chapter, error) + func (h *Host) Load(ctx context.Context) error + func (h *Host) Origins(ctx context.Context, id string) ([]*sourcev1.Origin, error) + func (h *Host) Package(ctx context.Context, id, pkg string) (*sourcev1.Package, error) + func (h *Host) PackageIcon(ctx context.Context, id, pkg string) (string, io.Reader, error) + func (h *Host) PackageImageRetries(ctx context.Context, pluginID, pkg string) (ImageRetries, error) + func (h *Host) Packages(ctx context.Context, id string, q PackageQuery) ([]*sourcev1.Package, error) + func (h *Host) PageImage(ctx context.Context, v Viewer, id, ref string, ...) (string, []byte, error) + func (h *Host) Pages(ctx context.Context, v Viewer, id, chapterKey string) ([]*sourcev1.Page, error) + func (h *Host) PendingPackageTasks(ctx context.Context, id string) (map[string]uuid.UUID, error) + func (h *Host) Popular(ctx context.Context, v Viewer, id string, page uint32) (Page, error) + func (h *Host) PushProfiles(ctx context.Context, id string, force bool) (pushed, failed int, err error) + func (h *Host) QueuePackage(ctx context.Context, by uuid.UUID, p PackagePayload) (db.Task, error) + func (h *Host) ReadyCheck(ctx context.Context) error + func (h *Host) RefreshOrigin(ctx context.Context, id, origin string) (*sourcev1.Origin, error) + func (h *Host) Register(ctx context.Context, n NewPlugin) (Plugin, error) + func (h *Host) RegisterPackageTasks(q *queue.Queue) + func (h *Host) ReloadPackage(ctx context.Context, id, pkg string) (*sourcev1.Package, error) + func (h *Host) ResolveURL(ctx context.Context, v Viewer, rawURL string) (Resolved, error) + func (h *Host) RunJob(ctx context.Context, id, job string, params map[string]string, who string) (*jobsv1.JobRunSummary, error) + func (h *Host) Search(ctx context.Context, v Viewer, id, query string, page uint32, ...) (Page, error) + func (h *Host) Series(ctx context.Context, v Viewer, id, key string) (*sourcev1.Series, error) + func (h *Host) SetConfig(ctx context.Context, id string, values map[string]any) (Config, error) + func (h *Host) SetConfigFollowUp(delays ...time.Duration) + func (h *Host) SetDefaultImageRetries(delays ...time.Duration) + func (h *Host) SetHealthCheck(ctx context.Context, sourceID string, enabled bool) (Source, error) + func (h *Host) SetHub(hub *events.Hub) + func (h *Host) SetLimits(reg *limits.Registry) + func (h *Host) SetMetrics(m *metrics.Metrics) + func (h *Host) SetNetwork(n *network.Service, q *queue.Queue, also ...func(context.Context) error) + func (h *Host) SetPackageImageRetries(ctx context.Context, pluginID, pkg string, delays []time.Duration) (ImageRetries, error) + func (h *Host) SetPackageLanguages(ctx context.Context, id, pkg string, langs []string) (*sourcev1.Package, error) + func (h *Host) SetRecheck(delays ...time.Duration) + func (h *Host) SetSettings(ctx context.Context, id string, values map[string]any) (SourceSettings, error) + func (h *Host) SetSourceEnabled(ctx context.Context, id string, enabled bool) (Source, error) + func (h *Host) SetSourceImageRetries(ctx context.Context, sourceID string, delays []time.Duration) (ImageRetries, error) + func (h *Host) SetSourcesChanged(fn func(ctx context.Context, sourceIDs []string)) + func (h *Host) SetStartupGrace(delays ...time.Duration) + func (h *Host) SetStartupWindow(d time.Duration) + func (h *Host) Settings(ctx context.Context, id string) (SourceSettings, error) + func (h *Host) Source(ctx context.Context, id string, v Viewer) (Source, error) + func (h *Host) SourceIcon(ctx context.Context, v Viewer, id, ref string) (string, io.Reader, error) + func (h *Host) SourceImageRetries(ctx context.Context, sourceID string) (ImageRetries, error) + func (h *Host) Sources(ctx context.Context, v Viewer, all bool) ([]Source, error) + func (h *Host) Sync(ctx context.Context, id string) (Plugin, error) + func (h *Host) SyncAll(ctx context.Context) (ok, down int, err error) + func (h *Host) Update(ctx context.Context, id string, p Patch) (Plugin, error) + type ImageRetries struct + Effective []time.Duration + FromID string + Level string + Own *ImageRetrySetting + TargetID string + TargetKind string + type ImageRetrySetting struct + Delays []time.Duration + UpdatedAt time.Time + type NewPlugin struct + APIKey string + ID string + URL string + type PackagePayload struct + Action string + OriginID string + PackageID string + PluginID string + type PackageQuery struct + InstalledOnly bool + Lang string + OriginID string + Query string + UpdatesOnly bool + type Page struct + HasNextPage bool + Series []*sourcev1.Series + type Patch struct + APIKey *string + Enabled *bool + URL *string + type Plugin struct + Info *sourcev1.PluginInfo + SourceCount int64 + type Resolved struct + BestEffort bool + Series *sourcev1.Series + Source Source + type Source struct + PluginEnabled bool + func (s Source) Usable() bool + type SourceSettings struct + Schema map[string]any + Values map[string]any + type UnreachableError struct + Reason string + func (e *UnreachableError) Error() string + type Viewer struct + Admin bool + AnyKnown bool + Grants users.Grants + HideUnknown bool + Testing bool + func (v Viewer) Visible(s Source) bool