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

Method SystemResourceLink

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

Source from the content-addressed store, hash-verified

1360}
1361
1362func (s *Server) SystemResourceLink(c *stdapi.Context) error {
1363 if err := s.hook("SystemResourceLinkValidate", c); err != nil {
1364 return err
1365 }
1366
1367 name := c.Var("name")
1368 app := c.Value("app")
1369
1370 v, err := s.provider(c).WithContext(c.Context()).SystemResourceLink(name, app)
1371 if err != nil {
1372 return err
1373 }
1374
1375 if vs, ok := interface{}(v).(Sortable); ok {
1376 sort.Slice(v, vs.Less)
1377 }
1378
1379 return c.RenderJSON(v)
1380}
1381
1382func (s *Server) SystemResourceList(c *stdapi.Context) error {
1383 if err := s.hook("SystemResourceListValidate", c); err != nil {

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected