docs: add commands overview

This commit is contained in:
 Ilya Atamas
2019-04-18 15:18:55 +03:00
parent 3aab5ffc47
commit 6abde80d35
2 changed files with 37 additions and 6 deletions

View File

@@ -6,7 +6,7 @@ import (
"strings"
)
// GetMetadata returns NPM response for a given package path
// GetMetadata returns cached NPM response for a given package path
func (proxy Proxy) GetMetadata(name string, originalPath string, header http.Header) ([]byte, error) {
options, err := proxy.GetOptions()
if err != nil {
@@ -67,7 +67,7 @@ func (proxy Proxy) GetMetadata(name string, originalPath string, header http.Hea
return []byte(pkg), nil
}
// ListMetadata returns a list of all cached packages
// ListMetadata returns list of all cached packages
func (proxy Proxy) ListMetadata() ([]string, error) {
options, err := proxy.GetOptions()
if err != nil {
@@ -87,7 +87,7 @@ func (proxy Proxy) ListMetadata() ([]string, error) {
return deprefixedMetadata, nil
}
// Purge deletes all cached packages
// PurgeMetadata deletes all cached packages
func (proxy Proxy) PurgeMetadata() error {
options, err := proxy.GetOptions()
if err != nil {