github.com/jfrog/jfrog-cli-go@v1.22.1-0.20200318093948-4826ef344ffd/bintray/commands/download.go (about)

     1  package commands
     2  
     3  import (
     4  	"github.com/jfrog/jfrog-cli-go/bintray/utils"
     5  	"github.com/jfrog/jfrog-client-go/bintray"
     6  	"github.com/jfrog/jfrog-client-go/bintray/services"
     7  )
     8  
     9  func DownloadFile(config bintray.Config, params *services.DownloadFileParams) (totalDownloaded, totalFailed int, err error) {
    10  	return utils.DownloadFileFromBintray(config, params)
    11  }
    12  
    13  func DownloadVersion(config bintray.Config, params *services.DownloadVersionParams) (totalDownloaded, totalFailed int, err error) {
    14  	bt, err := bintray.New(config)
    15  	if err != nil {
    16  		return
    17  	}
    18  	totalDownloaded, totalFailed, err = bt.DownloadVersion(params)
    19  	return
    20  }