packages

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DiscoveryQueryParam is the query parameter that is appended to URLs to signal the request is looking for
	// repository information.
	DiscoveryQueryParam = "spread-get=1"

	// DiscoveryMetaName is the the 'name' of the <meta> tag that contains Spread package information.
	DiscoveryMetaName = "spread-ref"

	// DefaultDomain is the domain assumed for packages if one is not given.
	DefaultDomain = "redspread.com"

	// DefaultNamespace is the namespace used if no domain and namespace is given.
	DefaultNamespace = "library"

	// DomainRegexpStr is a regular expression string to validate domains.
	DomainRegexpStr = "^([a-z0-9]+(-[a-z0-9]+)*\\.)+[a-z]{2,}$"
)

Variables

This section is empty.

Functions

func ExpandPackageName

func ExpandPackageName(packageName string) (string, error)

ExpandPackageName returns a retrievable package name for packageName by adding the Redspread domain where a domain isn't specified.

Types

type PackageInfo

type PackageInfo struct {
	// Prefix is the package contained in the repo. It should be an exact match or prefix to the requested package name.
	Prefix string
	// RepoURL is the location of the repository where package data is stored.
	RepoURL string
}

PackageInfo contains the data retrieved in the discovery process.

func DiscoverPackage

func DiscoverPackage(packageName string, insecure, verbose bool) (PackageInfo, error)

DiscoverPackage uses the package name to fetch a Spread URL to the repository. Set insecure when HTTP is allowed. Verbose will print information to STDOUT.

Jump to

Keyboard shortcuts

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