Documentation ¶
Index ¶
- func BackupAndDeleteGitClone(config *configuration.Config, repoMeta *Repo) error
- func GenerateLibraryFromRepo(repo *Repository) (*metadata.LibraryMetadata, error)
- func RepoURLValid(url string) bool
- func RunAntiVirus(folder string) ([]byte, error)
- func RunArduinoLint(arduinoLintPath string, folder string, metadata *Repo) ([]byte, error)
- func UpdateLibrary(release *db.Release, repoURL string, libraryDb *db.DB) error
- type GitURLsError
- type Repo
- type ReposByURL
- type Repository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BackupAndDeleteGitClone ¶ added in v1.1.3
func BackupAndDeleteGitClone(config *configuration.Config, repoMeta *Repo) error
BackupAndDeleteGitClone backs up and then deletes the library's Git clone folder.
func GenerateLibraryFromRepo ¶
func GenerateLibraryFromRepo(repo *Repository) (*metadata.LibraryMetadata, error)
GenerateLibraryFromRepo parses a repository and returns the library metadata.
func RepoURLValid ¶
RepoURLValid returns whether the given URL has a valid format.
func RunAntiVirus ¶
RunAntiVirus scans the folder for viruses.
func RunArduinoLint ¶
RunArduinoLint runs Arduino Lint on the library and returns the report in the event of error or warnings.
Types ¶
type GitURLsError ¶
type GitURLsError struct {
Repos []*Repo
}
GitURLsError is the type for the unknown or unsupported repositories data.
func (GitURLsError) Error ¶
func (err GitURLsError) Error() string
type Repo ¶
Repo is the type for the library repository data.
func ListRepos ¶
ListRepos returns a filtered list of library registry entries loaded from the given data file.
func LoadRepoListFromFile ¶
LoadRepoListFromFile returns an unfiltered list of library registry entries loaded from the given data file.
type ReposByURL ¶
type ReposByURL []*Repo
ReposByURL is the type for the libraries repository data.
func (ReposByURL) Len ¶
func (r ReposByURL) Len() int
func (ReposByURL) Less ¶
func (r ReposByURL) Less(i, j int) bool
func (ReposByURL) Swap ¶
func (r ReposByURL) Swap(i, j int)
type Repository ¶
Repository represents a Git repository located on the filesystem.
func CloneOrFetch ¶
func CloneOrFetch(repoMeta *Repo, folderName string) (*Repository, error)
CloneOrFetch returns a Repository object. If the repository is already present, it is opened. Otherwise, cloned.