Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var AllowedDownloadPrefixes = []string{
"https://github.com/",
"https://api.github.com/",
}
AllowedDownloadPrefixes controls which URL prefixes are accepted by DownloadAsset. Exported for test injection only.
var ReleaseURL = "https://api.github.com/repos/DeusData/codebase-memory-mcp/releases/latest"
ReleaseURL is the GitHub API endpoint for latest release. Exported for test injection.
Functions ¶
func AssetName ¶
func AssetName() string
AssetName returns the expected release asset name for the current platform.
func CompareVersions ¶
CompareVersions compares two semver strings (e.g. "0.2.1" vs "0.2.0"). Returns >0 if a > b, <0 if a < b, 0 if equal.
func DownloadAsset ¶
DownloadAsset downloads a release asset and returns the body reader and content length. Caller must close the returned ReadCloser.
Types ¶
type Asset ¶
type Asset struct {
Name string `json:"name"`
BrowserDownloadURL string `json:"browser_download_url"`
Size int64 `json:"size"`
}
Asset holds a single release artifact.
type Release ¶
Release holds parsed GitHub release metadata.
func FetchLatestRelease ¶
FetchLatestRelease fetches release metadata from GitHub.
func (*Release) LatestVersion ¶
LatestVersion returns the version string from the latest release (without "v" prefix).