Documentation
¶
Overview ¶
Package ppa manages Private Package Archives sources list. It enables adding and removing a PPA on a system.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasePPA ¶
type BasePPA struct { *imagedefinition.PPA // contains filtered or unexported fields }
BasePPA holds fields and methods common to every PPAPrivateInterface implementation
type Deb822PPA ¶
type Deb822PPA struct {
BasePPA
}
Deb822PPA implements behaviors to manage PPA in the deb822 format, specifically: - write in a <ppa>.sources file, in the deb822 format - embed the signing key in the file itself
func (*Deb822PPA) FileContent ¶
type LegacyPPA ¶
type LegacyPPA struct {
BasePPA
}
LegacyPPA implements behaviors to manage PPA the legacy way, specifically: - write in a sources.list file - manage signing key with gpg in /etc/apt/trusted.gpg.d
func (*LegacyPPA) FileContent ¶
type PPA ¶
type PPA struct {
PPAPrivateInterface
}
PPA is a basic implementation of the PPAPrivateInterface enabling the implementation of common behaviors between LegacyPPA and Deb822PPA
type PPAInterface ¶
type PPAInterface interface { Add(basePath string, debug bool) error Remove(basePath string) error }
PPAInterface is the only interface that should be used outside of this package. It defines the behavior of a PPA.
func New ¶
func New(imageDefPPA *imagedefinition.PPA, deb822 bool, series string) PPAInterface
New instantiates the proper PPA implementation based on the deb822 flag
type PPAPrivateInterface ¶
type PPAPrivateInterface interface { FullName() string FileName() string FileContent() (string, error) ImportKey(basePath string, debug bool) error Remove(basePath string) error }
PPAPrivateInterface defines internal behavior expected from a PPAInterface implementer. Even though methods are exporter, they are not meant to be used outside of this package.