Movatterモバイル変換


[0]ホーム

URL:


librariesindex

package
v1.3.1Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2025 License:GPL-3.0Imports:14Imported by:0

Details

Repository

github.com/arduino/arduino-cli

Links

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

type Index struct {Libraries map[string]*Library}

Index represents the list of libraries available for download

funcLoadIndex

func LoadIndex(indexFile *paths.Path) (*Index,error)

LoadIndex reads a library_index.json and create the corresponding Index

func (*Index)FindIndexedLibrary

func (idx *Index) FindIndexedLibrary(lib *libraries.Library) *Library

FindIndexedLibrary search an indexed library that matches the providedinstalled library or nil if not found

func (*Index)FindLibraryUpdate

func (idx *Index) FindLibraryUpdate(lib *libraries.Library) *Release

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

func (idx *Index) FindRelease(namestring, version *semver.Version) (*Release,error)

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

func (idx *Index) ResolveDependencies(lib *Release, overrides []*Release) []*Release

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

func (*Library)Versions

func (library *Library) Versions() []*semver.Version

Versions returns an array of all versions available of the library

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)GetName

func (r *Release) GetName()string

GetName returns the name of this library.

func (*Release)GetVersion

func (r *Release) GetVersion() *semver.Version

GetVersion returns the version of this library.

func (*Release)String

func (r *Release) String()string

func (*Release)ToRPCLibraryRelease

func (r *Release) ToRPCLibraryRelease() *rpc.LibraryRelease

ToRPCLibraryRelease transform this Release into a rpc.LibraryRelease

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp