Documentation ¶
Overview ¶
Package artifact contains utilities for working downloading files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Artifact ¶
type Artifact struct {
// contains filtered or unexported fields
}
func NewSelfUpdateArtifact ¶
func NewSelfUpdateArtifact(log log.T, appConfig appconfig.SsmagentConfig) *Artifact
func (*Artifact) Download ¶
func (artifact *Artifact) Download(input DownloadInput) (output DownloadOutput, err error)
Download is a generic utility which attempts to download smartly.
func (*Artifact) Uncompress ¶
func (*Artifact) VerifyHash ¶
func (artifact *Artifact) VerifyHash(input DownloadInput, output DownloadOutput) (bool, error)
VerifyHash verifies the hash of the url file as per specified hash algorithm type and its value
type DownloadInput ¶
type DownloadInput struct { SourceURL string DestinationDirectory string SourceChecksums map[string]string }
DownloadInput specifies the input to file download operation
type DownloadOutput ¶
DownloadOutput holds the result of file download operation.
type IArtifact ¶
type IArtifact interface { Download(input DownloadInput) (output DownloadOutput, err error) VerifyHash(input DownloadInput, output DownloadOutput) (bool, error) Uncompress(src, dest string) error }
Click to show internal directories.
Click to hide internal directories.