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

Method SystemResourceList

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

Source from the content-addressed store, hash-verified

1380}
1381
1382func (s *Server) SystemResourceList(c *stdapi.Context) error {
1383 if err := s.hook("SystemResourceListValidate", c); err != nil {
1384 return err
1385 }
1386
1387 v, err := s.provider(c).WithContext(c.Context()).SystemResourceList()
1388 if err != nil {
1389 return err
1390 }
1391
1392 if vs, ok := interface{}(v).(Sortable); ok {
1393 sort.Slice(v, vs.Less)
1394 }
1395
1396 return c.RenderJSON(v)
1397}
1398
1399func (s *Server) SystemResourceTypes(c *stdapi.Context) error {
1400 if err := s.hook("SystemResourceTypesValidate", c); err != nil {

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected