Documentation ¶
Overview ¶
Package pkg defines a generic software package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ID ¶
type ID struct { // Type, Name, and Revision describe _what_ package is being identified. The // combination of these three fields uniquely identifies a single package on // a semantic level. Type Type Name string Revision string // Location is _where_ the package is found. For example, an NPM package with // the same name and revision may be found in two different registries. Location string }
An ID uniquely identifies a package.
type Import ¶
An Import is a combination of a (potentially unresolved) dependency target and the exact resolved pkg.ID of the dependency.
type LicenseExpr ¶
type LicenseExpr string
A LicenseExpr is a raw string containing a SPDX-like license expression.
LicenseExprs are not exactly the same as SPDX expressions, because they may contain license identifiers that are not valid SPDX licenses.
type Package ¶
A Package represents a single package at a semantic level. The precise definition of "package" will vary from language to language.
type Type ¶
type Type int
The Type of a Package indicates the ecosystem of the package. Generally, this corresponds to tool, registry, or language.
const ( Ant Type // Apache Ant (https://ant.apache.org) Bower // Bower (https://bower.io) Buck // Buck (https://buckbuild.com) Bazel // Bazel (https://bazel.build/) Carthage // Carthage (https://github.com/Carthage/Carthage) Clojure // Clojure (https://clojure.org) Cocoapods // Cocoapods (https://cocoapods.org) Composer // Composer (https://getcomposer.org) Debian // Debian (https://manpages.debian.org/stretch/dpkg/dpkg.1.en.html) Go // dep (https://github.com/golang/dep), glide (https://github.com/Masterminds/glide), godep (https://github.com/tools/godep), govendor (experimental, https://github.com/kardianos/govendor), vndr (https://github.com/LK4D4/vndr), gomodules (https://github.com/golang/go/wiki/Modules) Git // git Gradle // Gradle (https://gradle.org) Haskell // Haskell with cabal-install (https://www.haskell.org/cabal/) or stack (https://www.haskellstack.org/) Maven // Maven (https://maven.apache.org) NodeJS // NPM (https://www.npmjs.com), Yarn (https://yarnpkg.com) NuGet // NuGet (https://www.nuget.org) OkBuck // OkBuck (https://github.com/uber/okbuck) Python // Pip (https://pip.pypa.io), Pipenv (https://pipenv.readthedocs.io/en/latest/) RPM // RPM https://rpm.org/ Ruby // Bundler (https://bundler.io) Rust // Cargo (https://github.com/rust-lang/cargo) Scala // SBT (https://www.scala-sbt.org) Raw // Unsupported languages )
Supported package types.
func ParseType ¶
ParseType returns the canonical package type given a string key. TODO: if we got rid of aliases, we could use `go generate` with https://github.com/alvaroloes/enumer.