(c *stdapi.Context)
| 893 | } |
| 894 | |
| 895 | func (s *Server) RegistryAdd(c *stdapi.Context) error { |
| 896 | if err := s.hook("RegistryAddValidate", c); err != nil { |
| 897 | return err |
| 898 | } |
| 899 | |
| 900 | server := c.Value("server") |
| 901 | username := c.Value("username") |
| 902 | password := c.Value("password") |
| 903 | |
| 904 | v, err := s.provider(c).WithContext(c.Context()).RegistryAdd(server, username, password) |
| 905 | if err != nil { |
| 906 | return err |
| 907 | } |
| 908 | |
| 909 | if vs, ok := interface{}(v).(Sortable); ok { |
| 910 | sort.Slice(v, vs.Less) |
| 911 | } |
| 912 | |
| 913 | return c.RenderJSON(v) |
| 914 | } |
| 915 | |
| 916 | func (s *Server) RegistryList(c *stdapi.Context) error { |
| 917 | if err := s.hook("RegistryListValidate", c); err != nil { |
nothing calls this directly
no test coverage detected