imagehosting

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2026 License: GPL-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Package imagehosting selects, uploads, and persists release images.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service coordinates configured image-host uploaders and image persistence.

func NewServiceWithRegistry

func NewServiceWithRegistry(cfg config.Config, logger api.Logger, repo repository, registry *trackers.Registry) *Service

NewServiceWithRegistry returns an image-hosting service with tracker-owned host scope metadata.

func (*Service) ListCandidates

func (s *Service) ListCandidates(ctx context.Context, meta api.ImageHostingSubject) ([]api.ScreenshotImage, error)

ListCandidates returns existing local and uploaded screenshot selections for image hosting, deduplicated by local image path. Disc-menu selections retain api.ScreenshotPurposeMenu; all other candidates use final purpose.

func (*Service) Upload

func (s *Service) Upload(
	ctx context.Context,
	meta api.ImageHostingSubject,
	host string,
	usageScope string,
	images []api.ScreenshotImage,
) ([]api.UploadedImageLink, error)

Upload validates and deduplicates local image paths, uploads them to one host, and persists successful links when a repository is configured. Tracker-owned hosts require their matching usage scope; HDB batches keep normal and disc-menu images in separate, non-overlapping galleries.

Directories

Path Synopsis
Package policy describes generic image uploader capabilities.
Package policy describes generic image uploader capabilities.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL