version

package
v0.0.0-...-242ead7 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareVersions

func CompareVersions(v1, v2 string) int

func GetCurrentDMSVersion

func GetCurrentDMSVersion() (string, error)

func GetLatestDMSVersion

func GetLatestDMSVersion() (string, error)

Types

type DefaultVersionFetcher

type DefaultVersionFetcher struct{}

DefaultVersionFetcher is the default implementation that uses git/curl

func (*DefaultVersionFetcher) GetCurrentVersion

func (d *DefaultVersionFetcher) GetCurrentVersion(dmsPath string) (string, error)

func (*DefaultVersionFetcher) GetLatestVersion

func (d *DefaultVersionFetcher) GetLatestVersion(dmsPath string) (string, error)

type VersionFetcher

type VersionFetcher interface {
	GetCurrentVersion(dmsPath string) (string, error)
	GetLatestVersion(dmsPath string) (string, error)
}

VersionFetcher is an interface for fetching version information

type VersionInfo

type VersionInfo struct {
	Current   string
	Latest    string
	IsGit     bool
	IsBranch  bool
	IsTag     bool
	HasUpdate bool
}

func GetDMSVersionInfo

func GetDMSVersionInfo() (*VersionInfo, error)

func GetDMSVersionInfoWithFetcher

func GetDMSVersionInfoWithFetcher(fetcher VersionFetcher) (*VersionInfo, error)

Jump to

Keyboard shortcuts

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