Documentation ¶
Index ¶
- Constants
- Variables
- func DownloadFileName(version semver.Version) string
- func Update(currentVersion semver.Version, downloader LatestCheckerDownloader, ...) error
- type Downloader
- type FileSystemLatestCheckerDownloader
- type GithubLatestCheckerDownloader
- type LatestChecker
- type LatestCheckerDownloader
- type Package
Constants ¶
View Source
const ( ErrUpdateCheck = chkitErrors.Err("unable to check latest version") ErrUpdateDownload = chkitErrors.Err("unable to download latest version") )
View Source
const ( ErrUnpack = chkitErrors.Err("unable to unpack update file") ErrExpectedFilesNotFound = chkitErrors.Err("unable to find expected files in archive") )
View Source
const (
ErrUpdateApply = chkitErrors.Err("update apply failed")
)
View Source
const (
MaxFileSize = 50 * (1 << 20) // 50 megabytes
)
Variables ¶
View Source
var PublicKeyB64 = "cHVibGljIGtleQo="
Functions ¶
func DownloadFileName ¶
Types ¶
type Downloader ¶
type FileSystemLatestCheckerDownloader ¶
type FileSystemLatestCheckerDownloader struct {
// contains filtered or unexported fields
}
func NewFileSystemLatestCheckerDownloader ¶
func NewFileSystemLatestCheckerDownloader(baseDir string) *FileSystemLatestCheckerDownloader
func (*FileSystemLatestCheckerDownloader) Download ¶
func (fs *FileSystemLatestCheckerDownloader) Download(version semver.Version) (io.ReadCloser, int64, error)
func (*FileSystemLatestCheckerDownloader) LatestVersion ¶
func (fs *FileSystemLatestCheckerDownloader) LatestVersion() (semver.Version, error)
type GithubLatestCheckerDownloader ¶
type GithubLatestCheckerDownloader struct {
// contains filtered or unexported fields
}
func NewGithubLatestCheckerDownloader ¶
func NewGithubLatestCheckerDownloader(owner, repo string, debugRequests bool) *GithubLatestCheckerDownloader
func (*GithubLatestCheckerDownloader) Download ¶
func (gh *GithubLatestCheckerDownloader) Download(version semver.Version) (io.ReadCloser, int64, error)
func (*GithubLatestCheckerDownloader) LatestVersion ¶
func (gh *GithubLatestCheckerDownloader) LatestVersion() (semver.Version, error)
type LatestChecker ¶
type LatestCheckerDownloader ¶
type LatestCheckerDownloader interface { LatestChecker Downloader }
Click to show internal directories.
Click to hide internal directories.