storage

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InstalledPackage

type InstalledPackage struct {
	Name    string
	Version string
}

type Metadata

type Metadata struct {
	Package     string    `yaml:"package"`
	Version     string    `yaml:"version"`
	Catalog     string    `yaml:"catalog"`
	BinPaths    []string  `yaml:"bin_paths,omitempty"`
	InstalledAt time.Time `yaml:"installed_at"`
	LastUsed    time.Time `yaml:"last_used"`
}

type Store

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

func New

func New(packagesDir string) *Store

func (*Store) BinDirs added in v0.6.0

func (s *Store) BinDirs(name, version string) []string

func (*Store) InstallDir

func (s *Store) InstallDir(name, version string) string

func (*Store) InstalledVersions

func (s *Store) InstalledVersions(pkgName string) []string

func (*Store) IsInstalled

func (s *Store) IsInstalled(name, version string) bool

func (*Store) List

func (s *Store) List() ([]InstalledPackage, error)

func (*Store) ReadMetadata

func (s *Store) ReadMetadata(name, version string) (*Metadata, error)

func (*Store) TouchLastUsed

func (s *Store) TouchLastUsed(name, version string) error

func (*Store) Uninstall

func (s *Store) Uninstall(name, version string) error

func (*Store) WriteMetadata

func (s *Store) WriteMetadata(name, version string, meta Metadata) error

Jump to

Keyboard shortcuts

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