sqlite

package
v1.4.6 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Overview

Package sqlite extracts RPM package information from SQLite databases.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	Name       string
	Version    string
	Release    string
	SourceNEVR string
	Module     string
	Arch       string
	Digest     string
	Signature  []byte // This is a PGP signature packet.
	DigestAlgo int
	Epoch      int
}

Info is the package information extracted from the RPM header.

type RPMDB

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

RPMDB is a handle to a SQLite RPM database.

func Open

func Open(f string) (*RPMDB, error)

Open opens the named SQLite database and interprets it as an RPM database.

Must be a file on-disk. This is a limitation of the underlying SQLite library.

The returned RPMDB struct must have its Close method called, or the process may panic.

func (*RPMDB) Close

func (db *RPMDB) Close() error

Close releases held resources.

This must be called when the RPMDB is no longer needed, or the process may panic.

func (*RPMDB) Packages

func (db *RPMDB) Packages(ctx context.Context) ([]Info, error)

Packages loads all package headers in the RPMDB and reports [Info]s for each.

Jump to

Keyboard shortcuts

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