Categorygithub.com/arduino/go-apt-client
modulepackage
0.0.0-20190812130613-5613f843fdc8
Repository: https://github.com/arduino/go-apt-client.git
Documentation: pkg.go.dev

# README

Golang apt client

This is a golang client library for Debian APT Package Manager (dpkg and apt).

License

Copyright (C) 2017 Arduino AG (http://www.arduino.cc/)

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

# Functions

AddRepository adds the specified repository by changing the specified APT config folder (usually /etc/apt).
CheckForUpdates runs an apt update to retrieve new packages available from the repositories.
DistUpgrade upgrades all upgradable packages, it may remove older versions to install newer ones.
EditRepository replace an old repo configuration with a new repo configuration in the specified APT config folder (usually /etc/apt).
Install installs a set of packages.
List returns a list of packages available in the system with their respective status.
ListUpgradable return all the upgradable packages and the version that is going to be installed if an UpgradeAll is performed.
ParseAPTConfigFolder scans an APT config folder (usually /etc/apt) to get information about all configured repositories, it scans also "source.list.d" subfolder to find all the "*.list" files.
Remove removes a set of packages.
RemoveRepository removes a repository from the repository list files found in the specified APT config folder (usually /etc/apt).
Search list packages available in the system that match the search pattern.
Upgrade runs the upgrade for a set of packages.
UpgradeAll upgrade all upgradable packages.

# Structs

Package is a package available in the APT system.
Repository contains metadata about a repository installed in the system.

# Type aliases

RepositoryList is an array of Repository definitions.