Documentation ¶
Index ¶
- Variables
- func DatabaseVersiondUnsynced(providedVersion, dbVersion string) bool
- func GetProjectRoot(debug bool) (string, error)
- func Install(home string, brand CloudBrand) (string, error)
- func IsPhpExtensionAvailable(ext, phpVersion string) bool
- func ReadDBVersionFromDoctrineConfigYAML(projectDir string) (string, error)
- func ReadDBVersionFromDotEnv(projectDir string) (string, error)
- func ReadDBVersionFromPlatformServiceYAML(projectDir string) (string, string, error)
- func ServiceLastVersion(name string) string
- type ApplicationsDotYaml
- type CLI
- func (p *CLI) AddBeforeHook(name string, f console.BeforeFunc)
- func (p *CLI) PSHMainCommands() []*console.Command
- func (p *CLI) RunInteractive(logger zerolog.Logger, projectDir string, args []string, debug bool, ...) (bytes.Buffer, bool)
- func (p *CLI) WrapHelpPrinter() func(w io.Writer, templ string, data interface{})
- type CloudBrand
- type LocalApplication
- type LocalApplications
- type LocalWorker
- type Project
- type UpsunDotYaml
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrProjectRootNotFoundNoGitRemote = goerr.New("project root not found, current directory not linked to a Platform.sh/Upsun project") ErrNoGitBranchMatching = goerr.New("current git branch name doesn't match any Platform.sh/Upsun environments") )
View Source
var Commands = []*console.Command{}/* 159 elements not displayed */
View Source
var NoBrand = CloudBrand{
Name: "",
ProjectConfigPath: "",
CLIConfigPath: ".platformsh",
CLIPrefix: "PLATFORMSH_CLI_",
CommandPrefix: "cloud:",
GitRemoteName: "",
BinName: "platform",
}
NoBrand is used when there is no explicit setting for the brand.
View Source
var PlatformshBrand = CloudBrand{
Name: "Platform.sh",
ProjectConfigPath: ".platform",
CLIConfigPath: ".platformsh",
CLIPrefix: "PLATFORMSH_CLI_",
CommandPrefix: "cloud:",
GitRemoteName: "platform",
BinName: "platform",
}
View Source
var UpsunBrand = CloudBrand{
Name: "Upsun",
ProjectConfigPath: ".upsun",
CLIConfigPath: ".upsun-cli",
CLIPrefix: "UPSUN_CLI_",
CommandPrefix: "upsun:",
GitRemoteName: "upsun",
BinName: "upsun",
}
Functions ¶
func GetProjectRoot ¶
func Install ¶
func Install(home string, brand CloudBrand) (string, error)
Install installs or updates the Platform.sh CLI tool.
func IsPhpExtensionAvailable ¶
func ReadDBVersionFromDotEnv ¶
func ServiceLastVersion ¶
Types ¶
type ApplicationsDotYaml ¶
type ApplicationsDotYaml []struct { LocalApplication `yaml:",inline"` Source struct { Root string } }
Only a wrapper type around LocalApplication used to get Access to `source.root` when unmarshalling
type CLI ¶
type CLI struct { Commands []*console.Command Hooks map[string]console.BeforeFunc // contains filtered or unexported fields }
func (*CLI) AddBeforeHook ¶
func (p *CLI) AddBeforeHook(name string, f console.BeforeFunc)
func (*CLI) PSHMainCommands ¶
func (*CLI) RunInteractive ¶
type CloudBrand ¶
type CloudBrand struct { Name string ProjectConfigPath string CommandPrefix string CLIConfigPath string CLIPrefix string GitRemoteName string BinName string }
func GuessCloudFromCommandName ¶
func GuessCloudFromCommandName(name string) CloudBrand
func GuessCloudFromDirectory ¶
func GuessCloudFromDirectory(dir string) CloudBrand
func (CloudBrand) BinaryPath ¶
func (b CloudBrand) BinaryPath() string
BinaryPath returns the cloud binary path.
func (CloudBrand) String ¶
func (b CloudBrand) String() string
type LocalApplication ¶
type LocalApplication struct { DefinitionFile string `yaml:"-"` LocalRootDir string `yaml:"-"` Name string `yaml:"name"` Type string `yaml:"type"` Workers map[string]LocalWorker `yaml:"workers"` }
func GuessSelectedAppByDirectory ¶
func GuessSelectedAppByDirectory(directory string, apps LocalApplications) *LocalApplication
func GuessSelectedAppByWd ¶
func GuessSelectedAppByWd(apps LocalApplications) *LocalApplication
func (LocalApplication) GetName ¶
func (p LocalApplication) GetName() string
ApplicationInterface interface
type LocalApplications ¶
type LocalApplications []LocalApplication
func FindLocalApplications ¶
func FindLocalApplications(rootDirectory string) LocalApplications
func (LocalApplications) Len ¶
func (p LocalApplications) Len() int
LocalApplications attaches the methods of Interface to []LocalApplication, sorting in increasing order.
func (LocalApplications) Less ¶
func (p LocalApplications) Less(i, j int) bool
func (LocalApplications) Swap ¶
func (p LocalApplications) Swap(i, j int)
type LocalWorker ¶
type LocalWorker struct { }
type UpsunDotYaml ¶
type UpsunDotYaml struct { Applications map[string]struct { LocalApplication `yaml:",inline"` Source struct { Root string } } }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.