apt_common

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DBeaverArchiveKeyring []byte

use a fragment so it knows the format.

View Source
var GitHubCliArchiveKeyring []byte
View Source
var GoogleChromeArchiveKeyring []byte
View Source
var HashicorpArchiveKeyring []byte
View Source
var HostOSRelease = sync.OnceValues(func() (*OSRelease, error) {
	file, err := os.Open("/etc/os-release")
	if err != nil {
		return nil, fmt.Errorf("failed to open /etc/os-release: %w", err)
	}
	defer file.Close()
	osRelease, err := ParseOSRelease(file)
	if err != nil {
		return nil, fmt.Errorf("failed to parse /etc/os-release: %w", err)
	}
	return osRelease, nil
})
View Source
var MozillaArchiveKeyring []byte

use a fragment to trick the code because while the url says .gpg, it returns an .asc file

View Source
var SlackArchiveKeyring []byte

use a fragment so it knows the format.

View Source
var VSCodeArchiveKeyring []byte

VSCode uses the binary format, but we keep the text one in the source tree to keep things more human observable however, and convert it to binary on demand.

See: VSCodeArchiveKeyringBinary.

View Source
var VSCodeArchiveKeyringBinary = sync.OnceValue(func() []byte {
	block, err := armor.Decode(bytes.NewReader(VSCodeArchiveKeyring))
	if err != nil {
		panic(err)
	}
	var buf bytes.Buffer
	if _, err := io.Copy(&buf, block.Body); err != nil {
		panic(err)
	}
	return buf.Bytes()
})

Once generator for the binary version of the VSCode archive keyring.

See VSCodeArchiveKeyring.

Functions

func DBeaverInstaller

func DBeaverInstaller() *apt.SourceInstaller

func DpkgHostArchitecture

func DpkgHostArchitecture() string

func GitHubCLIInstaller

func GitHubCLIInstaller() *apt.SourceInstaller

func GoogleChromeInstaller

func GoogleChromeInstaller() *apt.SourceInstaller

func HashicorpDistroFallback

func HashicorpDistroFallback(codename string) string

func HashicorpInstaller

func HashicorpInstaller() *apt.SourceInstaller

func HostOSVersionCodename

func HostOSVersionCodename() string

func MozillaInstaller

func MozillaInstaller() *apt.SourceInstaller

func SlackInstaller

func SlackInstaller() *apt.SourceInstaller

func VSCodeInstaller

func VSCodeInstaller() *