Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
Server *Server
Scheduler *scheduler.Scheduler
DB *ent.Client
Store db.Store
Auth auth.Manager
Downloads download.Downloader
Importer *importer.Worker
HTTPLogger *observability.HTTPLogger
}
App holds the assembled application components. The caller is responsible for starting the scheduler and HTTP server, and for closing the database when done.
func NewFromConfig ¶
NewFromConfig wires all application dependencies from the config singleton. Logging uses the process-wide slog.Default installed by cmd/main.go after observability.Setup, so no logger is plumbed through component constructors.
type Config ¶
type Config struct {
DB db.Store
Ent *ent.Client
Movies movie.Manager
Metadata metadata.Provider
Indexers indexer.Manager
Downloads download.Downloader
MediaServers mediaserver.Manager
DeepLinker *mediaserver.DeepLinker
Renamer library.Renamer
SeriesRenamer library.Renamer
Auth auth.Manager
Limiter auth.Limiter
OIDC auth.OIDCManager
Scheduler scheduler.Controller
BulkImports bulkimport.Manager
MissingSearcher *rss.MissingSearcher
TVShows tvshow.Manager
Requests request.Manager
TVSearcher *rss.EpisodeMissingSearcher
MetadataTV metadata.TVProvider
Posters posters.Manager
AuthMiddleware func(http.Handler) http.Handler
HTTPLog func(http.Handler) http.Handler
}
Config carries the service-layer dependencies the composition root needs to build the web + restapi handlers and apply auth middleware.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package restapi provides primitives to interact with the openapi HTTP API.
|
Package restapi provides primitives to interact with the openapi HTTP API. |
|
Package web hosts the non-SPA HTTP surface: the SPA shell, the API docs shell, JSON auth endpoints (login / register / logout / config), and the OIDC redirect dance.
|
Package web hosts the non-SPA HTTP surface: the SPA shell, the API docs shell, JSON auth endpoints (login / register / logout / config), and the OIDC redirect dance. |
Click to show internal directories.
Click to hide internal directories.