(c *stdapi.Context)
| 698 | } |
| 699 | |
| 700 | func (s *Server) ObjectStore(c *stdapi.Context) error { |
| 701 | if err := s.hook("ObjectStoreValidate", c); err != nil { |
| 702 | return err |
| 703 | } |
| 704 | |
| 705 | app := c.Var("app") |
| 706 | key := c.Var("key") |
| 707 | r := c |
| 708 | |
| 709 | var opts structs.ObjectStoreOptions |
| 710 | if err := stdapi.UnmarshalOptions(c.Request(), &opts); err != nil { |
| 711 | return err |
| 712 | } |
| 713 | |
| 714 | v, err := s.provider(c).WithContext(c.Context()).ObjectStore(app, key, r, opts) |
| 715 | if err != nil { |
| 716 | return err |
| 717 | } |
| 718 | |
| 719 | if vs, ok := interface{}(v).(Sortable); ok { |
| 720 | sort.Slice(v, vs.Less) |
| 721 | } |
| 722 | |
| 723 | return c.RenderJSON(v) |
| 724 | } |
| 725 | |
| 726 | func (s *Server) ProcessExec(c *stdapi.Context) error { |
| 727 | if err := s.hook("ProcessExecValidate", c); err != nil { |
nothing calls this directly
no test coverage detected