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

Method ObjectList

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

Source from the content-addressed store, hash-verified

678}
679
680func (s *Server) ObjectList(c *stdapi.Context) error {
681 if err := s.hook("ObjectListValidate", c); err != nil {
682 return err
683 }
684
685 app := c.Var("app")
686 prefix := c.Value("prefix")
687
688 v, err := s.provider(c).WithContext(c.Context()).ObjectList(app, prefix)
689 if err != nil {
690 return err
691 }
692
693 if vs, ok := interface{}(v).(Sortable); ok {
694 sort.Slice(v, vs.Less)
695 }
696
697 return c.RenderJSON(v)
698}
699
700func (s *Server) ObjectStore(c *stdapi.Context) error {
701 if err := s.hook("ObjectStoreValidate", c); err != nil {

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected