func (ba *PackageArchive) DownloadArchiveInfo(tracer trace.Tracer, packageName string, version string) (string, error) {
	trace := tracer.BeginSection("Downloading birdwatcher archive info")
	defer trace.End()

	key := archive.FormKey(packageName, version)
	if _, ok := ba.localManifests[key]; !ok {
		ba.localManifests[key] = &localManifest{}
	}

	if ba.localManifests[key].manifestString == "" {
		trace.AppendDebugf("Cannot find manifest with key: %v in localManifests, downloading from remote.", key)
		resp, err := ba.facadeClient.GetManifest(
			&ssm.GetManifestInput{
				PackageName:    &packageName,
				PackageVersion: &version,
			},
		)

		if err != nil {
			return "", fmt.Errorf("failed to retrieve manifest: %v", err)
		}

		ba.localManifests[key].manifestString = *resp.Manifest
	} else {
		trace.AppendDebugf("Found manifest with key: %v in localManifests", key)
	}

	return ba.localManifests[key].manifestString, nil
}
// DownloadArtifactInfo downloads the manifest for the original birwatcher service
DownloadArtifactInfo downloads the manifest for the original birwatcher service
// DownloadArtifactInfo downloads the manifest for the original birwatcher service
func (ba *PackageArchive) DownloadArchiveInfo(tracer trace.Tracer, packageName string, version string) (string, error) {
	trace := tracer.BeginSection("Downloading birdwatcher archive info")
	defer trace.End()
	key := archive.FormKey(packageName, version)
	if _, ok := ba.localManifests[key]; !ok {
		ba.localManifests[key] = &localManifest{}
	}
	if ba.localManifests[key].manifestString == "" {
		trace.AppendDebugf("Cannot find manifest with key: %v in localManifests, downloading from remote.", key)
		resp, err := ba.facadeClient.GetManifest(
			&ssm.GetManifestInput{
				PackageName:    &packageName,
				PackageVersion: &version,
			},
		)
		if err != nil {
			return "", fmt.Errorf("failed to retrieve manifest: %v", err)
		}
		ba.localManifests[key].manifestString = *resp.Manifest
	} else {
		trace.AppendDebugf("Found manifest with key: %v in localManifests", key)
	}
	return ba.localManifests[key].manifestString, nil
}
func ( ba * PackageArchive ) DownloadArchiveInfo ( tracer trace . Tracer , packageName string , version string ) ( string , error ) { trace := tracer . BeginSection ( " " ) defer trace . End ( ) key := archive . FormKey ( packageName , version ) if _ , ok := ba . localManifests [ key ] ; ! ok { ba . localManifests [ key ] = & localManifest { } } if ba . localManifests [ key ] . manifestString == " " { trace . AppendDebugf ( " " , key ) resp , err := ba . facadeClient . GetManifest ( & ssm . GetManifestInput { PackageName : & packageName , PackageVersion : & version , } , ) if err != nil { return " " , fmt . Errorf ( " " , err ) } ba . localManifests [ key ] . manifestString = * resp . Manifest } else { trace . AppendDebugf ( " " , key ) } return ba . localManifests [ key ] . manifestString , nil }
DownloadArtifactInfo downloads the manifest for the original birwatcher service
DownloadArtifactInfo downloads the manifest for the original birwatcher service