Documentation ¶
Index ¶
- func CreateProjectByName(filePath string, projectName string, skipValidation bool) (*core.Project, []error)
- func CreateProjectFromProjectDefinitions(projectDefinitions *ProjectDefinitions, projectName string) (*core.Project, []error)
- type ApplicationReference
- type ProjectConfig
- type ProjectDefinitions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateProjectByName ¶
func CreateProjectByName(filePath string, projectName string, skipValidation bool) (*core.Project, []error)
Factory for using a dedicated project name if projectName is empty it loads the default project
func CreateProjectFromProjectDefinitions ¶
func CreateProjectFromProjectDefinitions(projectDefinitions *ProjectDefinitions, projectName string) (*core.Project, []error)
Types ¶
type ApplicationReference ¶
type ApplicationReference struct { //Name - is used to reference Name string `json:"name" yaml:"name"` //Title and all other attributes are supposed to override or extend the properties of the referenced application Title string `json:"title,omitempty" yaml:"title,omitempty"` Summary string `json:"summary,omitempty" yaml:"summary,omitempty"` Description string `json:"description,omitempty" yaml:"description,omitempty"` Group string `json:"group,omitempty" yaml:"group,omitempty"` Technology string `json:"technology,omitempty" yaml:"technology,omitempty"` Category string `json:"category,omitempty" yaml:"category,omitempty"` AddProvidedServices []core.Service `json:"add-provided-services" yaml:"add-provided-services"` AddDependencies []core.Dependency `json:"add-dependencies" yaml:"add-dependencies"` Properties map[string]string `json:"properties" yaml:"properties"` }
func (*ApplicationReference) GetAdjustedApplication ¶
func (a *ApplicationReference) GetAdjustedApplication(application *core.Application) (*core.Application, error)
Merges the given application with another. The current application is the one who will be modified.
type ProjectConfig ¶
type ProjectConfig struct { Name string `json:"name" yaml:"name" ` IncludedApplication []*ApplicationReference `json:"included-applications" yaml:"included-applications"` }
func (*ProjectConfig) Validate ¶
func (p *ProjectConfig) Validate() []error
Validates project and Components
type ProjectDefinitions ¶
type ProjectDefinitions struct { ProjectConfig []*ProjectConfig `json:"projects" yaml:"projects"` Applications []*core.Application `json:"applications" yaml:"applications"` }
func LoadProjectDefinitions ¶
func LoadProjectDefinitions(filePath string) (*ProjectDefinitions, error)
Main Load/Factory Method
func (*ProjectDefinitions) FindApplicationByName ¶
func (p *ProjectDefinitions) FindApplicationByName(nameToMatch string) (*core.Application, error)
Find application by Name
func (*ProjectDefinitions) GetProjectConfig ¶
func (p *ProjectDefinitions) GetProjectConfig(nameToMatch string) *ProjectConfig
Gets the project info by name. If the name is not found, return the first available one.
func (*ProjectDefinitions) Validate ¶
func (p *ProjectDefinitions) Validate() []error
Validates Definitions
Click to show internal directories.
Click to hide internal directories.