(c *stdapi.Context)
| 678 | } |
| 679 | |
| 680 | func (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 | |
| 700 | func (s *Server) ObjectStore(c *stdapi.Context) error { |
| 701 | if err := s.hook("ObjectStoreValidate", c); err != nil { |
nothing calls this directly
no test coverage detected