packaging

package module
v0.0.0-...-a1d8f0c Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2021 License: LGPL-3.0 Imports: 2 Imported by: 1

README

packaging

A abstraction around different linux packaging systems.

Documentation

Overview

Package packaging abstracts away differences between package managers like apt and yum and allows for easy extension for other package managers/distros.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PackagePreferences

type PackagePreferences struct {
	Path        string // the file the prefs will be written at
	Explanation string // a short explanation for the preference
	Package     string // the name of the package the preference applies to
	Pin         string // a pin on a certain source
	Priority    int    // the priority of that source
}

PackagePreferences is a set of packaging preferences associated to a particular set of packages and repository. On apt-based systems, they are apt_preferences(5) compatible preferences for an apt source. It can be used to override the default priority for the source. Path where the file will be created (usually in /etc/apt/preferences.d/).

func (*PackagePreferences) RenderPreferenceFile

func (p *PackagePreferences) RenderPreferenceFile(fileTemplate *template.Template) (string, error)

RenderPreferenceFile returns contents of the package-manager specific config file of this paritcular package source.

type PackageSource

type PackageSource struct {
	Name string `yaml:"-"`
	URL  string `yaml:"source"`
	Key  string `yaml:"key,omitempty"`
}

PackageSource contains all the data required for a package source.

func (*PackageSource) KeyFileName

func (s *PackageSource) KeyFileName() string

KeyFileName returns the name of this source's keyfile.

func (*PackageSource) RenderSourceFile

func (s *PackageSource) RenderSourceFile(fileTemplate *template.Template) (string, error)

RenderSourceFile renders the current source based on a template it recieves.

Directories

Path Synopsis
Package commands contains an interface which returns common package-manager related commands and the reference implementation for apt and yum-based systems.
Package commands contains an interface which returns common package-manager related commands and the reference implementation for apt and yum-based systems.
The config package defines an interface which returns packaging-related configuration options and operations depending on the desired package-management system.
The config package defines an interface which returns packaging-related configuration options and operations depending on the desired package-management system.
The manager package defines an interface which can carry out numerous package-management related operations on the local system and the respective implementations on apt and yum-based systems.
The manager package defines an interface which can carry out numerous package-management related operations on the local system and the respective implementations on apt and yum-based systems.
testing
This package contains a mock implementation of the manager.PackageManager interface which always returns positive outcomes and a nil error.
This package contains a mock implementation of the manager.PackageManager interface which always returns positive outcomes and a nil error.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL