forked from tliron/puccini
-
Notifications
You must be signed in to change notification settings - Fork 0
/
substitution.go
31 lines (27 loc) · 1.13 KB
/
substitution.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package normal
//
// Substitution
//
type Substitution struct {
ServiceTemplate *ServiceTemplate `json:"-" yaml:"-"`
Type string `json:"type" yaml:"type"`
TypeMetadata map[string]string `json:"typeMetadata" yaml:"typeMetadata"`
CapabilityMappings Mappings `json:"capabilityMappings" yaml:"capabilityMappings"`
RequirementMappings Mappings `json:"requirementMappings" yaml:"requirementMappings"`
PropertyMappings Mappings `json:"propertyMappings" yaml:"propertyMappings"`
AttributeMappings Mappings `json:"attributeMappings" yaml:"attributeMappings"`
InterfaceMappings Mappings `json:"interfaceMappings" yaml:"interfaceMappings"`
}
func (self *ServiceTemplate) NewSubstitution() *Substitution {
substitution := &Substitution{
ServiceTemplate: self,
TypeMetadata: make(map[string]string),
CapabilityMappings: make(Mappings),
RequirementMappings: make(Mappings),
PropertyMappings: make(Mappings),
AttributeMappings: make(Mappings),
InterfaceMappings: make(Mappings),
}
self.Substitution = substitution
return substitution
}