update

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchLatestRelease

func FetchLatestRelease(ctx context.Context, owner string, repo string) (*release, error)

FetchLatestRelease is ...

func Init

func Init(cfg *Config) error

Init is ...

func SetVersion

func SetVersion(ver *Version)

Types

type Config

type Config struct {
	Owner             string `json:"owner"`
	Repo              string `json:"repo"`
	CurrentVersion    string `json:"current_version"`
	ArchiveExecutable string `json:"archive_executable"`
}

Config is ...

type ReleaseAsset

type ReleaseAsset struct {
	Id          int    `json:"id"`
	Name        string `json:"name"`
	Size        int    `json:"size"`
	DownloadUrl string `json:"browser_download_url"`
}

func ReleaseInfo

func ReleaseInfo(ctx context.Context, cfg *Config) (*ReleaseAsset, error)

ReleaseInfo is ...

type Version

type Version struct {
	CurrentVersion string `json:"current_version"`
	GitCommit      string `json:"gitCommit"`
	BuildDate      string `json:"buildDate"`
	NewVersion     string `json:"new,omitempty"`
	ReleaseURL     string `json:"release_url,omitempty"`
}

Version is ...

func VersionInfo

func VersionInfo() *Version

Jump to

Keyboard shortcuts

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