version

package
v3.24.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package version contains version and build variables set by the CI process.

Index

Constants

View Source
const TTSUpgradingDocsURL = "https://www.thethingsindustries.com/docs/getting-started/upgrading/"

TTSUpgradingDocsURL points to the upgrading documentation.

View Source
const TTSVersionCheckURL = "https://www.thethingsindustries.com/releases/thethingsstack-open-source.json"

TTSVersionCheckURL points to a list of The Things Stack releases that is used for version checking.

Variables

View Source
var BuildDate = ""

BuildDate of the binary

View Source
var GitCommit = ""

GitCommit from which the binary was built

View Source
var TTN = "3.24.0-dev"

TTN Version

Functions

func ClearRecentCheckCache added in v3.19.2

func ClearRecentCheckCache() error

ClearRecentCheckCache clears cache

func LogUpdate added in v3.14.0

func LogUpdate(ctx context.Context, update *Update)

LogUpdate logs an Warn level message when there is a newer minor, and a Log level message when there is a newer patch. When there is no new minor or patch version, this function does nothing.

func String

func String() string

String returns the version string.

Types

type CheckOption added in v3.14.0

type CheckOption interface {
	// contains filtered or unexported methods
}

CheckOption customizes the version check.

func WithClient added in v3.14.0

func WithClient(client *http.Client) CheckOption

WithClient configures a custom HTTP client.

func WithReference added in v3.14.0

func WithReference(current semver.Version) CheckOption

WithReference configures a custom reference version.

func WithURLs added in v3.14.0

func WithURLs(sourceURL, docsURL string) CheckOption

WithURLs configures custom URLs for source and documentation.

type Update added in v3.14.0

type Update struct {
	Current,
	Latest semver.Version
	DocsURL      string
	Minor, Patch bool
}

Update is the latest version.

func CheckUpdate added in v3.14.0

func CheckUpdate(ctx context.Context, opts ...CheckOption) (*Update, error)

CheckUpdate checks whether there is a version update available. If there is no update, or no new version is available, this function returns nil. The function uses cache.

Jump to

Keyboard shortcuts

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