dao

package
v0.39.1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DAO

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

DAO abstracts away the database access

func Open

func Open(stateDir string) (*DAO, error)

Open returns a new DAO at the given state directory

func (*DAO) DeletePackage

func (d *DAO) DeletePackage(pkgRef string) error

DeletePackage removes a package from the DB

func (*DAO) Dump

func (d *DAO) Dump(w io.Writer) error

Dump content of database to w.

func (*DAO) GetPackage

func (d *DAO) GetPackage(pkgRef string) (*Package, error)

GetPackage returns information for a specific package.

func (*DAO) UpdatePackage

func (d *DAO) UpdatePackage(pkgRef string, pkg *Package) error

UpdatePackage Updates the update check time, etag, and the used at time for a package

type Package

type Package struct {
	Etag            string
	UpdateCheckedAt time.Time
}

Package is the package information stored in the DB

Jump to

Keyboard shortcuts

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