documentarchive

package
v0.0.0-...-0117b6e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Overview

Package documentarchive contains the struct that is called when the package information is stored in birdwatcher

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(facadeClientSession facade.BirdwatcherFacade) archive.IPackageArchive

constructors New is a constructor for PackageArchive struct

func NewDocumentArchive

func NewDocumentArchive(facadeClientSession facade.BirdwatcherFacade, attachmentsContent []*ssm.AttachmentContent, docDescription *ssm.DocumentDescription, cache packageservice.ManifestCache, manifestStr string) archive.IPackageArchive

NewDocumentArchive is a constructor for PackageArchive struct (meant for testing)

Types

type PackageArchive

type PackageArchive struct {
	// contains filtered or unexported fields
}

func (*PackageArchive) DeleteCachedManifest

func (da *PackageArchive) DeleteCachedManifest(packageArn string, version string) error

func (*PackageArchive) DownloadArchiveInfo

func (da *PackageArchive) DownloadArchiveInfo(tracer trace.Tracer, packageName string, version string) (string, error)

DownloadArtifactInfo downloads the document using GetDocument and eventually gets the manifest from that and returns it

func (*PackageArchive) GetFileDownloadLocation

func (da *PackageArchive) GetFileDownloadLocation(file *archive.File, packageName string, version string) (string, error)

GetFileDownloadLocation obtains the location of the file in the archive in the document archive, this information is stored in the attachmentContent field in the reult of GetDocument.

func (*PackageArchive) GetResourceArn

func (da *PackageArchive) GetResourceArn(packageName string, version string) string

GetResourceArn returns the document Arn required for storing the file. This is found in the response of GetDocument.

func (*PackageArchive) GetResourceVersion

func (da *PackageArchive) GetResourceVersion(packageName string, packageVersion string) (name string, version string)

getters GetResourceVersion makes a call to birdwatcher API to figure the right version of the resource that needs to be installed

func (*PackageArchive) Name

func (da *PackageArchive) Name() string

Name of archive type

func (*PackageArchive) ReadManifestFromCache

func (da *PackageArchive) ReadManifestFromCache(packageArn string, version string) (*birdwatcher.Manifest, error)

ReadManifestFromCache reads the manifest that was stored in manifestCache, if present Document packages store the manifest with the document version

func (*PackageArchive) SetManifestCache

func (da *PackageArchive) SetManifestCache(manifestCache packageservice.ManifestCache)

SetManifestCache sets the manifest Cache

func (*PackageArchive) SetResource

func (da *PackageArchive) SetResource(packageName string, version string, manifest *birdwatcher.Manifest)

setters SetPackageName sets the document arn. The manifest and version is not required since we use the document name and document version

func (*PackageArchive) WriteManifestToCache

func (da *PackageArchive) WriteManifestToCache(packageArn string, version string, manifest []byte) error

WriteManifestToCache stores the manifest in manifestCache

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL