scoop

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DetailFieldBin         = "bin"
	DetailFieldDescription = "description"
	DetailFieldVersion     = "version"
	DetailFieldNotes       = "notes"
)

Variables

This section is empty.

Functions

func CachePath

func CachePath(app, version, url string) string

func GetAppsDir

func GetAppsDir() (string, error)

func GetCacheDir

func GetCacheDir() (string, error)

func GetKnownBuckets

func GetKnownBuckets() (map[string]string, error)

GetKnownBuckets returns the list of available "default" buckets that are available, but might have not necessarily been installed locally.

func GetScoopBucketDir

func GetScoopBucketDir() (string, error)

func GetScoopDir

func GetScoopDir() (string, error)

func GetScoopInstallationDir

func GetScoopInstallationDir() (string, error)

Types

type App

type App struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Version     string `json:"version"`
	Notes       string `json:"notes"`

	Bin []string `json:"bin"`
	// contains filtered or unexported fields
}

App represents an application, which may or may not be installed and may or may not be part of a bucket. "Headless" manifests are also a thing, for example when you are using an auto-generated manifest for a version that's not available anymore. In that case, scoop will lose the bucket information.

func GetApp

func GetApp(name string) (*App, error)

func GetAvailableApp

func GetAvailableApp(name string) (*App, error)

func GetInstalledApp

func GetInstalledApp(name string) (*App, error)

func GetInstalledApps

func GetInstalledApps() ([]App, error)

func (*App) LoadDetails

func (a *App) LoadDetails(iter *jsoniter.Iterator, fields ...string) error

LoadDetails will load additional data regarding the manifest, such as description and version information. This causes IO on your drive and therefore isn't done by default.

func (App) ManifestPath

func (a App) ManifestPath() string

type Bucket

type Bucket string

func GetLocalBuckets

func GetLocalBuckets() ([]Bucket, error)

GetLocalBuckets is an API representation of locally installed buckets.

func (Bucket) AvailableApps

func (b Bucket) AvailableApps() ([]App, error)

AvailableApps returns unloaded app manifests. You need to call App.LoadDetails on each one. This allows for optimisation by parallelisation where desired.

func (Bucket) Dir

func (b Bucket) Dir() string

Dir is the bucket directory, which contains the subdirectory "bucket" with the manifests.

func (Bucket) ManifestDir

func (b Bucket) ManifestDir() string

ManifestDir is the directory path of the bucket.

func (Bucket) Name

func (b Bucket) Name() string

Bucket is the directory name of the bucket and therefore name of the bucket.

func (Bucket) Remove

func (b Bucket) Remove() error

Remove removes the bucket, but doesn't unisntall any of its installed applications.

Jump to

Keyboard shortcuts

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