Documentation
¶
Index ¶
- func CreateUpgradeSteps(upgradeVersion string, variables map[string]interface{}) ([]step.Step, error)
- func GetModulePath() (string, error)
- func LatestUpgradeVersion() (string, error)
- func ListUpgrades(version string) ([]string, error)
- func SaveConfig(config *Config) error
- type ByName
- type Config
- type ProjectVariables
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateUpgradeSteps ¶
func CreateUpgradeSteps(upgradeVersion string, variables map[string]interface{}) ([]step.Step, error)
CreateUpgradeSteps creates the upgrade steps for the provided version.
func GetModulePath ¶
GetModulePath returns the current module path of the project.
func LatestUpgradeVersion ¶
LatestUpgradeVersion returns the latest upgrade version.
This version can be used for a fresh init.
func ListUpgrades ¶
ListUpgrades provides a list of all unapplied upgrade versions.
func SaveConfig ¶
SaveConfig updates or creates the tilores.json.
Types ¶
type Config ¶
type Config struct {
Version string `json:"version"`
}
Config represents the tilores.json config that holds the version number.
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns the default config if tilores.json does not exist.
This should only be the case for very old projects or for cases where a user removed the tilores.json.
type ProjectVariables ¶ added in v0.34.1
type ProjectVariables struct {
DeployPrefix string
}
ProjectVariables contains variables needed to init and upgrade the project.
func CollectVariables ¶ added in v0.34.1
func CollectVariables() (*ProjectVariables, error)
CollectVariables collects all ProjectVariables.