(c *stdapi.Context)
| 1380 | } |
| 1381 | |
| 1382 | func (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 | |
| 1399 | func (s *Server) SystemResourceTypes(c *stdapi.Context) error { |
| 1400 | if err := s.hook("SystemResourceTypesValidate", c); err != nil { |
nothing calls this directly
no test coverage detected