updatechecker

package
v1.20.6 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2023 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNeedUpdate

func GetNeedUpdate() bool

GetNeedUpdate returns true whether a newer version of Gitea is available

func GetRemoteVersion

func GetRemoteVersion() string

GetRemoteVersion returns the current remote version (or currently installed version if fail to fetch from DB)

func GiteaUpdateChecker

func GiteaUpdateChecker(httpEndpoint string) error

GiteaUpdateChecker returns error when new version of Gitea is available

func UpdateRemoteVersion

func UpdateRemoteVersion(version string) (err error)

UpdateRemoteVersion updates the latest available version of Gitea

Types

type CheckerState

type CheckerState struct {
	LatestVersion string
}

CheckerState stores the remote version from the JSON endpoint

func (*CheckerState) Name

func (r *CheckerState) Name() string

Name returns the name of the state item for update checker

Jump to

Keyboard shortcuts

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