config

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

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

func (c *Config) AddProjectConfigFile() (err error)

AddProjectConfigFile generates project config file

func (*Config) DisableCopyright

func (c *Config) DisableCopyright() error

DisableCopyright Disable copyright output

func (*Config) EnableCopyright

func (c *Config) EnableCopyright() error

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

func (c *Config) GetCommandInactveStatus(cmd string) bool

GetCommandInactveStatus gets command status

func (*Config) GetDockerCommand

func (c *Config) GetDockerCommand() string

GetDockerCommand gets the docker command

func (*Config) GetFile

func (c *Config) GetFile() string

GetFile gets project file

func (*Config) GetProjectDockerPath

func (c *Config) GetProjectDockerPath() string

GetProjectDockerPath gets project main container

func (*Config) GetProjectMainContainer

func (c *Config) GetProjectMainContainer() string

GetProjectMainContainer gets project main container

func (*Config) GetProjectName

func (c *Config) GetProjectName() string

GetProjectName gets project path

func (*Config) GetProjectNameList

func (c *Config) GetProjectNameList() []string

GetProjectNameList get projects name list

func (*Config) GetProjectPath

func (c *Config) GetProjectPath() string

GetProjectPath gets project path

func (*Config) GetShell

func (c *Config) GetShell() string

GetShell gets shell command

func (*Config) GetStartCommand

func (c *Config) GetStartCommand() string

GetStartCommand gets start command

func (*Config) GetXDebugCliIniPath

func (c *Config) GetXDebugCliIniPath() string

GetXDebugCliIniPath gets cli xdebug ini file path

func (*Config) GetXDebugConfigLocaton

func (c *Config) GetXDebugConfigLocaton() string

GetXDebugConfigLocaton gets cli xdebug ini file path

func (*Config) GetXDebugFpmIniPath

func (c *Config) GetXDebugFpmIniPath() string

GetXDebugFpmIniPath gets fpm xdebug ini file path

func (*Config) Init

func (c *Config) Init()

Init Initiate conifg

func (*Config) LoadConfig

func (c *Config) LoadConfig(seekProject bool) (err error)

LoadConfig loads configuration

func (*Config) LoadProjectConfig

func (c *Config) LoadProjectConfig() (status bool, err error)

LoadProjectConfig loads project config

func (*Config) ProjectConfgFileFound

func (c *Config) ProjectConfgFileFound() bool

ProjectConfgFileFound checks if current path has config file

func (*Config) SaveContainerNameToProjectConfig

func (c *Config) SaveContainerNameToProjectConfig(cn string) (err error)

SaveContainerNameToProjectConfig saves container name into project file

func (*Config) SaveDockerCliXdebugIniFilePath

func (c *Config) SaveDockerCliXdebugIniFilePath(path string) (err error)

SaveDockerCliXdebugIniFilePath saves xdebug cli ini file path into project file

func (*Config) SaveDockerFpmXdebugIniFilePath

func (c *Config) SaveDockerFpmXdebugIniFilePath(path string) (err error)

SaveDockerFpmXdebugIniFilePath saves xdebug fpm ini file path into project file

func (*Config) SaveDockerProjectPath

func (c *Config) SaveDockerProjectPath(path string) (err error)

SaveDockerProjectPath saves path to project in container into project file

func (*Config) SaveShellCommand

func (c *Config) SaveShellCommand(cmd string) (err error)

SaveShellCommand saves linux shell command

func (*Config) SaveStartCommandToProjectConfig

func (c *Config) SaveStartCommandToProjectConfig(cmd string) (err error)

SaveStartCommandToProjectConfig saves container name into project file

func (*Config) SaveXDebugConifgLocaton

func (c *Config) SaveXDebugConifgLocaton(path string) (err error)

SaveXDebugConifgLocaton saves xdebug file location

func (*Config) SetDockerCommand

func (c *Config) SetDockerCommand(command string) error

SetDockerCommand define docker command

func (*Config) SetFileSystem

func (c *Config) SetFileSystem(fs fileSystem)

SetFileSystem set file system object

func (*Config) SetProjectName

func (c *Config) SetProjectName(name string)

SetProjectName set project path for config, it's not the same as projectSettings

func (*Config) SetProjectPath

func (c *Config) SetProjectPath(path string)

SetProjectPath set project path for config, it's not the same as projectSettings

func (*Config) ShowCopyrightText

func (c *Config) ShowCopyrightText() bool

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

GetCommandStatus 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

type GlobalProjectConfig struct {
	Path string `json:"path"`
	Name string `json:"name"`
}

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"`
}

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) GetName

func (p *ProjectConfig) GetName() string

GetName gets project name

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

Jump to

Keyboard shortcuts

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