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

Method BuildGet

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

Source from the content-addressed store, hash-verified

221}
222
223func (s *Server) BuildGet(c *stdapi.Context) error {
224 if err := s.hook("BuildGetValidate", c); err != nil {
225 return err
226 }
227
228 app := c.Var("app")
229 id := c.Var("id")
230
231 v, err := s.provider(c).WithContext(c.Context()).BuildGet(app, id)
232 if err != nil {
233 return err
234 }
235
236 if vs, ok := interface{}(v).(Sortable); ok {
237 sort.Slice(v, vs.Less)
238 }
239
240 return c.RenderJSON(v)
241}
242
243func (s *Server) BuildImport(c *stdapi.Context) error {
244 if err := s.hook("BuildImportValidate", c); err != nil {

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected