{"modulePath":"github.com/SovereignCloudStack/cluster-stack-operator","version":"v0.2.0-alpha.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package release\n\nPackage release contains important structs and methods for a cluster stack release.\n\n## Constants\n\n```go\nconst (\n\t// ClusterStackSuffix is the directory name where cluster stacks are there.\n\tClusterStackSuffix = \"cluster-stacks\"\n\n\t// ClusterAddonYamlName is the file name where clusteraddon config is there.\n\tClusterAddonYamlName = \"clusteraddon.yaml\"\n\n\t// ClusterAddonValuesName constant for the file cluster-addon-values.yaml.\n\tClusterAddonValuesName = \"cluster-addon-values.yaml\"\n\n\t// OverwriteYaml is the new cluster stack overwrite yaml.\n\tOverwriteYaml = \"overwrite.yaml\"\n)\n```\n\n## Variables\n\n```go\nvar (\n\t// ErrEmptyReleaseName indicates release name is not provided.\n\tErrEmptyReleaseName = errors.New(\"name is empty\")\n\t// ErrEmptyReleaseCSR indicates cluster stack is not provided.\n\tErrEmptyReleaseCSR = errors.New(\"cluster stack is empty\")\n\t// ErrEmptyReleaseDownloadPath indicates download path is not provided.\n\tErrEmptyReleaseDownloadPath = errors.New(\"local download path is empty\")\n)\n```\n\n```go\nvar ErrEmptyVersion = errors.New(\"empty version\")\n```\nErrEmptyVersion indicates that the version is empty.\n\n## Functions\n\n```go\nfunc ConvertFromClusterClassToClusterStackFormat(input string) string\n```\nConvertFromClusterClassToClusterStackFormat converts \\`docker-ferrol-1-27-v0-sha.3960147\\` way to \\`docker-ferrol-1-27-v0-sha-3960147\\`.\n\n## Types\n\n```go\ntype Components struct {\n\tClusterAddon string `yaml:\"clusterAddon\"`\n\tNodeImage    string `yaml:\"nodeImage\"`\n}\n```\nComponents is the cluster stack components.\n\n```go\ntype Metadata struct {\n\tVersions Versions `yaml:\"versions\"`\n}\n```\nMetadata is the metadata for cluster stacks.\n\n```go\nfunc (m Metadata) Validate() error\n```\nValidate validates metadata.\n\n```go\ntype Release struct {\n\tTag               string                    `yaml:\"name\"`\n\tMeta              Metadata                  `yaml:\"metadata\"`\n\tClusterStack      clusterstack.ClusterStack `yaml:\"clusterStack\"`\n\tLocalDownloadPath string                    `yaml:\"downloadPath\"`\n}\n```\nRelease contains information for ClusterStack release.\n\n```go\nfunc New(tag, downloadPath string) (Release, bool, error)\n```\nNew returns a new release. Error is returned if there is an error while processing. But not all errors indicate a need to download the release from github so, a bool is returned to indicate if the release needs to be downloaded.\n\n```go\nfunc (r *Release) CheckHelmCharts() error\n```\nCheckHelmCharts checks all expected helm charts in the release directory. This is a separate method, since few controllers need to check for the presence of helm charts and few don't.\n\n```go\nfunc (r *Release) ClusterAddonChartPath() string\n```\nClusterAddonChartPath returns the helm chart name from the given path.\n\n```go\nfunc (r *Release) ClusterAddonValuesPath() string\n```\nClusterAddonValuesPath returns the path to the cluster addon values file.\n\n```go\nfunc (r *Release) ClusterClassChartPath() (string, error)\n```\nClusterClassChartPath returns the absolute helm chart path for cluster class.\n\n```go\nfunc (r *Release) Validate() error\n```\nValidate validates the release.\n\n```go\ntype Versions struct {\n\tClusterStack string     `yaml:\"clusterStack\"`\n\tKubernetes   string     `yaml:\"kubernetes\"`\n\tComponents   Components `yaml:\"components\"`\n}\n```\nVersions is the cluster stack versions.\n\n","path":"github.com/SovereignCloudStack/cluster-stack-operator/pkg/release","name":"release","synopsis":"Package release contains important structs and methods for a cluster stack release.","isRedistributable":true}
