install

package
v0.0.0-...-a823697 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GithubAPIAccessError = errors.New("error accessing GitHub API")

GithubAPIAccessError is an error that occurs when there is a problem accessing the GitHub API.

View Source
var ReleaseAssetNotFoundErr = errors.New("error reaching release artifacts")

Functions

This section is empty.

Types

type Install

type Install struct {
	ReleaseManager *ReleaseManager
	// contains filtered or unexported fields
}

func New

func New(api *ollama.Client, suggest *suggest.Suggest, explain *explain.Explain) *Install

func (*Install) DeployCommand

func (i *Install) DeployCommand() *cli.Command

type Release

type Release struct {
	Name       string         `json:"name"`
	TagName    string         `json:"tag_name"`
	Draft      bool           `json:"draft"`
	PreRelease bool           `json:"prerelease"`
	Assets     []ReleaseAsset `json:"assets"`
	CreatedAt  time.Time      `json:"created_at"`
}

func (*Release) GetDownloadUrlFor

func (r *Release) GetDownloadUrlFor(platform, arch string) (string, error)

func (*Release) String

func (r *Release) String() string

type ReleaseAsset

type ReleaseAsset struct {
	Url                string `json:"url"`
	BrowserDownloadUrl string `json:"browser_download_url"`
}

type ReleaseManager

type ReleaseManager struct {
	Releases []Release
	Message  string
	// contains filtered or unexported fields
}

ReleaseManager is a struct that manages the releases of tlm's GitHub repository.

func NewReleaseManager

func NewReleaseManager(owner, repo string) *ReleaseManager

NewReleaseManager is a constructor for the ReleaseManager struct.

func (*ReleaseManager) CanUpgrade

func (rm *ReleaseManager) CanUpgrade(base string, to *Release) (bool, error)

CanUpgrade checks if an upgrade is possible from a base version to a target version.

func (*ReleaseManager) CheckForUpdates

func (rm *ReleaseManager) CheckForUpdates(base string) error

CheckForUpdates checks for updates and writes a checkpoint.

func (*ReleaseManager) GetLatest

func (rm *ReleaseManager) GetLatest() (*Release, error)

GetLatest fetches the latest release from the GitHub API.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳