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

Method ResourceList

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

Source from the content-addressed store, hash-verified

1055}
1056
1057func (s *Server) ResourceList(c *stdapi.Context) error {
1058 if err := s.hook("ResourceListValidate", c); err != nil {
1059 return err
1060 }
1061
1062 app := c.Var("app")
1063
1064 v, err := s.provider(c).WithContext(c.Context()).ResourceList(app)
1065 if err != nil {
1066 return err
1067 }
1068
1069 if vs, ok := interface{}(v).(Sortable); ok {
1070 sort.Slice(v, vs.Less)
1071 }
1072
1073 return c.RenderJSON(v)
1074}
1075
1076func (s *Server) ServiceList(c *stdapi.Context) error {
1077 if err := s.hook("ServiceListValidate", c); err != nil {

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected