pkg

package
v0.28.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

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

func GetModulePath() (string, error)

GetModulePath returns the current module path of the project.

func LatestUpgradeVersion

func LatestUpgradeVersion() (string, error)

LatestUpgradeVersion returns the latest upgrade version.

This version can be used for a fresh init.

func ListUpgrades

func ListUpgrades(version string) ([]string, error)

ListUpgrades provides a list of all unapplied upgrade versions.

func SaveConfig

func SaveConfig(config *Config) error

SaveConfig updates or creates the tilores.json.

Types

type ByName

type ByName []fs.DirEntry

ByName implements the sortable interface to order by a file name.

func (ByName) Len

func (a ByName) Len() int

func (ByName) Less

func (a ByName) Less(i, j int) bool

func (ByName) Swap

func (a ByName) Swap(i, j int)

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.

func LoadConfig

func LoadConfig() (*Config, error)

LoadConfig reads the current tilores.json.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL