registry

package
v0.0.0-...-83dba99 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GITHUB_RELEASES_URL_TEMPLATE = "https://api.github.com/repos/{{ .UserName }}/{{ .RepoName }}/releases/latest"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EArtifactType

type EArtifactType int

type FArtifact

type FArtifact struct {
	ArtifactType EArtifactType `json:"type"`
	Url          string        `json:"url"`
	BinaryPath   string        `json:"binaryPath"`
	Alias        string        `json:"alias"`
	// contains filtered or unexported fields
}

func (FArtifact) BuildSymLinkPath

func (artifact FArtifact) BuildSymLinkPath(installDir string) string

func (FArtifact) BuildUrl

func (artifact FArtifact) BuildUrl(params FUrlBuilderParams) (string, error)

func (*FArtifact) Fetch

func (artifact *FArtifact) Fetch(url string, destDir string) error

func (*FArtifact) Install

func (artifact *FArtifact) Install() error

func (*FArtifact) Prepare

func (artifact *FArtifact) Prepare() error

type FPackage

type FPackage struct {
	Name     string    `json:"name"`
	Repo     string    `json:"repo"`
	Artifact FArtifact `json:"artifact"`
}

func (*FPackage) FetchLatestArtifact

func (pkg *FPackage) FetchLatestArtifact(destDir string) error

func (*FPackage) GetLatestVersionString

func (pkg *FPackage) GetLatestVersionString() (string, error)

func (*FPackage) Install

func (pkg *FPackage) Install() error

func (*FPackage) Prepare

func (pkg *FPackage) Prepare() error

type FRegistry

type FRegistry struct {
	Pkgs []FPackage `json:"pkgs"`
}

func LoadRegistryFromFile

func LoadRegistryFromFile() (*FRegistry, error)

func (FRegistry) FindPackage

func (reg FRegistry) FindPackage(name string) (*FPackage, error)

type FUrlBuilderParams

type FUrlBuilderParams struct {
	Version string
}

Jump to

Keyboard shortcuts

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