alpm

package module
v2.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2024 License: MIT Imports: 7 Imported by: 29

README

go-alpm

go-alpm is a Go package for binding libalpm. With go-alpm, it becomes possible to manipulate the Pacman databases and packages just as Pacman would.

This project is MIT Licensed. See LICENSE for details.

Getting started

  • Import the go-alpm repository in your go script
	import "github.com/Jguer/go-alpm/v2"

Current Maintainers

  • Morganamilo
  • Jguer

Original Contributors

  • Mike Rosset
  • Dave Reisner
  • Rémy Oudompheng
  • Jesus Alvarez

Documentation

Overview

Package alpm implements Go bindings to the libalpm library used by Pacman, the Arch Linux package manager. Libalpm allows the creation of custom front ends to the Arch Linux package ecosystem.

Libalpm does not include support for the Arch User Repository (AUR).

Index

Constants

This section is empty.

Variables

View Source
var DefaultLogLevel = LogWarning

Functions

func DefaultLogCallback

func DefaultLogCallback(ctx interface{}, lvl LogLevel, s string)

func VerCmp

func VerCmp(v1, v2 string) int

VerCmp performs version comparison according to Pacman conventions. Return value is <0 if and only if v1 is older than v2.

func Version

func Version() string

Version returns libalpm version string.

Types

type BackupFile

type BackupFile struct {
	Name string
	Hash string
}

type BackupList

type BackupList struct {
	// contains filtered or unexported fields
}

func (BackupList) Empty

func (l BackupList) Empty() bool

func (BackupList) ForEach

func (l BackupList) ForEach(f func(BackupFile) error) error

func (BackupList) Len

func (l BackupList) Len() int

func (BackupList) Slice

func (l BackupList) Slice() (slice []BackupFile)

type DB

type DB struct {
	// contains filtered or unexported fields
}

DB structure representing a alpm database.

func (*DB) AddServer

func (db *DB) AddServer(server string)

AddServers adds a string to the server list.

func (*DB) Name

func (db *DB) Name() string

Name returns name of the db

func (*DB) Pkg

func (db *DB) Pkg(name string) IPackage

Name searches a package in db.

func (*DB) PkgCache

func (db *DB) PkgCache() IPackageList

PkgCache returns the list of packages of the database

func (*DB) Search

func (db *DB) Search(targets []string) IPackageList

Search returns a list of packages matching the targets. In case of error the Package List will be nil

func (*DB) Servers

func (db *DB) Servers() []string

Servers returns host server URL.

func (*DB) SetServers

func (db *DB) SetServers(servers []string)

SetServers sets server list to use.

func (*DB) SetUsage

func (db *DB) SetUsage(usage Usage)

SetUsage sets the Usage of the database

func (*DB) Unregister

func (db *DB) Unregister() error

type DBList

type DBList struct {
	// contains filtered or unexported fields
}

DBList structure representing a alpm database list.

func (*DBList) Append added in v2.2.1

func (l *DBList) Append(db IDB)

Append modifies a DB list by appending the given DB.

func (DBList) Empty

func (l DBList) Empty() bool

func (DBList) FindGroupPkgs

func (l DBList) FindGroupPkgs(name string) IPackageList

PkgCachebyGroup returns a PackageList of packages belonging to a group

func (DBList) FindSatisfier

func (l DBList) FindSatisfier(depstring string) (IPackage, error)

FindSatisfier searches a DBList for a package that satisfies depstring Example "glibc>=2.12"

func (DBList) ForEach

func (l DBList) ForEach(f func(IDB) error) error

ForEach executes an action on each DB.

func (DBList) Len

func (l DBList) Len() int

func (DBList) Slice

func (l DBList) Slice() []IDB

Slice converts DB list to DB slice.

type DepMod

type DepMod uint

Dependency constraint types.

const (
	DepModAny DepMod = iota + 1 // Any version.
	DepModEq                    // Specific version.
	DepModGE                    // Test for >= some version.
	DepModLE                    // Test for <= some version.
	DepModGT                    // Test for > some version.
	DepModLT                    // Test for < some version.
)

func (DepMod) String

func (mod DepMod) String() string

type Depend

type Depend struct {
	Name        string
	Version     string
	Description string
	NameHash    uint
	Mod         DepMod
}

Depend provides a description of a dependency.

func (Depend) String

func (dep Depend) String() string

type DependList

type DependList struct {
	// contains filtered or unexported fields
}

DependList describes a linkedlist of dependency type packages.

func (DependList) Empty

func (l DependList) Empty() bool

func (DependList) ForEach

func (l DependList) ForEach(f func(*Depend) error) error

ForEach executes an action on each package of the DependList.

func (DependList) Len

func (l DependList) Len() int

func (DependList) Slice

func (l DependList) Slice() []Depend

Slice converts the DependList to a Depend Slice.

type Error

type Error C.alpm_errno_t

The Error type represents error codes from libalpm.

func (Error) Error

func (er Error) Error() string

The string representation of an error is given by C function alpm_strerror().

type File

type File struct {
	Name string
	Size int64
	Mode uint32
}

File provides a description of package files.

type Handle

type Handle struct {
	// contains filtered or unexported fields
}

Handle contains the pointer to the alpm handle

func Initialize

func Initialize(root, dbpath string) (*Handle, error)

Init initializes alpm handle

func (*Handle) AddArchitecture added in v2.0.6

func (h *Handle) AddArchitecture(str string) error

func (*Handle) AddAssumeInstalled

func (h *Handle) AddAssumeInstalled(dep Depend) error

func (*Handle) AddCacheDir

func (h *Handle) AddCacheDir(hookDir string) error

func (*Handle) AddHookDir

func (h *Handle) AddHookDir(hookDir string) error

func (*Handle) AddIgnoreGroup

func (h *Handle) AddIgnoreGroup(hookDir string) error

func (*Handle) AddIgnorePkg

func (h *Handle) AddIgnorePkg(hookDir string) error

func (*Handle) AddNoExtract

func (h *Handle) AddNoExtract(hookDir string) error

func (*Handle) AddNoUpgrade

func (h *Handle) AddNoUpgrade(hookDir string) error

func (*Handle) AssumeInstalled

func (h *Handle) AssumeInstalled() (IDependList, error)

use alpm_depend_t

func (*Handle) CacheDirs

func (h *Handle) CacheDirs() (StringList, error)

func (*Handle) CheckSpace

func (h *Handle) CheckSpace() (bool, error)

func (*Handle) DBExt

func (h *Handle) DBExt() (string, error)

func (*Handle) DBPath

func (h *Handle) DBPath() (string, error)

func (*Handle) GPGDir

func (h *Handle) GPGDir() (string, error)

func (*Handle) GetArchitectures added in v2.0.6

func (h *Handle) GetArchitectures() (StringList, error)

func (*Handle) GetDefaultSigLevel

func (h *Handle) GetDefaultSigLevel() (SigLevel, error)

func (*Handle) GetLocalFileSigLevel

func (h *Handle) GetLocalFileSigLevel() (SigLevel, error)

func (*Handle) GetRemoteFileSigLevel

func (h *Handle) GetRemoteFileSigLevel() (SigLevel, error)

func (*Handle) HookDirs

func (h *Handle) HookDirs() (StringList, error)

func (*Handle) IgnoreGroups

func (h *Handle) IgnoreGroups() (StringList, error)

func (*Handle) IgnorePkgs

func (h *Handle) IgnorePkgs() (StringList, error)

func (*Handle) LastError

func (h *Handle) LastError() error

LastError gets the last pm_error

func (*Handle) LocalDB

func (h *Handle) LocalDB() (IDB, error)

LocalDB returns the local database relative to the given handle.

func (*Handle) Lockfile

func (h *Handle) Lockfile() (string, error)

func (*Handle) LogFile

func (h *Handle) LogFile() (string, error)

func (*Handle) MatchNoExtract

func (h *Handle) MatchNoExtract(dir string) (bool, error)

func (*Handle) MatchNoUpgrade

func (h *Handle) MatchNoUpgrade(dir string) (bool, error)

func (*Handle) NewDBList added in v2.2.1

func (h *Handle) NewDBList() IDBList

NewDBList returns a new empty DB list.

func (*Handle) NoExtracts

func (h *Handle) NoExtracts() (StringList, error)

func (*Handle) NoUpgrades

func (h *Handle) NoUpgrades() (StringList, error)

func (*Handle) RegisterSyncDB

func (h *Handle) RegisterSyncDB(dbname string, siglevel SigLevel) (IDB, error)

RegisterSyncDB Loads a sync database with given name and signature check level.

func (*Handle) Release

func (h *Handle) Release() error

Release releases the alpm handle

func (*Handle) RemoveArchitecture added in v2.0.6

func (h *Handle) RemoveArchitecture(str string) (bool, error)

func (*Handle) RemoveCacheDir

func (h *Handle) RemoveCacheDir(dir string) (bool, error)

func (*Handle) RemoveHookDir

func (h *Handle) RemoveHookDir(dir string) (bool, error)

func (*Handle) RemoveIgnoreGroup

func (h *Handle) RemoveIgnoreGroup(dir string) (bool, error)

func (*Handle) RemoveIgnorePkg

func (h *Handle) RemoveIgnorePkg(dir string) (bool, error)

func (*Handle) RemoveNoExtract

func (h *Handle) RemoveNoExtract(dir string) (bool, error)

func (*Handle) RemoveNoUpgrade

func (h *Handle) RemoveNoUpgrade(dir string) (bool, error)

func (*Handle) Root

func (h *Handle) Root() (string, error)

func (*Handle) SetArchitectures added in v2.0.6

func (h *Handle) SetArchitectures(str []string) error

func (*Handle) SetCacheDirs

func (h *Handle) SetCacheDirs(hookDirs []string) error

func (*Handle) SetCheckSpace

func (h *Handle) SetCheckSpace(value bool) error

func (*Handle) SetDBExt

func (h *Handle) SetDBExt(str string) error

func (*Handle) SetDefaultSigLevel

func (h *Handle) SetDefaultSigLevel(siglevel SigLevel) error

func (*Handle) SetGPGDir

func (h *Handle) SetGPGDir(str string) error

func (*Handle) SetHookDirs

func (h *Handle) SetHookDirs(hookDirs []string) error

func (*Handle) SetIgnoreGroups

func (h *Handle) SetIgnoreGroups(hookDirs []string) error

func (*Handle) SetIgnorePkgs

func (h *Handle) SetIgnorePkgs(hookDirs []string) error

func (*Handle) SetLocalFileSigLevel

func (h *Handle) SetLocalFileSigLevel(siglevel SigLevel) error

func (*Handle) SetLogCallback

func (h *Handle) SetLogCallback(cb logCallbackSig, ctx interface{})

func (*Handle) SetLogFile

func (h *Handle) SetLogFile(str string) error

func (*Handle) SetNoExtracts

func (h *Handle) SetNoExtracts(hookDirs []string) error

func (*Handle) SetNoUpgrades

func (h *Handle) SetNoUpgrades(hookDirs []string) error

func (*Handle) SetQuestionCallback

func (h *Handle) SetQuestionCallback(cb questionCallbackSig, ctx interface{})

func (*Handle) SetRemoteFileSigLevel

func (h *Handle) SetRemoteFileSigLevel(siglevel SigLevel) error

func (*Handle) SetUseSyslog

func (h *Handle) SetUseSyslog(value bool) error

func (*Handle) SyncDBByName

func (h *Handle) SyncDBByName(name string) (db IDB, err error)

SyncDBByName finds a registered database by name.

func (*Handle) SyncDBListByDBName added in v2.2.1

func (h *Handle) SyncDBListByDBName(name string) (IDBList, error)

SyncDBListByDBName creates and returns a database list with a single database given by name.

func (*Handle) SyncDBs

func (h *Handle) SyncDBs() (IDBList, error)

SyncDBs returns list of Synced DBs.

func (*Handle) SyncSysupgrade

func (h *Handle) SyncSysupgrade(enableDowngrade bool) error

func (*Handle) TransGetAdd

func (h *Handle) TransGetAdd() PackageList

func (*Handle) TransGetFlags

func (h *Handle) TransGetFlags() (TransFlag, error)

func (*Handle) TransGetRemove

func (h *Handle) TransGetRemove() PackageList

func (*Handle) TransInit

func (h *Handle) TransInit(flags TransFlag) error

func (*Handle) TransRelease

func (h *Handle) TransRelease() error

func (*Handle) UnregisterAllSyncDBs

func (h *Handle) UnregisterAllSyncDBs() error

func (*Handle) UseSyslog

func (h *Handle) UseSyslog() (bool, error)

type IDB

type IDB interface {
	Unregister() error
	// Name returns name of the db
	Name() string
	// Servers returns host server URL.
	Servers() []string
	// SetServers sets server list to use.
	SetServers(servers []string)
	// AddServers adds a string to the server list.
	AddServer(server string)
	// SetUsage sets the Usage of the database
	SetUsage(usage Usage)
	// Name searches a package in db.
	Pkg(name string) IPackage
	// PkgCache returns the list of packages of the database
	PkgCache() IPackageList
	Search([]string) IPackageList
}

IDB is an interface type for alpm.DB.

type IDBList

type IDBList interface {
	// ForEach executes an action on each DB.
	ForEach(func(IDB) error) error
	// Slice converts DB list to DB slice.
	Slice() []IDB
	// Append modifies DB list with given DB appended.
	Append(IDB)
	// PkgCachebyGroup returns a PackageList of packages belonging to a group
	FindGroupPkgs(string) IPackageList
	// FindSatisfier searches a DBList for a package that satisfies depstring
	// Example "glibc>=2.12"
	FindSatisfier(string) (IPackage, error)
}

IDBList interfaces alpm.DBList.

type IDependList added in v2.2.0

type IDependList interface {
	// ForEach executes an action on each package of the DependList.
	ForEach(func(*Depend) error) error
	// Slice converts the DependList to a Depend Slice.
	Slice() []Depend
}

type IPackage

type IPackage interface {
	FileName() string
	Base() string
	Base64Signature() string
	Validation() Validation
	// Architecture returns the package target Architecture.
	Architecture() string
	// Backup returns a list of package backups.
	Backup() BackupList
	// BuildDate returns the BuildDate of the package.
	BuildDate() time.Time
	// Conflicts returns the conflicts of the package as a DependList.
	Conflicts() IDependList
	// DB returns the package's origin database.
	DB() IDB
	// Depends returns the package's dependency list.
	Depends() IDependList
	// Depends returns the package's optional dependency list.
	OptionalDepends() IDependList
	// Depends returns the package's check dependency list.
	CheckDepends() IDependList
	// Depends returns the package's make dependency list.
	MakeDepends() IDependList
	// Description returns the package's description.
	Description() string
	// Files returns the file list of the package.
	Files() []File
	// ContainsFile checks if the path is in the package filelist
	ContainsFile(path string) (File, error)
	// Groups returns the groups the package belongs to.
	Groups() StringList
	// ISize returns the package installed size.
	ISize() int64
	// InstallDate returns the package install date.
	InstallDate() time.Time
	// Licenses returns the package license list.
	Licenses() StringList
	// SHA256Sum returns package SHA256Sum.
	SHA256Sum() string
	// MD5Sum returns package MD5Sum.
	MD5Sum() string
	// Name returns package name.
	Name() string
	// Packager returns package packager name.
	Packager() string
	// Provides returns DependList of packages provides by package.
	Provides() IDependList
	// Reason returns package install reason.
	Reason() PkgReason
	// Origin returns package origin.
	Origin() PkgFrom
	// Replaces returns a DependList with the packages this package replaces.
	Replaces() IDependList
	// Size returns the packed package size.
	Size() int64
	// URL returns the upstream URL of the package.
	URL() string
	// Version returns the package version.
	Version() string
	// ComputeRequiredBy returns the names of reverse dependencies of a package
	ComputeRequiredBy() []string
	// ComputeOptionalFor returns the names of packages that optionally
	// require the given package
	ComputeOptionalFor() []string
	ShouldIgnore() bool

	// SyncNewVersion checks if there is a new version of the
	// package in a given DBlist.
	SyncNewVersion(l IDBList) IPackage

	Type() string
}

IPackage is an interface type for alpm.Package.

type IPackageList

type IPackageList interface {
	// ForEach executes an action on each package of the PackageList.
	ForEach(func(IPackage) error) error
	// Slice converts the PackageList to a Package Slice.
	Slice() []IPackage
	// SortBySize returns a PackageList sorted by size.
	SortBySize() IPackageList
	// FindSatisfier finds a package that satisfies depstring from PkgList
	FindSatisfier(string) (IPackage, error)
}

IPackageList exports the alpm.PackageList symbols.

type LogLevel

type LogLevel uint16
const (
	LogError LogLevel = 1 << iota
	LogWarning
	LogDebug
	LogFunction
)

Logging levels.

type Package

type Package struct {
	// contains filtered or unexported fields
}

Package describes a single package and associated handle.

func (*Package) Architecture

func (pkg *Package) Architecture() string

Architecture returns the package target Architecture.

func (*Package) Backup

func (pkg *Package) Backup() BackupList

Backup returns a list of package backups.

func (*Package) Base

func (pkg *Package) Base() string

func (*Package) Base64Signature

func (pkg *Package) Base64Signature() string

func (*Package) BuildDate

func (pkg *Package) BuildDate() time.Time

BuildDate returns the BuildDate of the package.

func (*Package) CheckDepends

func (pkg *Package) CheckDepends() IDependList

Depends returns the package's check dependency list.

func (*Package) ComputeOptionalFor

func (pkg *Package) ComputeOptionalFor() []string

ComputeOptionalFor returns the names of packages that optionally require the given package

func (*Package) ComputeRequiredBy

func (pkg *Package) ComputeRequiredBy() []string

ComputeRequiredBy returns the names of reverse dependencies of a package

func (*Package) Conflicts

func (pkg *Package) Conflicts() IDependList

Conflicts returns the conflicts of the package as a DependList.

func (*Package) ContainsFile

func (pkg *Package) ContainsFile(path string) (File, error)

ContainsFile checks if the path is in the package filelist

func (*Package) DB

func (pkg *Package) DB() IDB

DB returns the package's origin database.

func (*Package) Depends

func (pkg *Package) Depends() IDependList

Depends returns the package's dependency list.

func (*Package) Description

func (pkg *Package) Description() string

Description returns the package's description.

func (*Package) FileName

func (pkg *Package) FileName() string

func (*Package) Files

func (pkg *Package) Files() []File

Files returns the file list of the package.

func (*Package) Groups

func (pkg *Package) Groups() StringList

Groups returns the groups the package belongs to.

func (*Package) ISize

func (pkg *Package) ISize() int64

ISize returns the package installed size.

func (*Package) InstallDate

func (pkg *Package) InstallDate() time.Time

InstallDate returns the package install date.

func (*Package) Licenses

func (pkg *Package) Licenses() StringList

Licenses returns the package license list.

func (*Package) MD5Sum

func (pkg *Package) MD5Sum() string

MD5Sum returns package MD5Sum.

func (*Package) MakeDepends

func (pkg *Package) MakeDepends() IDependList

Depends returns the package's make dependency list.

func (*Package) Name

func (pkg *Package) Name() string

Name returns package name.

func (*Package) OptionalDepends

func (pkg *Package) OptionalDepends() IDependList

Depends returns the package's optional dependency list.

func (*Package) Origin

func (pkg *Package) Origin() PkgFrom

Origin returns package origin.

func (*Package) Packager

func (pkg *Package) Packager() string

Packager returns package packager name.

func (*Package) Provides

func (pkg *Package) Provides() IDependList

Provides returns DependList of packages provides by package.

func (*Package) Reason

func (pkg *Package) Reason() PkgReason

Reason returns package install reason.

func (*Package) Replaces

func (pkg *Package) Replaces() IDependList

Replaces returns a DependList with the packages this package replaces.

func (*Package) SHA256Sum

func (pkg *Package) SHA256Sum() string

SHA256Sum returns package SHA256Sum.

func (*Package) ShouldIgnore

func (pkg *Package) ShouldIgnore() bool

func (*Package) Size

func (pkg *Package) Size() int64

Size returns the packed package size.

func (*Package) SyncNewVersion

func (pkg *Package) SyncNewVersion(l IDBList) IPackage

SyncNewVersion checks if there is a new version of the package in a given DBlist.

func (*Package) Type

func (pkg *Package) Type() string

func (*Package) URL

func (pkg *Package) URL() string

URL returns the upstream URL of the package.

func (*Package) Validation

func (pkg *Package) Validation() Validation

func (*Package) Version

func (pkg *Package) Version() string

Version returns the package version.

type PackageList

type PackageList struct {
	// contains filtered or unexported fields
}

PackageList describes a linked list of packages and associated handle.

func (PackageList) Empty

func (l PackageList) Empty() bool

func (PackageList) FindSatisfier

func (l PackageList) FindSatisfier(depstring string) (IPackage, error)

FindSatisfier finds a package that satisfies depstring from PkgList

func (PackageList) ForEach

func (l PackageList) ForEach(f func(IPackage) error) error

ForEach executes an action on each package of the PackageList.

func (PackageList) Len

func (l PackageList) Len() int

func (PackageList) Slice

func (l PackageList) Slice() []IPackage

Slice converts the PackageList to a Package Slice.

func (PackageList) SortBySize

func (l PackageList) SortBySize() IPackageList

SortBySize returns a PackageList sorted by size.

type PkgFrom

type PkgFrom uint

Source of a package structure.

const (
	FromFile PkgFrom = iota + 1
	FromLocalDB
	FromSyncDB
)

type PkgReason

type PkgReason uint

Install reason of a package.

const (
	PkgReasonExplicit PkgReason = 0
	PkgReasonDepend   PkgReason = 1
)

func (PkgReason) String

func (r PkgReason) String() string

type QuestionAny

type QuestionAny struct {
	// contains filtered or unexported fields
}

func (QuestionAny) Answer

func (question QuestionAny) Answer() bool

func (QuestionAny) QuestionInstallIgnorepkg

func (question QuestionAny) QuestionInstallIgnorepkg() (QuestionInstallIgnorepkg, error)

func (QuestionAny) QuestionReplace

func (question QuestionAny) QuestionReplace() (QuestionReplace, error)

func (QuestionAny) QuestionSelectProvider

func (question QuestionAny) QuestionSelectProvider() (QuestionSelectProvider, error)

func (QuestionAny) SetAnswer

func (question QuestionAny) SetAnswer(answer bool)

func (QuestionAny) Type

func (question QuestionAny) Type() QuestionType

type QuestionInstallIgnorepkg

type QuestionInstallIgnorepkg struct {
	// contains filtered or unexported fields
}

func (QuestionInstallIgnorepkg) Install

func (question QuestionInstallIgnorepkg) Install() bool

func (QuestionInstallIgnorepkg) Pkg

func (question QuestionInstallIgnorepkg) Pkg(h *Handle) IPackage

func (QuestionInstallIgnorepkg) SetInstall

func (question QuestionInstallIgnorepkg) SetInstall(install bool)

func (QuestionInstallIgnorepkg) Type

func (question QuestionInstallIgnorepkg) Type() QuestionType

type QuestionReplace

type QuestionReplace struct {
	// contains filtered or unexported fields
}

func (QuestionReplace) NewPkg

func (question QuestionReplace) NewPkg(h *Handle) IPackage

func (QuestionReplace) OldPkg

func (question QuestionReplace) OldPkg(h *Handle) IPackage

func (QuestionReplace) Replace

func (question QuestionReplace) Replace() bool

func (QuestionReplace) SetReplace

func (question QuestionReplace) SetReplace(replace bool)

func (QuestionReplace) Type

func (question QuestionReplace) Type() QuestionType

type QuestionSelectProvider

type QuestionSelectProvider struct {
	// contains filtered or unexported fields
}

func (QuestionSelectProvider) Dep

func (question QuestionSelectProvider) Dep() *Depend

func (QuestionSelectProvider) Providers

func (question QuestionSelectProvider) Providers(h *Handle) IPackageList

func (QuestionSelectProvider) SetUseIndex

func (question QuestionSelectProvider) SetUseIndex(index int)

func (QuestionSelectProvider) Type

func (question QuestionSelectProvider) Type() QuestionType

func (QuestionSelectProvider) UseIndex

func (question QuestionSelectProvider) UseIndex() int

type QuestionType

type QuestionType uint
const (
	QuestionTypeInstallIgnorepkg QuestionType = 1 << iota
	QuestionTypeReplacePkg
	QuestionTypeConflictPkg
	QuestionTypeCorruptedPkg
	QuestionTypeRemovePkgs
	QuestionTypeSelectProvider
	QuestionTypeImportKey
)

type SigLevel

type SigLevel int

Signature checking level.

const (
	SigPackage SigLevel = 1 << iota
	SigPackageOptional
	SigPackageMarginalOk
	SigPackageUnknownOk
)
const (
	SigDatabase SigLevel = 1 << (10 + iota)
	SigDatabaseOptional
	SigDatabaseMarginalOk
	SigDatabaseUnknownOk
)
const SigUseDefault SigLevel = 1 << 30

type SigStatus

type SigStatus int

Signature status.

const (
	SigStatusValid SigStatus = iota
	SigStatusKeyExpired
	SigStatusSigExpired
	SigStatusKeyUnknown
	SigStatusKeyDisabled
)

type StringList

type StringList struct {
	// contains filtered or unexported fields
}

func (StringList) Empty

func (l StringList) Empty() bool

func (StringList) ForEach

func (l StringList) ForEach(f func(string) error) error

func (StringList) Len

func (l StringList) Len() int

func (StringList) Slice

func (l StringList) Slice() []string

type TransFlag

type TransFlag int
const (
	TransFlagNoDeps TransFlag = 1 << iota
	TransFlagForce
	TransFlagNoSave
	TransFlagNoDepVersion
	TransFlagCascade
	TransFlagRecurse

	TransFlagDBOnly
	TransFlagAllDeps
	TransFlagDownloadOnly
	TransFlagNoScriptlets

	TransFlagNoConflicts
	TransFlagNeeded
	TransFlagAllExplicit
	TransFlagUnneeded
	TransFlagRecurseAll
	TransFlagNoLock
)

type Usage

type Usage int
const (
	UsageSync Usage = 1 << iota
	UsageSearch
	UsageInstall
	UsageUpgrade
	UsageAll = (1 << 4) - 1
)

type Validation

type Validation int
const (
	ValidationNone Validation = 1 << iota
	ValidationMD5Sum
	ValidationSHA256Sum
	ValidationSignature
	ValidationUnkown Validation = 0
)

Jump to

Keyboard shortcuts

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