ssms3

package
v0.0.0-...-a9ed6da Latest Latest
Warning

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

Go to latest
Published: May 7, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EndpointHolder represent placeholder for S3 endpoint
	EndpointHolder = "{Endpoint}"

	// RegionHolder represents placeholder for region
	RegionHolder = "{Region}"

	// PlatformHolder represents placeholder for platform
	PlatformHolder = "{Platform}"

	// ArchHolder represents placeholder for Arch
	ArchHolder = "{Arch}"

	// PackageNameFormat represents the package name format based
	PackageNameFormat = "{PackageName}.zip"

	// PackageURLStandard represents the s3 folder where all versions of a package live
	// the url to a specific package has a format like https://s3.us-east-1.amazonaws.com/amazon-ssm-packages-us-east-1/Packages/Test/windows/amd64/1.0.0/Test.zip
	PackageURLStandard = "https://{Endpoint}/amazon-ssm-packages-{Region}/BirdwatcherPackages/{PackageName}/{Platform}/{Arch}"

	// PackageURLBeta is the s3 location for ad-hoc testing by package developers
	PackageURLBeta = "https://s3.amazonaws.com/amazon-ssm-packages-beta/BirdwatcherPackages/{PackageName}/{Platform}/{Arch}"

	// PackageURLGamma is the s3 location for internal pre-production testing
	PackageURLGamma = "https://s3.amazonaws.com/amazon-ssm-packages-us-east-1-gamma/BirdwatcherPackages/{PackageName}/{Platform}/{Arch}"

	// PackageNameSuffix represents (when concatenated with the correct package url) the s3 location of a specific version of a package
	PackageNameSuffix = "/{PackageVersion}/" + PackageNameFormat

	// PatternVersion represents the regular expression for validating version
	PatternVersion = "^(?:(\\d+)\\.)(?:(\\d+)\\.)(\\d+)$"

	// ActiveServiceURL is the s3 object whose presence indicates the SSMS3 service implementation should be used
	ActiveServiceURL      = "https://{Endpoint}/amazon-ssm-packages-{Region}/active-birdwatcher-fallback"
	ActiveServiceURLBeta  = "https://s3.amazonaws.com/amazon-ssm-packages-beta/active-birdwatcher-fallback"
	ActiveServiceURLGamma = "https://s3.amazonaws.com/amazon-ssm-packages-us-east-1-gamma/active-birdwatcher-fallback"
)

Variables

This section is empty.

Functions

func UseSSMS3Service

func UseSSMS3Service(tracer trace.Tracer, repository string, region string) bool

UseSSMS3Service checks for existence of the active service indicator file. If the file has been removed, it indicates that the new package service should be used

Types

type PackageService

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

func New

func New(repository string, region string) *PackageService

func (*PackageService) DownloadArtifact

func (ds *PackageService) DownloadArtifact(tracer trace.Tracer, packageName string, version string) (string, error)

func (*PackageService) DownloadManifest

func (ds *PackageService) DownloadManifest(tracer trace.Tracer, packageName string, version string) (string, string, bool, error)

DownloadManifest looks up the latest version of a given package for this platform/arch in S3 or manifest at source location

func (*PackageService) PackageServiceName

func (ds *PackageService) PackageServiceName() string

func (*PackageService) ReportResult

func (*PackageService) ReportResult(tracer trace.Tracer, result packageservice.PackageResult) error

type SSMS3Mock

type SSMS3Mock struct {
	mock.Mock
}

networkMock

func (*SSMS3Mock) CanGetS3Object

func (ds *SSMS3Mock) CanGetS3Object(log log.T, amazonS3URL s3util.AmazonS3URL) bool

func (*SSMS3Mock) Download

func (ds *SSMS3Mock) Download(log log.T, input artifact.DownloadInput) (artifact.DownloadOutput, error)

func (*SSMS3Mock) ListS3Folders

func (ds *SSMS3Mock) ListS3Folders(log log.T, amazonS3URL s3util.AmazonS3URL) (folderNames []string, err error)

Jump to

Keyboard shortcuts

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