// Find all apps func (r Apps) Get(c *echo.Context, s *dokku.Dokku) error { // fields := strings.Split(c.Param("fields"), ",") apps, err := s.Apps.FindAll() if err != nil { return err } return c.JSONIndent(http.StatusOK, apps, "", " ") }
// Find one app func (r App) Get(c *echo.Context, s *dokku.Dokku) error { name := c.P(0) app, err := s.Apps.Find(name) if err != nil { return err } if app == nil { return c.NoContent(http.StatusNotFound) } return c.JSONIndent(http.StatusOK, app, "", " ") }
func raw(c *echo.Context) error { globalData.Calculate() return c.JSONIndent(200, globalData, "", " ") }
func update(c *echo.Context) error { globalData.UpdateDB(true) globalData.Calculate() return c.JSONIndent(200, globalData, "", " ") }