misc

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const ModuleAtTop = ModuleShortName("{top}")

Never used in a tag.

View Source
const ModuleUnknown = ModuleShortName("{unknown}")

Variables

This section is empty.

Functions

This section is empty.

Types

type LaModule

type LaModule interface {
	// ShortName is the module's name without the repo.
	ShortName() ModuleShortName

	// ImportPath is the relative path below the Go src root,
	// which is the same path as would be used to
	// import the module.
	ImportPath() string

	// AbsPath is the absolute path to the module's
	// go.mod file on the local file system.
	AbsPath() string

	// Latest version tagged locally.
	VersionLocal() semver.SemVer

	// Latest version tagged remotely.
	VersionRemote() semver.SemVer

	// Does this module depend on the argument, and
	// if so at what version?
	DependsOn(LaModule) (bool, semver.SemVer)

	// GetReplacements returns a list of replacements.
	GetReplacements() []string
}

type LaRepository

type LaRepository interface {
	// RepoPath is the import of the of repository,
	// e.g. github.com/kubernetes-sigs/kustomize
	// The directory {srcRoot}/{importPath} should contain a
	// dotGit directory.
	// This directory might be a Go module, or contain directories
	// that are Go modules, or both.
	RepoPath() string

	// AbsPath is the full local filesystem path.
	AbsPath() string

	// FindModule returns a module or nil.
	FindModule(ModuleShortName) LaModule
}

type LesModules

type LesModules []LaModule

func (LesModules) Apply

func (s LesModules) Apply(f ModFunc) error

func (LesModules) Find

func (s LesModules) Find(target ModuleShortName) LaModule

func (LesModules) GetAllThatDependOn

func (s LesModules) GetAllThatDependOn(
	target LaModule) (result TaggedModules)

func (LesModules) InternalDeps

func (s LesModules) InternalDeps(
	target LaModule) (result TaggedModules)

func (LesModules) LenLongestName

func (s LesModules) LenLongestName() (ans int)

type ModFunc

type ModFunc func(LaModule) error

ModFunc is a function accepting a module, and returning an error.

type ModuleShortName

type ModuleShortName string

ModuleShortName is the in-repo path to the directory holding the module (holding the go.mod file). It's the unique in-repo name of the module. It's the name used to tag the repo at a particular module version. E.g. "" (empty), "kyaml", "cmd/config", "plugin/example/whatever".

func (ModuleShortName) Depth

func (m ModuleShortName) Depth() int

type TaggedModule

type TaggedModule struct {
	M LaModule
	V semver.SemVer
}

TaggedModule is a module known to be tagged with the given version.

func (TaggedModule) String

func (p TaggedModule) String() string

type TaggedModules

type TaggedModules []TaggedModule

func (TaggedModules) LenLongestString

func (s TaggedModules) LenLongestString() (ans int)

func (TaggedModules) String

func (s TaggedModules) String() string

type TrackedRepo

type TrackedRepo string

TrackedRepo identifies a git remote repository.

type VersionMap

type VersionMap map[ModuleShortName]semver.Versions

VersionMap holds the versions associated with modules.

func (VersionMap) Latest

func (m VersionMap) Latest(
	n ModuleShortName) semver.SemVer

func (VersionMap) Report

func (m VersionMap) Report()

Jump to

Keyboard shortcuts

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