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

Method ObjectStore

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

Source from the content-addressed store, hash-verified

698}
699
700func (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
726func (s *Server) ProcessExec(c *stdapi.Context) error {
727 if err := s.hook("ProcessExecValidate", c); err != nil {

Callers

nothing calls this directly

Calls 7

hookMethod · 0.95
providerMethod · 0.95
RequestMethod · 0.80
ContextMethod · 0.80
SliceMethod · 0.80
ObjectStoreMethod · 0.65
WithContextMethod · 0.65

Tested by

no test coverage detected