imagehosting

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2026 License: GPL-2.0 Imports: 26 Imported by: 0

Documentation

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
}

func NewService

func NewService(cfg config.Config, logger api.Logger, repo api.MetadataRepository) *Service

func (*Service) ListCandidates

func (s *Service) ListCandidates(ctx context.Context, meta api.PreparedMetadata) ([]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.PreparedMetadata, 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.

Jump to

Keyboard shortcuts

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