func (s StoreCharmStore) Download(curl *charm.URL, file string, origin Origin) (StoreCharm, ChecksumCheckFn, Origin, error) {
	s.logger.Tracef("Download(%s)", curl)
	archive, err := s.repository.DownloadCharm(curl.String(), file)
	if err != nil {
		if cause := errors.Cause(err); httpbakery.IsDischargeError(cause) || httpbakery.IsInteractionError(cause) {
			return nil, nil, origin, errors.NewUnauthorized(err, "")
		}
		return nil, nil, origin, errors.Trace(err)
	}
	// Ignore the checksum for charm store, as there isn't any information
	// available to us to perform the downloaded checksum.
	return newStoreCharmShim(archive), AlwaysMatchChecksum, origin, nil
}
// Download the charm from the charm store.
Download the charm from the charm store.
// Download the charm from the charm store .
func (s StoreCharmStore) Download(curl *charm.URL, file string, origin Origin) (StoreCharm, ChecksumCheckFn, Origin, error) {
	s.logger.Tracef("Download(%s)", curl)
	archive, err := s.repository.DownloadCharm(curl.String(), file)
	if err != nil {
		if cause := errors.Cause(err); httpbakery.IsDischargeError(cause) || httpbakery.IsInteractionError(cause) {
			return nil, nil, origin, errors.NewUnauthorized(err, "")
		}
		return nil, nil, origin, errors.Trace(err)
	}
	return newStoreCharmShim(archive), AlwaysMatchChecksum, origin, nil
}
func ( s StoreCharmStore ) Download ( curl * charm . URL , file string , origin Origin ) ( StoreCharm , ChecksumCheckFn , Origin , error ) { s . logger . Tracef ( " " , curl ) archive , err := s . repository . DownloadCharm ( curl . String ( ) , file ) if err != nil { if cause := errors . Cause ( err ) ; httpbakery . IsDischargeError ( cause ) || httpbakery . IsInteractionError ( cause ) { return nil , nil , origin , errors . NewUnauthorized ( err , " " ) } return nil , nil , origin , errors . Trace ( err ) } return newStoreCharmShim ( archive ) , AlwaysMatchChecksum , origin , nil }
Download the charm from the charm store.
Download the charm from the charm store .
// Ignore the checksum for charm store, as there isn't any information // available to us to perform the downloaded checksum.