igniteshift

package
v0.0.0-...-2b8fa0f Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentOSArch

func CurrentOSArch() (os, arch string)

CurrentOSArch returns the operating system and architecture the tool is running on.

Types

type GitHubAsset

type GitHubAsset struct {
	URL                string     `json:"url"`
	ID                 int64      `json:"id"`
	NodeID             string     `json:"node_id"`
	Name               string     `json:"name"`
	Label              string     `json:"label"`
	Uploader           GitHubUser `json:"uploader"`
	ContentType        string     `json:"content_type"`
	State              string     `json:"state"`
	Size               int64      `json:"size"`
	DownloadCount      int        `json:"download_count"`
	CreatedAt          string     `json:"created_at"`
	UpdatedAt          string     `json:"updated_at"`
	BrowserDownloadURL string     `json:"browser_download_url"`
}

GitHubAsset represents a downloadable asset of a release.

type GitHubRelease

type GitHubRelease struct {
	URL             string        `json:"url"`
	AssetsURL       string        `json:"assets_url"`
	UploadURL       string        `json:"upload_url"`
	HTMLURL         string        `json:"html_url"`
	ID              int64         `json:"id"`
	NodeID          string        `json:"node_id"`
	TagName         string        `json:"tag_name"`
	TargetCommitish string        `json:"target_commitish"`
	Name            string        `json:"name"`
	Draft           bool          `json:"draft"`
	Prerelease      bool          `json:"prerelease"`
	CreatedAt       string        `json:"created_at"`
	PublishedAt     string        `json:"published_at"`
	Assets          []GitHubAsset `json:"assets"`
	TarballURL      string        `json:"tarball_url"`
	ZipballURL      string        `json:"zipball_url"`
	Body            string        `json:"body"`
	Author          GitHubUser    `json:"author"`
}

GitHubRelease represents a release in a GitHub repository.

func GetGitHubReleases

func GetGitHubReleases(releaser GitHubReleaser, owner, repo string) ([]GitHubRelease, error)

type GitHubReleaser

type GitHubReleaser interface {
	FetchReleases(owner, repo string) ([]byte, error)
}

type GitHubUser

type GitHubUser struct {
	Login     string `json:"login"`
	ID        int64  `json:"id"`
	NodeID    string `json:"node_id"`
	AvatarURL string `json:"avatar_url"`
	URL       string `json:"url"`
	Type      string `json:"type"`
	SiteAdmin bool   `json:"site_admin"`
}

GitHubUser represents a GitHub user or bot, associated with a release or asset.

type Manager

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

func GetManager

func GetManager() *Manager

func NewManager

func NewManager() *Manager

NewManager creates a new Manager

func (*Manager) CheckForIgniteUpdates

func (m *Manager) CheckForIgniteUpdates() error

func (*Manager) CheckForIgniteVersion

func (m *Manager) CheckForIgniteVersion(version string) error

func (*Manager) CheckForToolingUpdates

func (m *Manager) CheckForToolingUpdates() error

func (*Manager) CheckForToolingVersion

func (m *Manager) CheckForToolingVersion(version string) error

func (*Manager) CheckForUpdates

func (m *Manager) CheckForUpdates() error

func (*Manager) GetCurrentToolingVersion

func (m *Manager) GetCurrentToolingVersion() string

func (*Manager) GetLatestToolingVersion

func (m *Manager) GetLatestToolingVersion() string

func (*Manager) Welcome

func (m *Manager) Welcome()

type MockReleaser

type MockReleaser struct{}

func (*MockReleaser) FetchReleases

func (m *MockReleaser) FetchReleases(owner, repo string) ([]byte, error)

type RealReleaser

type RealReleaser struct{}

func (*RealReleaser) FetchReleases

func (r *RealReleaser) FetchReleases(owner, repo string) ([]byte, error)

type Version

type Version struct {
	Releases GitHubRelease `json:"url"` // slice of urls via os/arch => url
}

func NewVersion

func NewVersion(release *GitHubRelease) *Version

func (*Version) IsLatest

func (v *Version) IsLatest() bool

func (*Version) IsNightly

func (v *Version) IsNightly() bool

Jump to

Keyboard shortcuts

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