background

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2022 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CLIENT_VER_FILE string = "./data/client_ver"

Functions

func Unzip added in v1.0.3

func Unzip(src, dest string) error

Types

type ClientDownloader added in v1.0.3

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

func NewClientDownloader added in v1.0.3

func NewClientDownloader(versionChecker *VersionChecker) (*ClientDownloader, error)

func (*ClientDownloader) CreateFolderIfNeeded added in v1.0.3

func (cl *ClientDownloader) CreateFolderIfNeeded(path string) error

func (*ClientDownloader) DownloadLatestVersion added in v1.0.3

func (cl *ClientDownloader) DownloadLatestVersion() error

func (*ClientDownloader) InitialClientDownload added in v1.0.3

func (cl *ClientDownloader) InitialClientDownload() error

func (*ClientDownloader) String added in v1.0.3

func (cl *ClientDownloader) String() string

type Notifier

type Notifier struct {
	C chan util.Notification
	// contains filtered or unexported fields
}

func NewNotifier

func NewNotifier() *Notifier

func (*Notifier) Serve

func (n *Notifier) Serve(haltCtx context.Context) error

type ReleaseStruct added in v1.0.3

type ReleaseStruct struct {
	TagName string         `json:"tag_name"`
	HtmlUrl string         `json:"html_url"`
	Assets  []releaseAsset `json:"assets"`
	// contains filtered or unexported fields
}

type VersionChecker

type VersionChecker struct {
	ServerStatus *VersionCheckerStatus
	ClientStatus *VersionCheckerStatus
	// contains filtered or unexported fields
}

func NewVersionCheck

func NewVersionCheck(current string, notifier chan<- util.Notification) (*VersionChecker, error)

func (*VersionChecker) GetLocalClientVersion added in v1.0.3

func (v *VersionChecker) GetLocalClientVersion() (string, error)

func (*VersionChecker) GetWSInfo added in v1.0.3

func (v *VersionChecker) GetWSInfo() gin.H

func (*VersionChecker) Serve

func (v *VersionChecker) Serve(haltCtx context.Context) error

func (*VersionChecker) SetLocalClientVersion added in v1.0.3

func (v *VersionChecker) SetLocalClientVersion(newVersion string) error

func (*VersionChecker) String

func (v *VersionChecker) String() string

type VersionCheckerStatus added in v1.0.3

type VersionCheckerStatus struct {
	CurrentVersion    *semver.Version `json:"currentVersion"`
	IsUpdateAvailable bool            `json:"isUpdateAvailable"`
	HasCheckFailed    bool            `json:"hasCheckFailed"`
	LatestVersion     string          `json:"latestVersion"`
	LatestUrl         string          `json:"latestUrl"`
	ManualUrl         string          `json:"manualUrl"`
}

Jump to

Keyboard shortcuts

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