(repositoryURL string)
| 25 | } |
| 26 | |
| 27 | func (client *Client) GetPluginRepository(repositoryURL string) (PluginRepository, error) { |
| 28 | parsedURL, err := url.Parse(repositoryURL) |
| 29 | if err != nil { |
| 30 | return PluginRepository{}, err |
| 31 | } |
| 32 | |
| 33 | parsedURL.Path = strings.TrimSuffix(parsedURL.Path, "/") |
| 34 | if !strings.HasSuffix(parsedURL.Path, "/list") { |
| 35 | parsedURL.Path = path.Join(parsedURL.Path, "list") |
| 36 | } |
| 37 | |
| 38 | request, err := client.newGETRequest(parsedURL.String()) |
| 39 | if err != nil { |
| 40 | return PluginRepository{}, err |
| 41 | } |
| 42 | |
| 43 | var pluginRepository PluginRepository |
| 44 | response := Response{ |
| 45 | Result: &pluginRepository, |
| 46 | } |
| 47 | err = client.connection.Make(request, &response, nil) |
| 48 | if err != nil { |
| 49 | return PluginRepository{}, err |
| 50 | } |
| 51 | |
| 52 | return pluginRepository, nil |
| 53 | } |
nothing calls this directly
no test coverage detected