MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / FetchRegistry

Method FetchRegistry

internal/pluginstore/github.go:40–54  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

38}
39
40func (c Client) FetchRegistry(ctx context.Context) (Registry, error) {
41 registryURL := strings.TrimSpace(c.RegistryURL)
42 if registryURL == "" {
43 registryURL = DefaultRegistryURL
44 }
45 data, errDownload := c.get(ctx, registryURL, "application/json", RequestKindRegistry, 0)
46 if errDownload != nil {
47 return Registry{}, errDownload
48 }
49 registry, errParse := ParseRegistry(data)
50 if errParse != nil {
51 return Registry{}, errParse
52 }
53 return registry, nil
54}
55
56// FetchLatestRelease returns the latest published release of the plugin's
57// GitHub repository, mirroring the WebUI panel update check.

Callers 3

fetchSourcedPluginsMethod · 0.45

Calls 2

getMethod · 0.95
ParseRegistryFunction · 0.85

Tested by

no test coverage detected