Documentation ¶
Index ¶
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 ¶
type Dependency ¶
type Dependency struct { Name string VersionConstraint semver.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
type Index ¶
Index represents the list of libraries available for download
func (*Index) FindIndexedLibrary ¶
FindIndexedLibrary search an indexed library that matches the provided installed library or nil if not found
func (*Index) FindLibraryUpdate ¶
FindLibraryUpdate check if an installed library may be updated using one of the indexed libraries. This function returns the Release to install to update the library if found, otherwise nil is returned.
func (*Index) FindRelease ¶
FindRelease search a library Release in the index. Returns nil if the release is not found. If the version is not specified returns the latest version available.
func (*Index) ResolveDependencies ¶
ResolveDependencies returns the dependencies of a library release.
type Library ¶
type Library struct { Name string Releases map[semver.NormalizedString]*Release Latest *Release `json:"-"` Index *Index `json:"-"` }
Library is a library available for download
type Reference ¶
type Reference struct { Name string // The name of the parsed item. Version *semver.Version // The Version of the parsed item. }
Reference uniquely identify a Library in the library index
type Release ¶
type Release struct { Author string Version *semver.Version Dependencies []semver.Dependency Maintainer string Sentence string Paragraph string Website string Category string Architectures []string Types []string Resource *resources.DownloadResource License string ProvidesIncludes []string Library *Library `json:"-"` }
Release is a release of a library available for download
func (*Release) GetDependencies ¶
func (r *Release) GetDependencies() []semver.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