services

package
v0.0.0-...-1e0776f Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiskMonitoringRepo

type DiskMonitoringRepo interface {
	GetTotalSize(ctx context.Context) (int64, error)
	ListByLRU(ctx context.Context, limit int) ([]*domaintranscode.TranscodeJob, error)
}

DiskMonitoringRepo defines the repository interface needed for disk monitoring cleanup. This matches the inline interface in transcode.PerformDiskMonitoring.

type Services

type Services struct {
	// Image services
	ImageCache       *infraimages.CacheService
	ImageTransformer *infraimages.Transformer

	// Media services
	PathBrowser       *pathbrowser.Service
	TranscodeService  transcoding.Service
	TranscodeQueue    *transcode.Queue
	CleanupService    *transcode.CleanupService
	SessionManager    *session.Manager
	SubtitleConverter *subtitles.Converter

	// Transcode repository (for disk monitoring cleanup tasks)
	TranscodeRepo DiskMonitoringRepo

	// Auth services
	PasswordHasher *auth.PasswordHasher
	TokenService   *auth.TokenService

	// Settings service
	Settings *settings.Service

	// Encryption service for sensitive data
	Encryptor *crypto.Encryptor

	// Event Bus for pub/sub messaging
	EventBus *events.Bus

	// Enrichment pipeline manager
	PipelineManager *pipeline.Manager

	// EnqueueBuffer batches enrichment enqueue operations during scans.
	// This wraps PipelineManager and should be passed to ScanLibraryUseCase.
	EnqueueBuffer *pipeline.EnqueueBuffer

	// Enricher registry for tracking all enrichers
	EnricherRegistry *enrichment.Registry

	// Plugin manager for external plugins
	PluginManager *plugins.Manager

	// HostPluginsServer provides capability-based plugin discovery and invocation.
	HostPluginsServer *plugins.HostPluginsServer

	// Location services for weather context
	LocationRepo   *location.Repository
	WeatherService *weather.Service

	// File system monitoring service
	FileMonitor *monitor.Service

	// Search service for text-based search
	Search *appSearch.Service

	// Home screen service for aggregating widgets
	Home *appHome.Service

	// Trending service for trending media data
	Trending *appTrending.Service
}

Services holds all infrastructure and domain services. Groups all service implementations for dependency injection.

func BuildServices

func BuildServices(
	cfg *config.Config,
	repos *repositories.Repositories,
	db *sql.DB,
	dbDriver string,
	logger *slog.Logger,
) (*Services, error)

BuildServices creates and initializes all infrastructure services. Creates required directories and initializes services with proper error handling.

Jump to

Keyboard shortcuts

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