base

package
v0.4.1-k8s Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2018 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImportedPackage

type ImportedPackage struct {
	// Required. The package path, not necessarily the project root.
	Name string

	// Required. Text representing a revision or tag.
	LockHint string

	// Optional. Alternative source, or fork, for the project.
	Source string

	// Optional. Text representing a branch or version.
	ConstraintHint string
}

ImportedPackage is a common intermediate representation of a package imported from an external tool's configuration.

type Importer

type Importer struct {
	SourceManager gps.SourceManager
	Logger        *log.Logger
	Verbose       bool
	Manifest      *dep.Manifest
	Lock          *dep.Lock
}

Importer provides a common implementation for importing from other dependency managers.

func NewImporter

func NewImporter(logger *log.Logger, verbose bool, sm gps.SourceManager) *Importer

NewImporter creates a new Importer for embedding in an importer.

func (*Importer) ImportPackages

func (i *Importer) ImportPackages(packages []ImportedPackage, defaultConstraintFromLock bool)

ImportPackages loads imported packages into the manifest and lock.

  • defaultConstraintFromLock specifies if a constraint should be defaulted based on the locked version when there wasn't a constraint hint.

Rules: * When a constraint is ignored, default to *. * HEAD revisions default to the matching branch. * Semantic versions default to ^VERSION. * Revision constraints are ignored. * Versions that don't satisfy the constraint, drop the constraint. * Untagged revisions ignore non-branch constraint hints.

Jump to

Keyboard shortcuts

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