updatechecker

package
v0.0.0-...-e61ee7f Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNeedUpdate

func GetNeedUpdate(ctx context.Context) bool

GetNeedUpdate returns true whether a newer version of Gitea is available

func GetRemoteVersion

func GetRemoteVersion(ctx context.Context) 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(ctx context.Context, 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