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

Method BuildImport

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

Source from the content-addressed store, hash-verified

241}
242
243func (s *Server) BuildImport(c *stdapi.Context) error {
244 if err := s.hook("BuildImportValidate", c); err != nil {
245 return err
246 }
247
248 app := c.Var("app")
249 r := c
250
251 v, err := s.provider(c).WithContext(c.Context()).BuildImport(app, r)
252 if err != nil {
253 return err
254 }
255
256 if vs, ok := interface{}(v).(Sortable); ok {
257 sort.Slice(v, vs.Less)
258 }
259
260 return c.RenderJSON(v)
261}
262
263func (s *Server) BuildList(c *stdapi.Context) error {
264 if err := s.hook("BuildListValidate", c); err != nil {

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected