pacman

package
v0.23.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppEnvironVar = "CTIROOT"
	AppUserDir    = ".cti"
)
View Source
const (
	RAMLExt = ".raml"
)

Variables

This section is empty.

Functions

func GetCtiPackagesCacheDir added in v0.22.0

func GetCtiPackagesCacheDir() (string, error)

func GetRootDir added in v0.22.0

func GetRootDir() (string, error)

Types

type CachedDependencyInfo added in v0.22.0

type CachedDependencyInfo struct {
	Path      string
	Source    string
	Version   string
	Integrity string
	Index     ctipackage.Index
}

type Option added in v0.22.0

type Option func(*packageManager)

func WithPackagesCache added in v0.22.0

func WithPackagesCache(cacheDir string) Option

func WithStorage added in v0.22.0

func WithStorage(st storage.Storage) Option

type PackageIntegrityInfo added in v0.22.0

type PackageIntegrityInfo struct {
	Source  string `json:"Source"`
	Version string `json:"Version"`
	Hash    string `json:"Hash"`
}

func (*PackageIntegrityInfo) Read added in v0.22.0

func (inf *PackageIntegrityInfo) Read(pm *packageManager, pkgId string, version string) error

func (*PackageIntegrityInfo) Write added in v0.22.0

func (inf *PackageIntegrityInfo) Write(pm *packageManager, pkgId string, version string) error

type PackageManager

type PackageManager interface {
	// Add new dependencies to index.lock
	Add(pkg *ctipackage.Package, depends map[string]string) error
	// Install dependencies from index.lock
	Install(pkg *ctipackage.Package) error
	// Download dependencies and their sub-dependencies
	Download(depends map[string]string) ([]CachedDependencyInfo, error)
}

func New

func New(options ...Option) (PackageManager, error)

type SourceIntegrityInfo added in v0.22.0

type SourceIntegrityInfo struct {
	Version string         `json:"Version"`
	Time    string         `json:"Time"`
	Origin  storage.Origin `json:"Origin"`
}

func (*SourceIntegrityInfo) Read added in v0.22.0

func (inf *SourceIntegrityInfo) Read(pm *packageManager, source string, version string) error

func (*SourceIntegrityInfo) Write added in v0.22.0

func (inf *SourceIntegrityInfo) Write(pm *packageManager, source string, version string) error

Jump to

Keyboard shortcuts

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