-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathartifact.go
38 lines (32 loc) · 1.12 KB
/
artifact.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
32
33
34
35
36
37
38
package normal
//
// Artifact
//
type Artifact struct {
NodeTemplate *NodeTemplate `json:"-" yaml:"-"`
Name string `json:"-" yaml:"-"`
Description string `json:"description" yaml:"description"`
Types EntityTypes `json:"types" yaml:"types"`
Properties Values `json:"properties" yaml:"properties"`
Filename string `json:"filename" yaml:"filename"`
SourcePath string `json:"sourcePath" yaml:"sourcePath"`
TargetPath string `json:"targetPath" yaml:"targetPath"`
Version string `json:"version" yaml:"version"`
ChecksumAlgorithm string `json:"checksumAlgorithm" yaml:"checksumAlgorithm"`
Checksum string `json:"checksum" yaml:"checksum"`
Credential Value `json:"credential" yaml:"credential"`
}
func (self *NodeTemplate) NewArtifact(name string) *Artifact {
artifact := &Artifact{
NodeTemplate: self,
Name: name,
Types: make(EntityTypes),
Properties: make(Values),
}
self.Artifacts[name] = artifact
return artifact
}
//
// Artifacts
//
type Artifacts map[string]*Artifact