feat(api): add admin endpoints for binding management

Implement handlers for creating, listing, and updating model bindings.
Register new routes in the admin server group and add DTO definitions.
Update provider handlers to trigger binding synchronization on changes
to ensure upstream mappings remain current.
This commit is contained in:
zenfun
2025-12-17 00:37:02 +08:00
parent 2e3b471533
commit ed6446e586
5 changed files with 190 additions and 2 deletions

13
internal/dto/binding.go Normal file
View File

@@ -0,0 +1,13 @@
package dto
// BindingDTO defines inbound payload for binding creation/update.
// It maps "(namespace, public_model)" to a RouteGroup and an upstream selector.
type BindingDTO struct {
Namespace string `json:"namespace"`
PublicModel string `json:"public_model"`
RouteGroup string `json:"route_group"`
SelectorType string `json:"selector_type"`
SelectorValue string `json:"selector_value"`
Status string `json:"status"`
}