add sources
This commit is contained in:
@@ -7,6 +7,8 @@ import (
|
||||
"github.com/atlasos/calypso/internal/audit"
|
||||
"github.com/atlasos/calypso/internal/auth"
|
||||
"github.com/atlasos/calypso/internal/backup"
|
||||
"github.com/atlasos/calypso/internal/bacula"
|
||||
|
||||
"github.com/atlasos/calypso/internal/common/cache"
|
||||
"github.com/atlasos/calypso/internal/common/config"
|
||||
"github.com/atlasos/calypso/internal/common/database"
|
||||
@@ -457,6 +459,18 @@ func NewRouter(cfg *config.Config, db *database.DB, log *logger.Logger) *gin.Eng
|
||||
backupGroup.POST("/console/execute", requirePermission("backup", "write"), backupHandler.ExecuteBconsoleCommand)
|
||||
}
|
||||
|
||||
baculaHandler := bacula.NewHandler(db, log)
|
||||
baculaGroup := protected.Group("/bacula/clients")
|
||||
baculaGroup.Use(requireRole("bacula-admin"))
|
||||
{
|
||||
baculaGroup.POST("/register", baculaHandler.Register)
|
||||
baculaGroup.POST("/:id/capabilities", baculaHandler.UpdateCapabilities)
|
||||
baculaGroup.GET("/:id/pending-update", baculaHandler.GetPendingUpdate)
|
||||
baculaGroup.POST("/:id/ping", baculaHandler.Ping)
|
||||
baculaGroup.GET("", baculaHandler.ListClients)
|
||||
baculaGroup.GET("/:id", baculaHandler.GetClient)
|
||||
}
|
||||
|
||||
// Monitoring
|
||||
monitoringHandler := monitoring.NewHandler(db, log, alertService, metricsService, eventHub)
|
||||
monitoringGroup := protected.Group("/monitoring")
|
||||
|
||||
Reference in New Issue
Block a user