Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decision ¶
type Decision struct {
CurrentVersion string `json:"current_version"`
LatestVersion string `json:"latest_version"`
MinSupportedVersion string `json:"min_supported_version"`
MetadataSource string `json:"metadata_source,omitempty"`
StrictDisabled bool `json:"strict_disabled"`
DevBuild bool `json:"dev_build"`
HasNewerVersion bool `json:"has_newer_version"`
Blocked bool `json:"blocked"`
}
Decision describes how the CLI should behave given the current / remote versions.
func Check ¶
Check resolves the effective version policy (including config + env overrides), loads remote metadata with caching, and returns the decision for the current awiki-cli binary.
This function is intentionally tolerant: - Network / cache errors never crash the CLI; callers can choose how hard to fail. - When metadata is missing or unparsable, the Decision falls back to "no block".
type Metadata ¶
type Metadata struct {
LatestVersion string `json:"latest_version"`
MinSupportedVersion string `json:"min_supported_version"`
RetrievedAt time.Time `json:"retrieved_at"`
Source string `json:"source"` // "network" | "cache" | "cache_stale"
}
Metadata captures the remote version strategy state that we cache locally.
Click to show internal directories.
Click to hide internal directories.