mirror of
https://github.com/EZ-Api/ez-api.git
synced 2026-01-13 17:47:51 +00:00
feat(api): add access control and binding endpoints
Add endpoints for master and key access management to configure default and allowed namespaces, including propagation options. Implement GET and DELETE operations for individual bindings. Update sync service to persist bindings snapshots even when no upstreams are available.
This commit is contained in:
@@ -159,6 +159,10 @@ func main() {
|
||||
{
|
||||
adminGroup.POST("/masters", adminHandler.CreateMaster)
|
||||
adminGroup.POST("/masters/:id/keys", adminHandler.IssueChildKeyForMaster)
|
||||
adminGroup.GET("/masters/:id/access", handler.GetMasterAccess)
|
||||
adminGroup.PUT("/masters/:id/access", handler.UpdateMasterAccess)
|
||||
adminGroup.GET("/keys/:id/access", handler.GetKeyAccess)
|
||||
adminGroup.PUT("/keys/:id/access", handler.UpdateKeyAccess)
|
||||
adminGroup.GET("/features", featureHandler.ListFeatures)
|
||||
adminGroup.PUT("/features", featureHandler.UpdateFeatures)
|
||||
// Other admin routes for managing providers, models, etc.
|
||||
@@ -169,7 +173,9 @@ func main() {
|
||||
adminGroup.PUT("/models/:id", handler.UpdateModel)
|
||||
adminGroup.POST("/bindings", handler.CreateBinding)
|
||||
adminGroup.GET("/bindings", handler.ListBindings)
|
||||
adminGroup.GET("/bindings/:id", handler.GetBinding)
|
||||
adminGroup.PUT("/bindings/:id", handler.UpdateBinding)
|
||||
adminGroup.DELETE("/bindings/:id", handler.DeleteBinding)
|
||||
adminGroup.POST("/sync/snapshot", handler.SyncSnapshot)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user