Update go cli (#13717)

### What problem does this PR solve?

Go cli

### Type of change

- [x] New Feature (non-breaking change which adds functionality)

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
Jin Hai
2026-03-24 20:08:36 +08:00
committed by GitHub
parent d84b688b91
commit b308cd3a02
28 changed files with 3239 additions and 955 deletions

View File

@@ -67,9 +67,12 @@ func (r *Router) Setup(engine *gin.Engine) {
protected.GET("/users/:username/agents", r.handler.GetUserAgents)
// API Keys
protected.GET("/users/:username/keys", r.handler.GetUserAPIKeys)
protected.POST("/users/:username/keys", r.handler.GenerateUserAPIKey)
protected.DELETE("/users/:username/keys/:key", r.handler.DeleteUserAPIKey)
protected.GET("/users/:username/keys", r.handler.ListUserAPITokens)
protected.GET("/users/:username/tokens", r.handler.ListUserAPITokens)
protected.POST("/users/:username/keys", r.handler.GenerateUserAPIToken)
protected.POST("/users/:username/tokens", r.handler.GenerateUserAPIToken)
protected.DELETE("/users/:username/keys/:token", r.handler.DeleteUserAPIToken)
protected.DELETE("/users/:username/tokens/:token", r.handler.DeleteUserAPIToken)
// Role management
protected.GET("/roles", r.handler.ListRoles)