Documentation ¶
Index ¶
- Variables
- func GetApplicationTypes() ([]string, error)
- func GetConfigAsYaml() string
- func GetSCMTypes() []string
- func LoadConfig(filename string) error
- func SaveConfig(filename string) error
- type Application
- type Environment
- type Project
- func (p *Project) AddApplication(app Application) error
- func (p *Project) AddEnvironment(env Environment) error
- func (p *Project) ApplyValues()
- func (p *Project) GetProjectFilename() string
- func (p *Project) LoadProject() error
- func (p *Project) SaveProject() error
- func (p *Project) SetLocalDirectory(path string) error
- func (p *Project) SetProjectName(name string) error
- type SCM
- type User
Constants ¶
This section is empty.
Variables ¶
var Config map[interface{}]interface{}
Config holds the default configuration values for prefab
Functions ¶
func GetApplicationTypes ¶
GetApplicationTypes returns a list of applications types
func GetConfigAsYaml ¶
func GetConfigAsYaml() string
GetConfigAsYaml will return the serialized version of the glocal config
func LoadConfig ¶
LoadConfig read the default configuration vales for prefab from the given filename
func SaveConfig ¶
SaveConfig saved the updated configuration values to the specified file
Types ¶
type Application ¶
type Application struct { Name string Type string Repo string Summary string Config map[string]string LocalDirectory string SCM }
Application describes a template of the app repo
func GetApplications ¶
func GetApplications(appType string) []Application
GetApplications returns a list of applications of the specified types
type Environment ¶
type Environment struct { Name string Type string Repo string Summary string LocalDirectory string Config map[string]string SCM }
Environment describes a build or a run environment
func GetBuildEnvironmentTypes ¶
func GetBuildEnvironmentTypes() ([]Environment, error)
GetBuildEnvironmentTypes returns a list of supported environment types
func GetRuntimeEnvironmentTypes ¶
func GetRuntimeEnvironmentTypes() ([]Environment, error)
GetRuntimeEnvironmentTypes returns a list of supported environment types
type Project ¶
type Project struct { Name string PID uint32 LocalDirectory string Environments map[string]Environment Applications map[string]Application }
Project parameters
var CurrentProject *Project
CurrentProject values
func (*Project) AddApplication ¶
func (p *Project) AddApplication(app Application) error
AddApplication Validates and adds to teh Environment collection
func (*Project) AddEnvironment ¶
func (p *Project) AddEnvironment(env Environment) error
AddEnvironment Validates and adds to teh Environment collection
func (*Project) ApplyValues ¶
func (p *Project) ApplyValues()
ApplyValues will subsitute any go templates
func (*Project) GetProjectFilename ¶
GetProjectFilename gets the full path of the project settings file
func (*Project) LoadProject ¶
LoadProject based on name and LocalDirectory
func (*Project) SaveProject ¶
SaveProject will the save the vales in the project struct
func (*Project) SetLocalDirectory ¶
SetLocalDirectory Validates and Sets the local path where the generated files will be placed.
func (*Project) SetProjectName ¶
SetProjectName Validates and Sets the projectName