Documentation ¶
Index ¶
- Constants
- func UseSSMS3Service(tracer trace.Tracer, repository string, region string) bool
- type PackageService
- func (ds *PackageService) DownloadArtifact(tracer trace.Tracer, packageName string, version string) (string, error)
- func (ds *PackageService) DownloadManifest(tracer trace.Tracer, packageName string, version string) (string, string, bool, error)
- func (ds *PackageService) PackageServiceName() string
- func (*PackageService) ReportResult(tracer trace.Tracer, result packageservice.PackageResult) error
- type SSMS3Mock
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 ¶
Types ¶
type PackageService ¶
type PackageService struct {
// contains filtered or unexported fields
}
func New ¶
func New(repository string, region string) *PackageService
func (*PackageService) DownloadArtifact ¶
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 ¶
networkMock
func (*SSMS3Mock) CanGetS3Object ¶
func (*SSMS3Mock) Download ¶
func (ds *SSMS3Mock) Download(log log.T, input artifact.DownloadInput) (artifact.DownloadOutput, error)
func (*SSMS3Mock) ListS3Folders ¶
Click to show internal directories.
Click to hide internal directories.