updates

package
v0.0.0-...-786fc0c Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSchemeNotHTTPS    = errors.New("scheme is not HTTPS")
	ErrNoUpdateAvailable = errors.New("no update available")
)
View Source
var (
	ErrUpdateNotFound  = fmt.Errorf("update not found")
	ErrUpdateForbidden = fmt.Errorf("update forbidden")
)
View Source
var (
	ErrInvalidVersion = errors.New("invalid version")
)

Functions

func GetChannelName

func GetChannelName(version string) string

Types

type Channel

type Channel string
const (
	ChannelDev  Channel = "https://oneauth-files.vitalvas.dev/test/"
	ChannelProd Channel = "https://oneauth-files.vitalvas.dev/release/"
)

func (*Channel) String

func (c *Channel) String() string

type UpdateManifest

type UpdateManifest struct {
	Name         string `json:"name"`
	Version      string `json:"version"`
	RemotePrefix string `json:"remote_prefix"`
}

func Check

func Check(appName, version string) (*UpdateManifest, error)

type UpdateVersionManifest

type UpdateVersionManifest struct {
	Name    string `json:"name"`
	Version string `json:"version"`
	Sha256  string `json:"sha256"`
}

func CheckVersion

func CheckVersion(appName, remotePrefix string) (*UpdateVersionManifest, error)

Jump to

Keyboard shortcuts

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