registry

package
v0.0.61 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: MIT Imports: 9 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,
) error

func (*GithubRegistry) GetDownloadURL

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

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"`
}

type RepoRegistry

type RepoRegistry interface {
	GetLatestReleaseInfo(ctx context.Context) (*ReleaseInfo, error)
	GetLatestRelease(ctx context.Context) (string, error)
	DownloadReleaseBinary(ctx context.Context, packageName string, version string, dstPath string) 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