registry

package
v0.0.64 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GithubRegistry

type GithubRegistry struct {
	// contains filtered or unexported fields
}

func NewGithubRegistry

func NewGithubRegistry() *GithubRegistry

func (*GithubRegistry) DownloadReleaseBinary

func (reg *GithubRegistry) DownloadReleaseBinary(
	ctx context.Context,
	packageName string,
	version string,
	dstPath string,
	progress fetch.ProgressObserver,
) error

func (*GithubRegistry) GetDownloadURL

func (reg *GithubRegistry) GetDownloadURL(repoURI string, packageName string, version string) string

func (*GithubRegistry) GetLatestPrerelease added in v0.0.63

func (reg *GithubRegistry) GetLatestPrerelease(ctx context.Context) (string, error)

func (*GithubRegistry) GetLatestPrereleaseInfo added in v0.0.63

func (reg *GithubRegistry) GetLatestPrereleaseInfo(ctx context.Context) (*ReleaseInfo, error)

func (*GithubRegistry) GetLatestRelease

func (reg *GithubRegistry) GetLatestRelease(ctx context.Context) (string, error)

func (*GithubRegistry) GetLatestReleaseInfo

func (reg *GithubRegistry) GetLatestReleaseInfo(ctx context.Context) (*ReleaseInfo, error)

func (*GithubRegistry) GetPackageName

func (reg *GithubRegistry) GetPackageName(os string, arch string) (string, error)

type ReleaseInfo

type ReleaseInfo struct {
	TagName     string    `json:"tag_name"`
	PublishedAt time.Time `json:"published_at"`
	Prerelease  bool      `json:"prerelease"`
	Draft       bool      `json:"draft"`
}

type RepoRegistry

type RepoRegistry interface {
	GetLatestReleaseInfo(ctx context.Context) (*ReleaseInfo, error)
	GetLatestRelease(ctx context.Context) (string, error)
	GetLatestPrerelease(ctx context.Context) (string, error)
	DownloadReleaseBinary(
		ctx context.Context,
		packageName string,
		version string,
		dstPath string,
		progress fetch.ProgressObserver,
	) error
	GetPackageName(os string, arch string) (string, error)
	GetDownloadURL(repoURI string, packageName string, version string) string
}

Jump to

Keyboard shortcuts

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