go first commit

This commit is contained in:
Leon Bösche
2025-12-17 22:57:57 +01:00
parent e5a4de7aab
commit 7749ebfd08
22 changed files with 1044 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
package http
import (
"net/http"
"go.b0esche.cloud/backend/internal/audit"
"go.b0esche.cloud/backend/internal/auth"
"go.b0esche.cloud/backend/internal/config"
"go.b0esche.cloud/backend/internal/database"
"go.b0esche.cloud/backend/pkg/jwt"
)
type Server struct {
*http.Server
}
func New(cfg *config.Config, db *database.DB, jwtManager *jwt.Manager, authService *auth.Service, auditLogger *audit.Logger) *Server {
r := NewRouter(cfg, db, jwtManager, authService, auditLogger)
return &Server{
Server: &http.Server{
Addr: cfg.ServerAddr,
Handler: r,
},
}
}