Documentation
¶
Index ¶
- func Delete(cfg *config.Config, u *ui.UI, deploymentIdentifier string, force bool) error
- func GetHelmfileModTime(dir string) (modTime string, err error)
- func Install(cfg *config.Config, u *ui.UI, chartRef string, opts InstallOptions) error
- func List(cfg *config.Config, u *ui.UI, opts ListOptions) error
- func ListInstanceIDs(cfg *config.Config) ([]string, error)
- func ResolveInstance(cfg *config.Config, args []string) (identifier string, remaining []string, err error)
- func Sync(cfg *config.Config, u *ui.UI, deploymentIdentifier string) error
- type ArtifactHubClient
- type ArtifactHubPackage
- type ArtifactHubRepository
- type ArtifactHubVersion
- type ChartFormat
- type ChartInfo
- type ChartReference
- type HelmfileInfo
- type InstallOptions
- type ListOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetHelmfileModTime ¶
GetHelmfileModTime returns the modification time of helmfile.yaml
func ListInstanceIDs ¶ added in v0.8.1
ListInstanceIDs returns all installed app deployment identifiers (as "app/id" strings) by walking the applications directory on disk.
func ResolveInstance ¶ added in v0.8.1
func ResolveInstance(cfg *config.Config, args []string) (identifier string, remaining []string, err error)
ResolveInstance determines which app deployment to target based on how many deployments are installed:
- 0 deployments: returns an error prompting the user to install one
- 1 deployment: auto-selects it, returns args unchanged
- 2+ deployments: expects args[0] to be a known "app/id" identifier; consumes it from args and returns the rest. Errors if no match.
Types ¶
type ArtifactHubClient ¶
type ArtifactHubClient struct {
// contains filtered or unexported fields
}
ArtifactHubClient handles chart resolution via the ArtifactHub API
func NewArtifactHubClient ¶
func NewArtifactHubClient() *ArtifactHubClient
NewArtifactHubClient creates a new ArtifactHub API client
func (*ArtifactHubClient) ResolveChart ¶
func (c *ArtifactHubClient) ResolveChart(ref string) (*ChartInfo, error)
ResolveChart resolves a repo/chart[@version] reference to full chart info Input formats:
- "bitnami/redis" -> resolves to latest version
- "bitnami/redis@19.0.0" -> resolves to specific version
type ArtifactHubPackage ¶
type ArtifactHubPackage struct {
Name string `json:"name"`
Version string `json:"version"`
Repository ArtifactHubRepository `json:"repository"`
ContentURL string `json:"content_url"`
AvailableVersions []ArtifactHubVersion `json:"available_versions"`
}
ArtifactHubPackage represents the API response for a package
type ArtifactHubRepository ¶
ArtifactHubRepository represents repository info in the API response
type ArtifactHubVersion ¶
type ArtifactHubVersion struct {
Version string `json:"version"`
}
ArtifactHubVersion represents a version in the available_versions list
type ChartFormat ¶
type ChartFormat int
ChartFormat represents the type of chart reference
const ( FormatURL ChartFormat = iota // https://.../*.tgz FormatRepoChart // repo/chart[@version] FormatOCI // oci://... )
type ChartInfo ¶
type ChartInfo struct {
RepoName string // Repository name (e.g., "bitnami")
RepoURL string // Repository URL (e.g., "https://charts.bitnami.com/bitnami")
ChartName string // Chart name (e.g., "redis")
Version string // Resolved version (e.g., "19.6.4")
}
ChartInfo holds resolved chart information from ArtifactHub
type ChartReference ¶
type ChartReference struct {
Original string // Original input string
Format ChartFormat // Detected format type
ChartName string // Chart name
ChartURL string // Full URL (for URL/OCI formats)
RepoName string // Repository name (for repo/chart format)
RepoURL string // Repository URL (for repo/chart format, resolved)
Version string // Chart version (may be empty)
}
ChartReference holds parsed chart information
func ParseChartReference ¶
func ParseChartReference(ref string) (*ChartReference, error)
ParseChartReference parses a chart reference in any supported format
func (*ChartReference) GetChartName ¶
func (c *ChartReference) GetChartName() string
GetChartName returns the name to use for the app directory
func (*ChartReference) NeedsResolution ¶
func (c *ChartReference) NeedsResolution() bool
NeedsResolution returns true if this reference needs ArtifactHub resolution
type HelmfileInfo ¶
type HelmfileInfo struct {
ChartRef string // Original chart reference (from comment)
Chart string // Chart field value
Version string // Chart version
}
HelmfileInfo holds parsed information from a helmfile.yaml
func ParseHelmfile ¶
func ParseHelmfile(dir string) (*HelmfileInfo, error)
ParseHelmfile extracts chart information from a helmfile.yaml
type InstallOptions ¶
type InstallOptions struct {
Name string // Optional app name override
Version string // Chart version (empty = latest for repo/chart, extracted for URL)
ID string // Deployment ID (empty = generate petname)
Force bool // Overwrite existing deployment
}
InstallOptions contains options for the install command
type ListOptions ¶
type ListOptions struct {
Verbose bool // Show detailed information
}
ListOptions contains options for the list command