Documentation
¶
Index ¶
- func ApplyNowModuleRelease(dynamicClient dynamic.Interface, releaseName string) error
- func ApproveModuleRelease(dynamicClient dynamic.Interface, releaseName string) error
- func CanBeAppliedNow(r ModuleReleaseInfo) bool
- func CanBeApproved(r ModuleReleaseInfo) bool
- func FindVersions(dynamicClient dynamic.Interface, moduleName string, match ReleaseMatchFunc) ([]string, error)
- func ListModuleNames(dynamicClient dynamic.Interface) ([]string, error)
- func NormalizeVersion(version string) string
- func SortReleasesByVersion(releases []ModuleReleaseInfo)
- type ModuleReleaseInfo
- func FindReleases(dynamicClient dynamic.Interface, moduleName string, match ReleaseMatchFunc) ([]ModuleReleaseInfo, error)
- func GetModuleRelease(dynamicClient dynamic.Interface, moduleName, version string) (*ModuleReleaseInfo, error)
- func ListModuleReleases(dynamicClient dynamic.Interface, moduleName string) ([]ModuleReleaseInfo, error)
- type NearestVersions
- type ReleaseMatchFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyNowModuleRelease ¶
ApplyNowModuleRelease adds the apply-now annotation to a module release.
func ApproveModuleRelease ¶
ApproveModuleRelease adds the approved annotation to a module release.
func CanBeAppliedNow ¶
func CanBeAppliedNow(r ModuleReleaseInfo) bool
CanBeAppliedNow returns true for pending releases without apply-now annotation. Used by the apply-now command to filter releases available for immediate deployment.
func CanBeApproved ¶
func CanBeApproved(r ModuleReleaseInfo) bool
CanBeApproved returns true for pending releases that are not yet approved. Used by the approve command to filter releases available for approval.
func FindVersions ¶
func FindVersions(dynamicClient dynamic.Interface, moduleName string, match ReleaseMatchFunc) ([]string, error)
FindVersions returns a sorted list of versions for releases matching the predicate. All versions are normalized to have a "v" prefix for consistent completion.
func ListModuleNames ¶
ListModuleNames returns a sorted list of unique module names from all releases.
func NormalizeVersion ¶
NormalizeVersion ensures the version has a 'v' prefix.
func SortReleasesByVersion ¶
func SortReleasesByVersion(releases []ModuleReleaseInfo)
SortReleasesByVersion sorts releases by semantic version in ascending order. Falls back to lexicographic comparison if version parsing fails.
Types ¶
type ModuleReleaseInfo ¶
type ModuleReleaseInfo struct {
Name string
ModuleName string
Version string
Phase string
Message string
IsApproved bool
IsApplyNow bool
}
ModuleReleaseInfo contains information about a module release. This is a simplified DTO for use in CLI commands.
func FindReleases ¶
func FindReleases(dynamicClient dynamic.Interface, moduleName string, match ReleaseMatchFunc) ([]ModuleReleaseInfo, error)
FindReleases returns releases matching the given predicate, sorted by version. It's simply a filtered version of ListModuleReleases (convenience function).
func GetModuleRelease ¶
func GetModuleRelease(dynamicClient dynamic.Interface, moduleName, version string) (*ModuleReleaseInfo, error)
GetModuleRelease returns a specific module release by module name and version.
func ListModuleReleases ¶
func ListModuleReleases(dynamicClient dynamic.Interface, moduleName string) ([]ModuleReleaseInfo, error)
ListModuleReleases returns all module releases for a given module name. If moduleName is empty, returns all releases.
type NearestVersions ¶
type NearestVersions struct {
Lower *ModuleReleaseInfo // closest version below target, nil if none exists
Upper *ModuleReleaseInfo // closest version above target, nil if none exists
}
NearestVersions contains the closest versions below and above a target version.
func FindNearestVersions ¶
func FindNearestVersions(releases []ModuleReleaseInfo, targetVersion string) NearestVersions
FindNearestVersions finds the closest versions below and above the target version.
type ReleaseMatchFunc ¶
type ReleaseMatchFunc func(r ModuleReleaseInfo) bool
ReleaseMatchFunc is a predicate function for filtering releases. Returns true if the release should be included in the result.