Documentation ¶
Index ¶
- type Config
- func (m *Config) FindDuplicateIDs() (duplicates []string)
- func (m *Config) FindRelationship(relationshipID string) *Relationship
- func (m *Config) FindRelationshipByFromName(relationshipFromName string) (res []Relationship)
- func (m *Config) FindRelationshipByToName(relationshipToName string) (res []Relationship)
- func (m *Config) FindService(serviceID string) *Service
- func (readGraph *Config) GenerateGraph(out io.Writer) (string, error)
- func (m *Config) IsEmpty() bool
- func (m *Config) LoadFile(fileName string) (err error)
- func (m *Config) LoadString(yamlString string) error
- func (m *Config) ServiceExists() (missing map[string][]string)
- func (m *Config) ValidateModel() error
- type Property
- type Relationship
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Name string `yaml:"Name" validate:"empty=false"` ID guid.GUID `yaml:"Id" validate:"empty=false"` Services []Service `yaml:"Services" validate:"empty=false"` Relationships []Relationship `yaml:"Relationships"` }
Config -- The DAG config for a deployment
func (*Config) FindDuplicateIDs ¶
FindDuplicateIDs checks for duplicate Relationship and Service IDs in a constellation file.
func (*Config) FindRelationship ¶
func (m *Config) FindRelationship(relationshipID string) *Relationship
FindRelationship -- Find a Relationship by id.
func (*Config) FindRelationshipByFromName ¶
func (m *Config) FindRelationshipByFromName(relationshipFromName string) (res []Relationship)
FindRelationshipByFromName -- Find a Relationship by the name that is the source of the rel.
func (*Config) FindRelationshipByToName ¶
func (m *Config) FindRelationshipByToName(relationshipToName string) (res []Relationship)
FindRelationshipByToName -- Find a Relationship by the name that is the target of the rel.
func (*Config) FindService ¶
FindService -- Find a Service by id.
func (*Config) GenerateGraph ¶
GenerateGraph - function to take a dagconfigService structure and create a graph object that contains the representation of the graph. Also outputs a string representation (GraphViz dot notation) of the resulting graph this can be passed on to GraphViz to graphically render the resulting graph
func (*Config) LoadString ¶
LoadString -- New DAG info instance from the given yaml string.
func (*Config) ServiceExists ¶
ServiceExists loops through each Relationship and checks if the services are declared.
func (*Config) ValidateModel ¶
ValidateModel checks if constellation has all required felids
type Property ¶
type Property interface{}
Property - an individual property in the DAG. For now, these are just interfaces as the value types are not firmed up for individual properties. As the entire set of properties becomes known, each should be promoted out of the Properties collection to the main struct -- handling presence/absence via using pointer members, so as to allow for nil value == absence.
type Relationship ¶
type Relationship struct { ID string `yaml:"Id" validate:"empty=false"` Description string `yaml:"Description"` From string `yaml:"From" validate:"empty=false"` To string `yaml:"To" validate:"empty=false"` Properties map[string]Property `yaml:"Properties"` }
Relationship -- a relationship between Services