From 2b1e14690ea6426a67c0faaaddcfb8aa7360dce7 Mon Sep 17 00:00:00 2001 From: mo khan Date: Fri, 25 Apr 2025 11:08:58 -0600 Subject: refactor: move db and mountable to app --- app/app.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'app/app.go') diff --git a/app/app.go b/app/app.go index 95cd908..80ab9ce 100644 --- a/app/app.go +++ b/app/app.go @@ -12,15 +12,18 @@ import ( "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/app/controllers/sessions" "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/app/controllers/sparkles" "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/app/domain" + "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/app/middleware" "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/pkg/oidc" - "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/pkg/web" - "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/pkg/web/middleware" ) +type Mountable interface { + MountTo(*http.ServeMux) +} + func New(rootDir string) http.Handler { mux := ioc.MustResolve[*http.ServeMux](ioc.Default) - mountable := []web.Mountable{ + mountable := []Mountable{ ioc.MustResolve[*dashboard.Controller](ioc.Default), ioc.MustResolve[*health.Controller](ioc.Default), ioc.MustResolve[*sessions.Controller](ioc.Default), -- cgit v1.2.3