buildinfo

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package buildinfo holds values stamped into the binaries at build time.

Index

Constants

This section is empty.

Variables

View Source
var Built = ""

Built is the Unix time (decimal seconds) of the source commit, set with -X github.com/mistgate/mistgate/internal/buildinfo.Built=<git log -1 --format=%ct>. It orders releases: the version string ("0.1.0-<hash>") does not. Empty = a build without it (go run, go test): BuiltUnix is 0.

View Source
var ErrUnsignedBuild = errors.New("unsigned build: update by hand")

ErrUnsignedBuild is what a binary without ReleaseKey answers to anything that needs to verify a release.

View Source
var ReleaseKey = ""

ReleaseKey is the owner's release public key, 32 bytes of ed25519 in standard base64, set with -X github.com/mistgate/mistgate/internal/buildinfo.ReleaseKey=<base64>. Both binaries carry it; the node agent trusts an update only if the owner signed it. Empty = unsigned build: self-update is off.

View Source
var Version = "0.1.0-dev"

Version is set with -ldflags "-X github.com/mistgate/mistgate/internal/buildinfo.Version=1.2.3".

Functions

func BuiltUnix

func BuiltUnix() int64

BuiltUnix is Built as a number; 0 when it is empty or not a positive decimal integer.

func KeyFingerprint

func KeyFingerprint(pub ed25519.PublicKey) string

KeyFingerprint is the first 16 hex characters of SHA-256 of a public key: what `mistgate release keygen` prints next to the key and the Updates page shows, to compare by eye.

func LoadReleasePublicKey

func LoadReleasePublicKey(dataDir string) (ed25519.PublicKey, error)

LoadReleasePublicKey keeps the release trust root stable when a panel binary is replaced by a generic GitHub release build. The first keyed build stores its public key in the data directory; subsequent builds use that installation key even when the downloaded binary was built without a per-installation key.

func ReleasePublicKey

func ReleasePublicKey() (ed25519.PublicKey, error)

ReleasePublicKey decodes ReleaseKey. It returns ErrUnsignedBuild when there is none, and another error when the stamped value is not a valid key (a broken build must not look like an unsigned one).

Types

This section is empty.

Jump to

Keyboard shortcuts

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