extregistry

package
v0.1.0-alpha.10 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultKittyRegistry = "https://raw.githubusercontent.com/ImSingee/kitty-registry/master/"
View Source
const KittyRegistryEnv = "KITTY_REGISTRY"

Variables

View Source
var ErrNoWaysToDownload = fmt.Errorf("no ways to download")
View Source
var ErrVersionNotExist = fmt.Errorf("version not exist")

Functions

func GetAppVersion

func GetAppVersion(app string, version string) (*App, *Version, error)

GetAppVersion will get the app and version from registry

func GetRegistry

func GetRegistry() (string, error)

Types

type App

type App struct {
	Name     string                          `json:"-"`
	Tags     map[string]string               `json:"tags"`     // key is tag name, e.g. "latest", value is version string, e.g. "1.0.0"
	Versions map[string]eroptions.AnyOptions `json:"versions"` // key is version string, e.g. "1.0.0"

	InstallOptions eroptions.AnyOptions
}

func GetApp

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

type Version

type Version struct {
	App     *App   `json:"-"`
	Version string `json:"-"`

	InstallOptions eroptions.AnyOptions
}

func (*Version) InstallTo

func (v *Version) InstallTo(dst string) error

func (*Version) InstallUnknownVersionTo

func (v *Version) InstallUnknownVersionTo(dst string) error

Jump to

Keyboard shortcuts

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