feat: add service catalog management with policy integration for domain-based resource access control
Add ServiceCatalogItem type and services CRUD API endpoints (list, create, update, delete). Extend Policy type to include services array with domain, upstream_ip, proxy_ip, and ports metadata. Add ServicesPage component with table view and create/edit modals for managing service definitions. Include service name, domain, proxy, and upstream columns with port parsing logic. Integrate service selection
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
"nexavpn/backend/internal/gateway"
|
||||
"nexavpn/backend/internal/group"
|
||||
"nexavpn/backend/internal/policy"
|
||||
"nexavpn/backend/internal/servicecatalog"
|
||||
"nexavpn/backend/internal/user"
|
||||
)
|
||||
|
||||
@@ -19,6 +20,7 @@ type Handlers struct {
|
||||
Auth *auth.Handler
|
||||
User *user.Handler
|
||||
Device *device.Handler
|
||||
Service *servicecatalog.Handler
|
||||
Policy *policy.Handler
|
||||
Gateway *gateway.Handler
|
||||
Group *group.Handler
|
||||
@@ -68,6 +70,10 @@ func NewRouter(jwtSecret string, handlers Handlers) http.Handler {
|
||||
r.Post("/groups", handlers.Group.Create)
|
||||
r.Patch("/groups/{id}", handlers.Group.Update)
|
||||
r.Delete("/groups/{id}", handlers.Group.Delete)
|
||||
r.Get("/services", handlers.Service.List)
|
||||
r.Post("/services", handlers.Service.Create)
|
||||
r.Patch("/services/{id}", handlers.Service.Update)
|
||||
r.Delete("/services/{id}", handlers.Service.Delete)
|
||||
r.Get("/policies", handlers.Policy.List)
|
||||
r.Post("/policies", handlers.Policy.Create)
|
||||
r.Patch("/policies/{id}", handlers.Policy.Update)
|
||||
|
||||
Reference in New Issue
Block a user