application

package
v2.5.2 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

README

This package contains the application layer, that is used to return a initialized project.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationOverrides

type ApplicationOverrides 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"`
	RemoveProvidedServices []string          `json:"remove-provided-services" yaml:"remove-provided-services"`
	AddDependencies        []core.Dependency `json:"add-dependencies" yaml:"add-dependencies"`
	RemoveDependencies     []string          `json:"remove-dependencies" yaml:"remove-dependencies"`
	Properties             map[string]string `json:"properties" yaml:"properties"`
}

func (*ApplicationOverrides) GetAdjustedApplication

func (a *ApplicationOverrides) GetAdjustedApplication(application *core.Application) (*core.Application, error)

GetAdjustedApplication - Merges the given application with another. The current application is the one who will be modified.

type ErrorCollection

type ErrorCollection struct {
	Errors []error
}

func (*ErrorCollection) Add

func (e *ErrorCollection) Add(err error)

func (*ErrorCollection) Error

func (e *ErrorCollection) Error() string

func (*ErrorCollection) ErrorsOrNil

func (e *ErrorCollection) ErrorsOrNil() error

type ProjectConfig

type ProjectConfig struct {
	SubViewConfig       []*SubViewConfig        `json:"subViews" yaml:"subViews"`
	AppDefinitionsPaths []string                `json:"appDefinitionsPaths" yaml:"appDefinitionsPaths"`
	ProjectName         string                  `json:"projectName" yaml:"projectName"`
	AppOverrides        []*ApplicationOverrides `json:"appOverrides" yaml:"appOverrides"`
}

func (*ProjectConfig) FindSubViewConfigByName

func (p *ProjectConfig) FindSubViewConfigByName(nameToMatch string) (*SubViewConfig, error)

FindSubViewConfigByName - Find project info by Name

func (*ProjectConfig) Validate

func (p *ProjectConfig) Validate() []error

Validates Definitions

type ProjectLoader

type ProjectLoader struct {
	StrictMode bool
}

func (*ProjectLoader) LoadApplications

func (p *ProjectLoader) LoadApplications(filePath string) ([]*core.Application, error)

func (*ProjectLoader) LoadProject

func (p *ProjectLoader) LoadProject(projectConfig *ProjectConfig, baseFolder string, limitToSubView string) (*core.Project, error)

func (*ProjectLoader) LoadProjectConfig

func (p *ProjectLoader) LoadProjectConfig(filePath string) (*ProjectConfig, error)

func (*ProjectLoader) LoadProjectFromConfigFile

func (p *ProjectLoader) LoadProjectFromConfigFile(filePath string, limitToSubView string) (*core.Project, error)

type SubViewConfig

type SubViewConfig struct {
	Name                string   `json:"name" yaml:"name" `
	IncludedApplication []string `json:"included-applications" yaml:"included-applications"`
}

func (*SubViewConfig) GetMatchedApps

func (s *SubViewConfig) GetMatchedApps(apps []*core.Application) []*core.Application

Jump to

Keyboard shortcuts

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