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

Method AppGet

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

Source from the content-addressed store, hash-verified

67}
68
69func (s *Server) AppGet(c *stdapi.Context) error {
70 if err := s.hook("AppGetValidate", c); err != nil {
71 return err
72 }
73
74 name := c.Var("name")
75
76 v, err := s.provider(c).WithContext(c.Context()).AppGet(name)
77 if err != nil {
78 return err
79 }
80
81 if vs, ok := interface{}(v).(Sortable); ok {
82 sort.Slice(v, vs.Less)
83 }
84
85 return c.RenderJSON(v)
86}
87
88func (s *Server) AppList(c *stdapi.Context) error {
89 if err := s.hook("AppListValidate", c); err != nil {

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected