Help us shape the future of Go! Take the 2026 Go Developer Survey

version

package
v2.17.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: BSD-3-Clause Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterVersion

func RegisterVersion(api huma.API, versionService *VersionService)

RegisterVersion registers version endpoints.

Types

type GetAppVersionInput

type GetAppVersionInput struct{}

type GetAppVersionOutput

type GetAppVersionOutput struct {
	Body version.Info
}

type GetVersionInput

type GetVersionInput struct {
	Current string `query:"current" doc:"Current version to compare against"`
}

type GetVersionOutput

type GetVersionOutput struct {
	Body version.Check
}

type VersionHandler

type VersionHandler struct {
	// contains filtered or unexported fields
}

VersionHandler handles version information endpoints.

func (*VersionHandler) GetAppVersion

GetAppVersion returns the current application version.

func (*VersionHandler) GetVersion

func (h *VersionHandler) GetVersion(ctx context.Context, input *GetVersionInput) (*GetVersionOutput, error)

GetVersion returns version information with optional update check.

type VersionService

type VersionService struct {
	// contains filtered or unexported fields
}

func NewVersionService

func NewVersionService(
	httpClient *http.Client,
	disabled bool,
	appVersion, revision string,
	containerRegistryService *registry.ContainerRegistryService,
	dockerService *docker.DockerClientService,
	imageUpdateService *imageupdate.ImageUpdateService,
	settingsService *settings.SettingsService,
) *VersionService

func (*VersionService) GetAppVersionInfo

func (s *VersionService) GetAppVersionInfo(ctx context.Context) *version.Info

GetAppVersionInfo returns application version information including display version

func (*VersionService) GetLatestVersion

func (s *VersionService) GetLatestVersion(ctx context.Context) (string, error)

func (*VersionService) GetVersionInformation

func (s *VersionService) GetVersionInformation(ctx context.Context, currentVersion string) (*version.Check, error)

func (*VersionService) IsNewer

func (s *VersionService) IsNewer(latest, current string) bool

func (*VersionService) ReleaseURL

func (s *VersionService) ReleaseURL(localVersion string) string

func (*VersionService) RunStreamProducer added in v2.13.0

func (s *VersionService) RunStreamProducer(ctx context.Context, events chan<- version.StreamEvent)

RunStreamProducer shares one version poll loop across every connected client and emits a snapshot whenever it changes.

Jump to

Keyboard shortcuts

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