package agent

import "github.com/gin-gonic/gin"

// RegisterRoutes mounts the six API key management endpoints (plan §2.2) on
// the given group. The caller is responsible for the auth + permission chain
// (human JWT + agent:manage_own_keys), see router.RegisterRoutes.
func (h *Handler) RegisterRoutes(rg *gin.RouterGroup) {
	rg.POST("", h.Create)
	rg.GET("", h.List)
	rg.GET("/:id", h.Get)
	rg.DELETE("/:id", h.Revoke)
	rg.POST("/:id/rotate", h.Rotate)
	rg.GET("/:id/usage", h.Usage)
}
