librariesindex
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Index¶
- Variables
- type Dependency
- type Index
- func (idx *Index) FindIndexedLibrary(lib *libraries.Library) *Library
- func (idx *Index) FindLibraryUpdate(lib *libraries.Library) *Release
- func (idx *Index) FindRelease(name string, version *semver.Version) (*Release, error)
- func (idx *Index) ResolveDependencies(lib *Release, overrides []*Release) []*Release
- type Library
- type Release
Constants¶
This section is empty.
Variables¶
var EmptyIndex = &Index{Libraries: map[string]*Library{}}EmptyIndex is an empty library index
Functions¶
This section is empty.
Types¶
typeDependency¶
type Dependency struct {NamestringVersionConstraintsemver.Constraint}Dependency is a library dependency
func (*Dependency)GetConstraint¶
func (r *Dependency) GetConstraint()semver.Constraint
GetConstraint returns the version Constraint of the dependecy
func (*Dependency)GetName¶
func (r *Dependency) GetName()string
GetName returns the name of the dependency
typeIndex¶
Index represents the list of libraries available for download
func (*Index)FindIndexedLibrary¶
FindIndexedLibrary search an indexed library that matches the providedinstalled library or nil if not found
func (*Index)FindLibraryUpdate¶
FindLibraryUpdate check if an installed library may be updated usingone of the indexed libraries. This function returns the Release to installto update the library if found, otherwise nil is returned.
func (*Index)FindRelease¶
FindRelease search a library Release in the index. Returns nil if therelease is not found. If the version is not specified returns the latestversion available.
func (*Index)ResolveDependencies¶
ResolveDependencies resolve the dependencies of a library release and returns apossible solution (the set of library releases to install together with the library).An optional "override" releases may be passed if we want to exclude the samelibraries from the index (for example if we want to keep an installed library).
typeLibrary¶
type Library struct {NamestringReleases map[semver.NormalizedString]*ReleaseLatest *Release `json:"-"`Index *Index `json:"-"`}Library is a library available for download
typeRelease¶
type Release struct {AuthorstringVersion *semver.VersionDependencies []*DependencyMaintainerstringSentencestringParagraphstringWebsitestringCategorystringArchitectures []stringTypes []stringResource *resources.DownloadResourceLicensestringProvidesIncludes []stringLibrary *Library `json:"-"`}Release is a release of a library available for download
func (*Release)GetDependencies¶
func (r *Release) GetDependencies() []*Dependency
GetDependencies returns the dependencies of this library.
func (*Release)GetVersion¶
GetVersion returns the version of this library.
func (*Release)ToRPCLibraryRelease¶
func (r *Release) ToRPCLibraryRelease() *rpc.LibraryRelease
ToRPCLibraryRelease transform this Release into a rpc.LibraryRelease