MCPcopy Create free account
hub / github.com/convox/rack / SystemResourceUnlink

Method SystemResourceUnlink

pkg/api/controllers.go:1416–1434  ·  view source on GitHub ↗
(c *stdapi.Context)

Source from the content-addressed store, hash-verified

1414}
1415
1416func (s *Server) SystemResourceUnlink(c *stdapi.Context) error {
1417 if err := s.hook("SystemResourceUnlinkValidate", c); err != nil {
1418 return err
1419 }
1420
1421 name := c.Var("name")
1422 app := c.Var("app")
1423
1424 v, err := s.provider(c).WithContext(c.Context()).SystemResourceUnlink(name, app)
1425 if err != nil {
1426 return err
1427 }
1428
1429 if vs, ok := interface{}(v).(Sortable); ok {
1430 sort.Slice(v, vs.Less)
1431 }
1432
1433 return c.RenderJSON(v)
1434}
1435
1436func (s *Server) SystemResourceUpdate(c *stdapi.Context) error {
1437 if err := s.hook("SystemResourceUpdateValidate", c); err != nil {

Callers

nothing calls this directly

Calls 6

hookMethod · 0.95
providerMethod · 0.95
ContextMethod · 0.80
SliceMethod · 0.80
SystemResourceUnlinkMethod · 0.65
WithContextMethod · 0.65

Tested by

no test coverage detected