dependency

package
v0.0.0-...-bd5852e Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CurlVersionIndex = 1
	CurlDateIndex    = 3
)
View Source
const (
	DotnetReleaseIndexURL = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json"
	DotnetChannelURL      = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/%s/releases.json"
	DotnetLinuxFileRID    = "linux-x64"
	DotnetUbuntuFileRID   = "ubuntu-x64"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

type Asset struct {
	BrowserDownloadUrl string `json:"browser_download_url"`
}

type Bundler

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

func (Bundler) GetAllVersionRefs

func (b Bundler) GetAllVersionRefs() ([]string, error)

func (Bundler) GetDependencyVersion

func (b Bundler) GetDependencyVersion(version string) (DepVersion, error)

func (Bundler) GetReleaseDate

func (b Bundler) GetReleaseDate(version string) (*time.Time, error)

type BundlerRelease

type BundlerRelease struct {
	Version string `json:"number"`
	Date    string `json:"created_at"`
	SHA     string `json:"sha"`
}

type Checksummer

type Checksummer interface {
	VerifyASC(asc, path string, pgpKeys ...string) error
	VerifyMD5(path, md5 string) error
	VerifySHA1(path, sha string) error
	VerifySHA256(path, sha string) error
	VerifySHA512(path, sha string) error
	GetSHA256(path string) (string, error)
	SplitPGPKeys(block string) []string
}

type Composer

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

func (Composer) GetAllVersionRefs

func (c Composer) GetAllVersionRefs() ([]string, error)

func (Composer) GetDependencyVersion

func (c Composer) GetDependencyVersion(version string) (DepVersion, error)

func (Composer) GetReleaseDate

func (c Composer) GetReleaseDate(version string) (*time.Time, error)

type Curl

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

func (Curl) GetAllVersionRefs

func (c Curl) GetAllVersionRefs() ([]string, error)

func (Curl) GetDependencyVersion

func (c Curl) GetDependencyVersion(version string) (DepVersion, error)

func (Curl) GetReleaseDate

func (c Curl) GetReleaseDate(version string) (*time.Time, error)

type CurlRelease

type CurlRelease struct {
	Version string
	Date    time.Time
	Semver  semver.Version
}

type DepFactory

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

func NewCustomDependencyFactory

func NewCustomDependencyFactory(checksum Checksummer, fileSystem FileSystem, githubClient GithubClient, webClient WebClient, licenseRetriever LicenseRetriever, purlGenerator PURLGenerator) DepFactory

func NewDependencyFactory

func NewDependencyFactory(accessToken string) DepFactory

func (DepFactory) NewDependency

func (d DepFactory) NewDependency(name string) (Dependency, error)

func (DepFactory) SupportsDependency

func (d DepFactory) SupportsDependency(name string) bool

type DepVersion

type DepVersion struct {
	Version         string     `json:"version"`
	URI             string     `json:"uri"`
	SHA256          string     `json:"sha256"`
	ReleaseDate     *time.Time `json:"release_date,omitempty"`
	DeprecationDate *time.Time `json:"deprecation_date,omitempty"`
	CPE             string     `json:"cpe"`
	PURL            string     `json:"purl"`
	Licenses        []string   `json:"licenses"`
}

type Dependency

type Dependency interface {
	GetAllVersionRefs() ([]string, error)
	GetDependencyVersion(version string) (DepVersion, error)
	GetReleaseDate(version string) (*time.Time, error)
}

type DotnetASPNETCore

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

func (DotnetASPNETCore) GetAllVersionRefs

func (d DotnetASPNETCore) GetAllVersionRefs() ([]string, error)

func (DotnetASPNETCore) GetDependencyVersion

func (d DotnetASPNETCore) GetDependencyVersion(version string) (DepVersion, error)

func (DotnetASPNETCore) GetReleaseDate

func (d DotnetASPNETCore) GetReleaseDate(version string) (*time.Time, error)

type DotnetChannel

type DotnetChannel struct {
	EOLDate  string                 `json:"eol-date"`
	Releases []DotnetChannelRelease `json:"releases"`
}

type DotnetChannelRelease

type DotnetChannelRelease struct {
	ReleaseDate       string `json:"release-date"`
	ASPNETCoreRuntime struct {
		Version string                     `json:"version"`
		Files   []DotnetChannelReleaseFile `json:"files"`
	} `json:"aspnetcore-runtime"`
	Runtime struct {
		Version string                     `json:"version"`
		Files   []DotnetChannelReleaseFile `json:"files"`
	} `json:"runtime"`
	SDK struct {
		Version string                     `json:"version"`
		Files   []DotnetChannelReleaseFile `json:"files"`
	} `json:"sdk"`
	SDKs []struct {
		Version string                     `json:"version"`
		Files   []DotnetChannelReleaseFile `json:"files"`
	} `json:"sdks"`
}

type DotnetChannelReleaseFile

type DotnetChannelReleaseFile struct {
	Name string `json:"name"`
	RID  string `json:"rid"`
	URL  string `json:"url"`
	Hash string `json:"hash"`
}

type DotnetRuntime

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

func (DotnetRuntime) GetAllVersionRefs

func (d DotnetRuntime) GetAllVersionRefs() ([]string, error)

func (DotnetRuntime) GetDependencyVersion

func (d DotnetRuntime) GetDependencyVersion(version string) (DepVersion, error)

func (DotnetRuntime) GetReleaseDate

func (d DotnetRuntime) GetReleaseDate(version string) (*time.Time, error)

type DotnetSDK

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

func (DotnetSDK) GetAllVersionRefs

func (d DotnetSDK) GetAllVersionRefs() ([]string, error)

func (DotnetSDK) GetDependencyVersion

func (d DotnetSDK) GetDependencyVersion(version string) (DepVersion, error)

func (DotnetSDK) GetReleaseDate

func (d DotnetSDK) GetReleaseDate(version string) (*time.Time, error)

type DotnetVersion

type DotnetVersion struct {
	Version     string
	ReleaseDate string
}

type FileSystem

type FileSystem interface {
	WriteFile(filename, contents string) error
}

type GithubClient

type GithubClient interface {
	GetReleaseTags(org, repo string) ([]internal.GithubRelease, error)
	GetTags(org, repo string) ([]string, error)
	GetReleaseAsset(org, repo, version, filename string) ([]byte, error)
	DownloadReleaseAsset(org, repo, version, filename, outputPath string) (url string, err error)
	DownloadSourceTarball(org, repo, version, outputPath string) (url string, err error)
	GetTagCommit(org, repo, version string) (internal.GithubTagCommit, error)
	GetReleaseDate(org, repo, tag string) (*time.Time, error)
}

type Go

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

func (Go) GetAllVersionRefs

func (g Go) GetAllVersionRefs() ([]string, error)

func (Go) GetDependencyVersion

func (g Go) GetDependencyVersion(version string) (DepVersion, error)

func (Go) GetReleaseDate

func (g Go) GetReleaseDate(version string) (*time.Time, error)

type GoFile

type GoFile struct {
	SHA256 string `json:"sha256"`
	Kind   string `json:"kind"`
}

type GoRelease

type GoRelease struct {
	Version     string `json:"version"`
	ReleaseDate string `json:"release_date"`
}

type GoReleaseWithFiles

type GoReleaseWithFiles struct {
	Version string   `json:"version"`
	Files   []GoFile `json:"files"`
}

type Httpd

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

func (Httpd) GetAllVersionRefs

func (h Httpd) GetAllVersionRefs() ([]string, error)

func (Httpd) GetDependencyVersion

func (h Httpd) GetDependencyVersion(version string) (DepVersion, error)

func (Httpd) GetReleaseDate

func (h Httpd) GetReleaseDate(version string) (*time.Time, error)

type HttpdRelease

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

type ICU

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

func (ICU) GetAllVersionRefs

func (i ICU) GetAllVersionRefs() ([]string, error)

func (ICU) GetDependencyVersion

func (i ICU) GetDependencyVersion(version string) (DepVersion, error)

func (ICU) GetReleaseDate

func (i ICU) GetReleaseDate(version string) (*time.Time, error)

type LicenseRetriever

type LicenseRetriever interface {
	LookupLicenses(dependencyName, sourceURL string) ([]string, error)
}

type Nginx

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

func (Nginx) GetAllVersionRefs

func (n Nginx) GetAllVersionRefs() ([]string, error)

func (Nginx) GetDependencyVersion

func (n Nginx) GetDependencyVersion(version string) (DepVersion, error)

func (Nginx) GetReleaseDate

func (n Nginx) GetReleaseDate(version string) (*time.Time, error)

type Node

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

func (Node) GetAllVersionRefs

func (n Node) GetAllVersionRefs() ([]string, error)

func (Node) GetDependencyVersion

func (n Node) GetDependencyVersion(version string) (DepVersion, error)

func (Node) GetReleaseDate

func (n Node) GetReleaseDate(version string) (*time.Time, error)

type NodeRelease

type NodeRelease struct {
	Version string `json:"version"`
	Date    string `json:"date"`
}

type PURLGenerator

type PURLGenerator interface {
	Generate(dependencyName, dependencyVersion, sourceSHA, sourceURL string) string
}

type Pecl

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

func (Pecl) GetAllVersionRefs

func (p Pecl) GetAllVersionRefs() ([]string, error)

func (Pecl) GetDependencyVersion

func (p Pecl) GetDependencyVersion(version string) (DepVersion, error)

func (Pecl) GetReleaseDate

func (p Pecl) GetReleaseDate(version string) (*time.Time, error)

type PeclVersion

type PeclVersion struct {
	Name        string
	Version     string
	ReleaseDate *time.Time
}

type Php

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

func (Php) GetAllVersionRefs

func (p Php) GetAllVersionRefs() ([]string, error)

func (Php) GetDependencyVersion

func (p Php) GetDependencyVersion(version string) (DepVersion, error)

func (Php) GetReleaseDate

func (p Php) GetReleaseDate(version string) (*time.Time, error)

type PhpRawRelease

type PhpRawRelease struct {
	Date   string      `json:"date"`
	Source []PhpSource `json:"source"`
	Museum bool        `json:"museum"`
}

type PhpRelease

type PhpRelease struct {
	Version string
	Date    *time.Time
	Source  []PhpSource
}

type PhpSource

type PhpSource struct {
	Filename string `json:"filename"`
	SHA256   string `json:"sha256"`
	MD5      string `json:"md5"`
}

type PyPi

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

func (PyPi) GetAllVersionRefs

func (p PyPi) GetAllVersionRefs() ([]string, error)

func (PyPi) GetDependencyVersion

func (p PyPi) GetDependencyVersion(version string) (DepVersion, error)

func (PyPi) GetReleaseDate

func (p PyPi) GetReleaseDate(version string) (*time.Time, error)

type PyPiRelease

type PyPiRelease struct {
	Version    string
	URL        string
	SHA256     string
	UploadTime time.Time
}

type Python

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

func (Python) GetAllVersionRefs

func (p Python) GetAllVersionRefs() ([]string, error)

func (Python) GetDependencyVersion

func (p Python) GetDependencyVersion(version string) (DepVersion, error)

func (Python) GetReleaseDate

func (p Python) GetReleaseDate(version string) (*time.Time, error)

type ReleaseSchedule

type ReleaseSchedule map[string]struct {
	End string `json:"end"`
}

type Ruby

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

func (Ruby) GetAllVersionRefs

func (r Ruby) GetAllVersionRefs() ([]string, error)

func (Ruby) GetDependencyVersion

func (r Ruby) GetDependencyVersion(version string) (DepVersion, error)

func (Ruby) GetReleaseDate

func (r Ruby) GetReleaseDate(version string) (*time.Time, error)

type RubyRelease

type RubyRelease struct {
	Version string
	Date    string
}

type Rust

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

func (Rust) GetAllVersionRefs

func (r Rust) GetAllVersionRefs() ([]string, error)

func (Rust) GetDependencyVersion

func (r Rust) GetDependencyVersion(version string) (DepVersion, error)

func (Rust) GetReleaseDate

func (r Rust) GetReleaseDate(version string) (*time.Time, error)

type Tini

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

func (Tini) GetAllVersionRefs

func (t Tini) GetAllVersionRefs() ([]string, error)

func (Tini) GetDependencyVersion

func (t Tini) GetDependencyVersion(version string) (DepVersion, error)

func (Tini) GetReleaseDate

func (t Tini) GetReleaseDate(version string) (*time.Time, error)

type WebClient

type WebClient interface {
	Download(url, outputPath string, options ...internal.RequestOption) error
	Get(url string, options ...internal.RequestOption) ([]byte, error)
}

type Yarn

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

func (Yarn) GetAllVersionRefs

func (y Yarn) GetAllVersionRefs() ([]string, error)

func (Yarn) GetDependencyVersion

func (y Yarn) GetDependencyVersion(version string) (DepVersion, error)

func (Yarn) GetReleaseDate

func (y Yarn) GetReleaseDate(version string) (*time.Time, error)

type YarnRelease

type YarnRelease struct {
	Version string `json:"version"`
	Date    string `json:"date"`
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.
internalfakes
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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