app

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigInfoResult

type ConfigInfoResult struct {
	Path   string
	Exists bool
}

type ConfigService

type ConfigService struct {
	ConfigPath string
	Load       func() (*cfgpkg.File, error)
	Save       func(path string, file *cfgpkg.File) error
}

func (ConfigService) AddPackage

func (s ConfigService) AddPackage(repo, name string, opts install.Options) error

func (ConfigService) ConfigGet

func (s ConfigService) ConfigGet(key string) (any, error)

func (ConfigService) ConfigInfo

func (s ConfigService) ConfigInfo() (ConfigInfoResult, error)

func (ConfigService) ConfigInit

func (s ConfigService) ConfigInit() (string, error)

func (ConfigService) ConfigList

func (s ConfigService) ConfigList() (*cfgpkg.File, error)

func (ConfigService) ConfigSet

func (s ConfigService) ConfigSet(key, value string) error

type InstallExtras

type InstallExtras struct {
	AddToConfig bool
	PackageName string
	PackageOpts install.Options
}

type InstalledLoader

type InstalledLoader interface {
	Load() (*storepkg.Config, error)
}

type InstalledStore

type InstalledStore interface {
	Record(target string, entry storepkg.Entry) error
}

type Installer

type Installer interface {
	InstallTarget(target string, opts install.Options, extras ...InstallExtras) (RunResult, error)
}

type ListItem

type ListItem struct {
	Name         string
	Repo         string
	SourcePath   string
	Target       string
	Tag          string
	Version      string
	InstalledTag string
	Installed    bool
	InstalledAt  time.Time
	Asset        string
	URL          string
	IsGUI        bool
	InstallMode  string
}

type ListService

type ListService struct {
	LoadConfig    func() (*cfgpkg.File, error)
	LoadInstalled func() (*storepkg.Config, error)
	LatestTag     func(repo, sourcePath string) (string, error)
}

func (ListService) FindPackage added in v1.5.1

func (s ListService) FindPackage(name string) (*ListItem, error)

func (ListService) ListGUIPackages added in v1.5.2

func (s ListService) ListGUIPackages(all bool) ([]ListItem, error)

func (ListService) ListInstalledPackages added in v1.5.2

func (s ListService) ListInstalledPackages() ([]ListItem, error)

func (ListService) ListOutdatedPackages added in v1.5.1

func (s ListService) ListOutdatedPackages() ([]OutdatedItem, []OutdatedCheckFailure, int, error)

func (ListService) ListPackages

func (s ListService) ListPackages() ([]ListItem, error)

type OutdatedCheckFailure added in v1.5.1

type OutdatedCheckFailure struct {
	Name  string
	Repo  string
	Error error
}

type OutdatedItem added in v1.5.1

type OutdatedItem struct {
	Name         string
	Repo         string
	Target       string
	InstalledTag string
	LatestTag    string
	InstalledAt  time.Time
}

type PackageAdder

type PackageAdder interface {
	AddPackage(repo, name string, opts install.Options) error
}

type QueryAsset added in v1.5.1

type QueryAsset = client.Asset

type QueryClient added in v1.5.1

type QueryClient interface {
	RepoInfo(repo string) (QueryRepoInfo, error)
	LatestRelease(repo string, includePrerelease bool) (QueryRelease, error)
	ListReleases(repo string, limit int, includePrerelease bool) ([]QueryRelease, error)
	ReleaseAssets(repo, tag string) ([]QueryAsset, error)
}

type QueryOptions added in v1.5.1

type QueryOptions struct {
	Repo       string
	Action     string
	Tag        string
	Limit      int
	JSON       bool
	Prerelease bool
}

type QueryRelease added in v1.5.1

type QueryRelease = client.Release

type QueryRepoInfo added in v1.5.1

type QueryRepoInfo = client.RepoInfo

type QueryResult added in v1.5.1

type QueryResult struct {
	Action   string         `json:"action"`
	Repo     string         `json:"repo"`
	Tag      string         `json:"tag,omitempty"`
	Info     *QueryRepoInfo `json:"info,omitempty"`
	Latest   *QueryRelease  `json:"latest,omitempty"`
	Releases []QueryRelease `json:"releases,omitempty"`
	Assets   []QueryAsset   `json:"assets,omitempty"`
}

func (QueryResult) JSONString added in v1.5.1

func (r QueryResult) JSONString() (string, error)

type QueryService added in v1.5.1

type QueryService struct {
	Client QueryClient
}

func (QueryService) Query added in v1.5.1

func (s QueryService) Query(opts QueryOptions) (QueryResult, error)

type ReleaseInfoFunc

type ReleaseInfoFunc func(repo, url string) (string, time.Time, error)

type RemovableInstalledStore

type RemovableInstalledStore interface {
	Load() (*storepkg.Config, error)
	Remove(target string) error
}

type RunResult

type RunResult = install.RunResult

type Runner

type Runner interface {
	Run(target string, opts install.Options) (RunResult, error)
}

type SearchClient added in v1.5.2

type SearchClient interface {
	SearchRepositories(query string, limit int, sort, order string) (SearchResult, error)
}

type SearchOptions added in v1.5.2

type SearchOptions struct {
	Keyword string
	Extras  []string
	Limit   int
	Sort    string
	Order   string
}

type SearchRepo added in v1.5.2

type SearchRepo = client.SearchRepo

type SearchResult added in v1.5.2

type SearchResult = client.SearchResult

type SearchService added in v1.5.2

type SearchService struct {
	Client SearchClient
}

func (SearchService) Search added in v1.5.2

func (s SearchService) Search(opts SearchOptions) (SearchResult, error)

type Service

type Service struct {
	Runner      Runner
	Store       InstalledStore
	Config      PackageAdder
	Now         func() time.Time
	ReleaseInfo ReleaseInfoFunc
	LoadConfig  func() (*cfgpkg.File, error)
}

func (Service) DownloadTarget

func (s Service) DownloadTarget(target string, opts install.Options) (RunResult, error)

func (Service) InstallTarget

func (s Service) InstallTarget(target string, opts install.Options, extras ...InstallExtras) (RunResult, error)

type UninstallResult

type UninstallResult struct {
	Repo         string
	RemovedFiles []string
}

type UninstallService

type UninstallService struct {
	Store      RemovableInstalledStore
	LoadConfig func() (*cfgpkg.File, error)
}

func (UninstallService) Uninstall

func (s UninstallService) Uninstall(target string) (UninstallResult, error)

type UpdateResult

type UpdateResult struct {
	Name   string
	Target string
	Result RunResult
}

type UpdateService

type UpdateService struct {
	Install       Installer
	LoadConfig    func() (*cfgpkg.File, error)
	LoadInstalled func() (*storepkg.Config, error)
	LatestTag     func(repo, sourcePath string) (string, error)
}

func (UpdateService) ListUpdateCandidates added in v1.5.2

func (s UpdateService) ListUpdateCandidates() ([]OutdatedItem, []OutdatedCheckFailure, int, error)

func (UpdateService) UpdateAllPackages

func (s UpdateService) UpdateAllPackages(cli install.Options) ([]UpdateResult, error)

func (UpdateService) UpdateCandidates added in v1.5.2

func (s UpdateService) UpdateCandidates(candidates []OutdatedItem, cli install.Options) ([]UpdateResult, error)

func (UpdateService) UpdatePackage

func (s UpdateService) UpdatePackage(nameOrRepo string, cli install.Options) (RunResult, error)

Jump to

Keyboard shortcuts

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