Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ScriptDef ¶
type ScriptDef struct { Name string Template string Path string Type ScriptType ParamsInfo *ServerProvisioningInfo // contains filtered or unexported fields }
ScriptDef represents a model to render a script
func (*ScriptDef) GetScriptExecutionEnvVars ¶
GetScriptExecutionEnvVars generates the env vars to execute scripts
func (*ScriptDef) SaveToFile ¶
func (s *ScriptDef) SaveToFile()
SaveToFile saves rendered script to file
func (*ScriptDef) ScriptConfig ¶
func (s *ScriptDef) ScriptConfig() config.ManagerConfig
ScriptConfig returns the execution configuration
func (*ScriptDef) WithParams ¶
func (s *ScriptDef) WithParams(i *ServerProvisioningInfo) *ScriptDef
WithParams add the provisioning info
type ScriptEngine ¶
type ScriptEngine struct {
Cfg config.ManagerConfig
}
ScriptEngine is the script executor
func NewScriptEngine ¶
func NewScriptEngine(cfg config.ManagerConfig) ScriptEngine
NewScriptEngine sets up a new scripts.ScriptEngine
func (*ScriptEngine) GetProvisioningScript ¶
func (s *ScriptEngine) GetProvisioningScript(scriptName string) *ScriptDef
GetProvisioningScript returns a single provisioning script model
func (*ScriptEngine) GetScriptDef ¶
func (s *ScriptEngine) GetScriptDef(scriptName string, cfg config.ManagerConfig, scriptsDef map[string]map[string]string) *ScriptDef
GetScriptDef returns
func (*ScriptEngine) GetSetupScript ¶
func (s *ScriptEngine) GetSetupScript(scriptName string) *ScriptDef
GetSetupScript returns a single setup script model
func (*ScriptEngine) GetSetupScripts ¶
func (s *ScriptEngine) GetSetupScripts() []*ScriptDef
GetSetupScripts returns all the script models
type ScriptTemplateVars ¶
type ScriptTemplateVars struct { WorkspacePath string PythonVersion string VenvName string ProvisioningInfo *ServerProvisioningInfo }
ScriptTemplateVars is a representation of vars to parse script templates
type ScriptType ¶
type ScriptType string
ScriptType defines a type of script
const ( // AnsibleScript is ansible playbook script type AnsibleScript ScriptType = "Ansible" // ShellScript is shell script type ShellScript ScriptType = "Shell" )
type ServerProvisioningInfo ¶
type ServerProvisioningInfo struct { Game string IP string SSHPort int SSHKey string RemoteUser string Args map[string]string }
ServerProvisioningInfo is a model to represents provisioning parameters
func NewServerProvisioning ¶
func NewServerProvisioning(game string, ip string, sshPort int, remoteUser string, sshKey string, args []string) *ServerProvisioningInfo
NewServerProvisioning creates a server provisioning data