MCPcopy
hub / github.com/koderover/zadig / GetRole

Function GetRole

pkg/microservice/user/core/handler/permission/role.go:418–429  ·  view source on GitHub ↗
(c *gin.Context)

Source from the content-addressed store, hash-verified

416}
417
418func GetRole(c *gin.Context) {
419 ctx := internalhandler.NewContext(c)
420 defer func() { internalhandler.JSONResponse(c, ctx) }()
421
422 projectName := c.Query("namespace")
423 if projectName == "" {
424 ctx.RespErr = e.ErrInvalidParam.AddDesc("args namespace can't be empty")
425 return
426 }
427
428 ctx.Resp, ctx.RespErr = permission.GetRole(projectName, c.Param("name"), ctx.Logger)
429}
430
431func GetRoleTemplate(c *gin.Context) {
432 ctx := internalhandler.NewContext(c)

Callers

nothing calls this directly

Calls 2

GetRoleFunction · 0.92
AddDescMethod · 0.80

Tested by

no test coverage detected