Adding an API for fetching module data from a CDN (#25)

* Adding an API for fetching module data from a CDN

* Moving the CDN interface to its own package under ./pkg

It replaces all of the read interfaces
This commit is contained in:
Aaron Schlesinger
2018-03-02 12:42:48 -08:00
committed by Brian Ketelsen
parent c6426fb60a
commit 8432a76b1f
+12
View File
@@ -0,0 +1,12 @@
package cdn
// Getter gets the details about a given baseURL/module at vsn and returns
// the base URL of the module metadata & content:
//
// - {baseURL}/{module}/@v/list
// - {baseURL}/{module}/@v/{version}.info
// - {baseURL}/{module}/@v/{version}.mod
// - {baseURL}/{module}/@v/{version}.zip
type Getter interface {
Get(baseURL, module, vsn string) (string, error)
}