Documentation ¶
Index ¶
- type Config
- func (c *Config) AddProjectConfigFile() (err error)
- func (c *Config) DisableCopyright() error
- func (c *Config) EnableCopyright() error
- func (c *Config) FindProjectPathInJSON(pc ProjectSettings)
- func (c *Config) GetCommandInactveStatus(cmd string) bool
- func (c *Config) GetDockerCommand() string
- func (c *Config) GetFile() string
- func (c *Config) GetMainContainerUser() string
- func (c *Config) GetProjectDockerPath() string
- func (c *Config) GetProjectMainContainer() string
- func (c *Config) GetProjectName() string
- func (c *Config) GetProjectNameList() []string
- func (c *Config) GetProjectPath() string
- func (c *Config) GetShell() string
- func (c *Config) GetStartCommand() string
- func (c *Config) GetUserFile() string
- func (c *Config) GetXDebugCliIniPath() string
- func (c *Config) GetXDebugConfigLocaton() string
- func (c *Config) GetXDebugFpmIniPath() string
- func (c *Config) Init()
- func (c *Config) LoadConfig(seekProject bool) (err error)
- func (c *Config) LoadProjectConfig() (status bool, err error)
- func (c *Config) ProjectConfgFileFound() bool
- func (c *Config) SaveContainerNameToProjectConfig(cn string) (err error)
- func (c *Config) SaveContainerUserToProjectConfig(cu string) (err error)
- func (c *Config) SaveDockerCliXdebugIniFilePath(path string) (err error)
- func (c *Config) SaveDockerFpmXdebugIniFilePath(path string) (err error)
- func (c *Config) SaveDockerProjectPath(path string) (err error)
- func (c *Config) SaveShellCommand(cmd string) (err error)
- func (c *Config) SaveStartCommandToProjectConfig(cmd string) (err error)
- func (c *Config) SaveXDebugConifgLocaton(path string) (err error)
- func (c *Config) SetDockerCommand(command string) error
- func (c *Config) SetFileSystem(fs fileSystem)
- func (c *Config) SetProjectName(name string)
- func (c *Config) SetProjectPath(path string)
- func (c *Config) SetUserFile(file string)
- func (c *Config) ShowCopyrightText() bool
- type GlobalConfig
- func (g *GlobalConfig) AddNewProject(p GlobalProjectConfig)
- func (g *GlobalConfig) DisableCopyright()
- func (g *GlobalConfig) EnableCopyright()
- func (g *GlobalConfig) FindProjectPathInJSON(f func(GlobalProjectConfig) (bool, error)) error
- func (g *GlobalConfig) GetCommandInactveStatus(cmd string) bool
- func (g *GlobalConfig) GetDockerCommand() string
- func (g *GlobalConfig) GetProjectNameList() []string
- func (g *GlobalConfig) SetDockerCommand(c string)
- func (g *GlobalConfig) ShowCopyrightText() bool
- type GlobalProjectConfig
- type ProjectConfig
- func (p *ProjectConfig) GetDockerProjectPath() string
- func (p *ProjectConfig) GetMainContainer() string
- func (p *ProjectConfig) GetMainContainerUser() string
- func (p *ProjectConfig) GetName() string
- func (p *ProjectConfig) GetPath() string
- func (p *ProjectConfig) GetShell() string
- func (p *ProjectConfig) GetStartCommand() string
- func (p *ProjectConfig) GetXDebugCliIniPath() string
- func (p *ProjectConfig) GetXDebugConfigLocaton() string
- func (p *ProjectConfig) GetXDebugFpmIniPath() string
- type ProjectSettings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { ProjectFile string UserFile string // has to contain absolute path to user config and the filename itself // contains filtered or unexported fields }
Config contains configuration from json config file
func (*Config) AddProjectConfigFile ¶
AddProjectConfigFile generates project config file
func (*Config) DisableCopyright ¶
DisableCopyright Disable copyright output
func (*Config) EnableCopyright ¶
EnableCopyright Enable copyright output
func (*Config) FindProjectPathInJSON ¶
func (c *Config) FindProjectPathInJSON(pc ProjectSettings)
FindProjectPathInJSON check if project path in the json
func (*Config) GetCommandInactveStatus ¶ added in v1.6.0
GetCommandInactveStatus gets command status
func (*Config) GetDockerCommand ¶
GetDockerCommand gets the docker command
func (*Config) GetMainContainerUser ¶ added in v1.8.3
GetMainContainerUser gets project main container
func (*Config) GetProjectDockerPath ¶
GetProjectDockerPath gets project main container
func (*Config) GetProjectMainContainer ¶
GetProjectMainContainer gets project main container
func (*Config) GetProjectName ¶
GetProjectName gets project path
func (*Config) GetProjectNameList ¶
GetProjectNameList get projects name list
func (*Config) GetProjectPath ¶
GetProjectPath gets project path
func (*Config) GetStartCommand ¶
GetStartCommand gets start command
func (*Config) GetUserFile ¶ added in v1.8.2
GetUserFile gets user config file
func (*Config) GetXDebugCliIniPath ¶
GetXDebugCliIniPath gets cli xdebug ini file path
func (*Config) GetXDebugConfigLocaton ¶
GetXDebugConfigLocaton gets cli xdebug ini file path
func (*Config) GetXDebugFpmIniPath ¶
GetXDebugFpmIniPath gets fpm xdebug ini file path
func (*Config) LoadConfig ¶
LoadConfig loads configuration
func (*Config) LoadProjectConfig ¶
LoadProjectConfig loads project config
func (*Config) ProjectConfgFileFound ¶
ProjectConfgFileFound checks if current path has config file
func (*Config) SaveContainerNameToProjectConfig ¶
SaveContainerNameToProjectConfig saves container name into project file
func (*Config) SaveContainerUserToProjectConfig ¶ added in v1.8.3
SaveContainerUserToProjectConfig saves container name into project file
func (*Config) SaveDockerCliXdebugIniFilePath ¶
SaveDockerCliXdebugIniFilePath saves xdebug cli ini file path into project file
func (*Config) SaveDockerFpmXdebugIniFilePath ¶
SaveDockerFpmXdebugIniFilePath saves xdebug fpm ini file path into project file
func (*Config) SaveDockerProjectPath ¶
SaveDockerProjectPath saves path to project in container into project file
func (*Config) SaveShellCommand ¶
SaveShellCommand saves linux shell command
func (*Config) SaveStartCommandToProjectConfig ¶
SaveStartCommandToProjectConfig saves container name into project file
func (*Config) SaveXDebugConifgLocaton ¶
SaveXDebugConifgLocaton saves xdebug file location
func (*Config) SetDockerCommand ¶
SetDockerCommand define docker command
func (*Config) SetFileSystem ¶
func (c *Config) SetFileSystem(fs fileSystem)
SetFileSystem set file system object
func (*Config) SetProjectName ¶
SetProjectName set project path for config
func (*Config) SetProjectPath ¶
SetProjectPath set project path for config
func (*Config) SetUserFile ¶ added in v1.8.2
SetUserFile sets user config file
func (*Config) ShowCopyrightText ¶
ShowCopyrightText check the status of copyright output
type GlobalConfig ¶
type GlobalConfig struct { Projects []GlobalProjectConfig `json:"projects"` Copyright bool `json:"copyright_text"` DockerCommand string `json:"docker_service"` InactiveCommandTypes []string `json:"inactive_command_types"` }
GlobalConfig contains file config
func (*GlobalConfig) AddNewProject ¶
func (g *GlobalConfig) AddNewProject(p GlobalProjectConfig)
AddNewProject adds new project
func (*GlobalConfig) DisableCopyright ¶
func (g *GlobalConfig) DisableCopyright()
DisableCopyright Disable copyright output
func (*GlobalConfig) EnableCopyright ¶
func (g *GlobalConfig) EnableCopyright()
EnableCopyright Enable copyright output
func (*GlobalConfig) FindProjectPathInJSON ¶
func (g *GlobalConfig) FindProjectPathInJSON(f func(GlobalProjectConfig) (bool, error)) error
FindProjectPathInJSON find project path in json
func (*GlobalConfig) GetCommandInactveStatus ¶ added in v1.6.0
func (g *GlobalConfig) GetCommandInactveStatus(cmd string) bool
GetCommandInactveStatus checks command visibility
func (*GlobalConfig) GetDockerCommand ¶
func (g *GlobalConfig) GetDockerCommand() string
GetDockerCommand gets the docker command
func (*GlobalConfig) GetProjectNameList ¶
func (g *GlobalConfig) GetProjectNameList() []string
GetProjectNameList gets project name list
func (*GlobalConfig) SetDockerCommand ¶
func (g *GlobalConfig) SetDockerCommand(c string)
SetDockerCommand define docker command
func (*GlobalConfig) ShowCopyrightText ¶
func (g *GlobalConfig) ShowCopyrightText() bool
ShowCopyrightText check the status of copyright output
type GlobalProjectConfig ¶
GlobalProjectConfig contains project config
type ProjectConfig ¶
type ProjectConfig struct { Path string `json:"-"` Name string `json:"name"` MainContainer string `json:"main_container"` StartCommand string `json:"start_command"` DockerProjectPath string `json:"path"` XDebugLocation string `json:"xdebug_location"` XDebugCliIniPath string `json:"xdebug_path_cli"` XDebugFpmIniPath string `json:"xdebug_path_fpm"` Shell string `json:"shell"` ContainerUser string `json:"main_container_user"` }
ProjectConfig contains project settings
func (*ProjectConfig) GetDockerProjectPath ¶
func (p *ProjectConfig) GetDockerProjectPath() string
GetDockerProjectPath gets path to project
func (*ProjectConfig) GetMainContainer ¶
func (p *ProjectConfig) GetMainContainer() string
GetMainContainer gets php container name
func (*ProjectConfig) GetMainContainerUser ¶ added in v1.8.3
func (p *ProjectConfig) GetMainContainerUser() string
GetMainContainerUser gets php container main user
func (*ProjectConfig) GetPath ¶
func (p *ProjectConfig) GetPath() string
GetPath gets path to project
func (*ProjectConfig) GetShell ¶
func (p *ProjectConfig) GetShell() string
GetShell gets path to project
func (*ProjectConfig) GetStartCommand ¶
func (p *ProjectConfig) GetStartCommand() string
GetStartCommand gets php container name
func (*ProjectConfig) GetXDebugCliIniPath ¶
func (p *ProjectConfig) GetXDebugCliIniPath() string
GetXDebugCliIniPath gets path to project
func (*ProjectConfig) GetXDebugConfigLocaton ¶
func (p *ProjectConfig) GetXDebugConfigLocaton() string
GetXDebugConfigLocaton gets xdebug file config location
func (*ProjectConfig) GetXDebugFpmIniPath ¶
func (p *ProjectConfig) GetXDebugFpmIniPath() string
GetXDebugFpmIniPath gets path to project
type ProjectSettings ¶ added in v1.8.2
type ProjectSettings interface { GetProjectName() string GetProjectPath() string SetProjectName(string) SetProjectPath(string) }
ProjectSettings is not the same as ProjectConfig, but the similar one. it helps to call FindProjectPathInJSON from the outside (ie main function), where ProjectSettings is used as projectConfig, see main_start.go