(c *stdapi.Context)
| 1055 | } |
| 1056 | |
| 1057 | func (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 | |
| 1076 | func (s *Server) ServiceList(c *stdapi.Context) error { |
| 1077 | if err := s.hook("ServiceListValidate", c); err != nil { |
nothing calls this directly
no test coverage detected