{"modulePath":"github.com/SovereignCloudStack/cluster-stack-operator","version":"v0.2.0-alpha.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package clusterstack\n\nPackage clusterstack contains functions related to clusterstacks.\n\n## Constants\n\n```go\nconst (\n\t// ClusterStacksDownloadDirectory is the cluster stack download directory.\n\tClusterStacksDownloadDirectory = \"cluster-stacks\"\n\n\t// NodeImageDownloadDirectory is the node image untar directory.\n\tNodeImageDownloadDirectory = \"node-images\"\n)\n```\n\n```go\nconst (\n\t// Separator defines the separator for cluster stack strings.\n\tSeparator = \"-\"\n)\n```\n\n## Variables\n\n```go\nvar (\n\t// ErrInvalidFormat indicates a cluster stack string has an invalid format.\n\tErrInvalidFormat = errors.New(\"invalid format\")\n\t// ErrInvalidProvider indicates a cluster stack string has an invalid provider.\n\tErrInvalidProvider = errors.New(\"invalid provider\")\n\t// ErrInvalidName indicates a cluster stack string has an invalid name.\n\tErrInvalidName = errors.New(\"invalid name\")\n)\n```\n\n## Types\n\n```go\ntype ClusterStack struct {\n\tProvider          string\n\tName              string\n\tKubernetesVersion kubernetesversion.KubernetesVersion\n\tVersion           version.Version\n}\n```\nClusterStack contains all properties defining a cluster stack.\n\n```go\nfunc New(provider, name, kubernetesVersion, csVersion string) (ClusterStack, error)\n```\nNew returns a ClusterStack based on a cluster stack properties and the version is in the form of - \"v1\", \"v1-alpha.1\", etc.\n\n```go\nfunc NewFromClusterClassProperties(str string) (ClusterStack, error)\n```\nNewFromClusterClassProperties returns a ClusterStack based on a cluster stack string. e.g. - \"docker-ferrol-1-27-v1\", \"docker-ferrol-1-27-v1-alpha.1\", etc.\n\n```go\nfunc NewFromClusterStackReleaseProperties(str string) (ClusterStack, error)\n```\nNewFromClusterStackReleaseProperties returns a ClusterStack based on a cluster stack string. e.g. - \"docker-ferrol-1-27-v1\", \"docker-ferrol-1-27-v1-alpha-1\", etc.\n\n```go\nfunc (cs *ClusterStack) String() string\n```\nString returns cluster stack with \"-\" notation.\n\n```go\nfunc (cs *ClusterStack) StringWithDot() string\n```\nStringWithDot returns cluster stack with semver \".\" notation.\n\n```go\nfunc (cs *ClusterStack) Validate() error\n```\nValidate validates a given ClusterStack.\n\n```go\ntype ClusterStacks []ClusterStack\n```\nClusterStacks implements sort.Interface for \\[]ClusterStack based on the release name / tag.\n\n```go\nfunc (r ClusterStacks) Contains(name string) bool\n```\nContains return if releases slice contains the given name or not.\n\n```go\nfunc (r ClusterStacks) Latest() *ClusterStack\n```\nLatest returns the latest release from the slice. If the slice is empty, it returns nil. The slice is expected to be sorted.\n\n```go\nfunc (r ClusterStacks) Len() int\n```\nLen returns the length of the slice.\n\n```go\nfunc (r ClusterStacks) Less(i, j int) bool\n```\nLess reports whether the element with index i should sort before the element with index j.\n\n```go\nfunc (r ClusterStacks) Swap(i, j int)\n```\nSwap swaps the elements with indexes i and j.\n\n","path":"github.com/SovereignCloudStack/cluster-stack-operator/pkg/clusterstack","name":"clusterstack","synopsis":"Package clusterstack contains functions related to clusterstacks.","isRedistributable":true}
