database

package
Version: v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsErrPackageNotFound

func IsErrPackageNotFound(err error) bool

Types

type Database

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

func Load

func Load(dbPath string) (*Database, error)

func (*Database) Package

func (d *Database) Package(name string) (vanity.Package, error)

func (*Database) PackageJSON

func (d *Database) PackageJSON(name string) (pkg []byte, err error)

func (*Database) Packages

func (d *Database) Packages() (pkgs []vanity.Package, err error)

func (*Database) PutPackage

func (d *Database) PutPackage(pkg vanity.Package) error

func (*Database) RemovePackage

func (d *Database) RemovePackage(name string) error

type ErrPackageNotFound

type ErrPackageNotFound struct {
	Name string
}

func (ErrPackageNotFound) Error

func (e ErrPackageNotFound) Error() string

Jump to

Keyboard shortcuts

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