Documentation
¶
Index ¶
Constants ¶
View Source
const DownloadTimeout = 5 * time.Minute
Variables ¶
This section is empty.
Functions ¶
func VerifyHashFromDigest ¶
Types ¶
type ArtifactExtraction ¶ added in v0.1.0
type ArtifactExtraction struct {
Ecosystem string `json:"ecosystem"`
PackageName string `json:"package_name"`
TarballFilename string `json:"tarball_filename,omitempty"`
Files map[string]string `json:"files"`
ArtifactURL string `json:"artifact_url,omitempty"`
Verified bool `json:"verified"`
VerifyError *string `json:"verify_error,omitempty"`
SkipReason *string `json:"skip_reason,omitempty"`
}
ArtifactExtraction holds the manifest/text files extracted from a package artifact, along with hash-verification status.
type ExtractionResult ¶
func StreamExtractAndVerify ¶
func StreamExtractAndVerify(ctx context.Context, dist *models.DistributionInfo, filename, ecosystem string) (*ExtractionResult, error)
type StreamResult ¶
type StreamResult struct {
Body io.ReadCloser
ContentType string
}
func StreamDownload ¶
func StreamDownload(ctx context.Context, url string) (*StreamResult, error)
Click to show internal directories.
Click to hide internal directories.