-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathScriptModel.go
33 lines (27 loc) · 963 Bytes
/
ScriptModel.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
package main
import (
"encoding/xml"
)
type ScriptPackage struct {
XMLName xml.Name `xml:"ScriptPackage" json:"-"`
Scripts []ScriptEntity `xml:"Script" json:"-"`
ScriptGroup []ScriptEntity `xml:"ScriptGroup" json:"-"`
}
type ScriptEntity struct {
Name string `xml:"name" json:"name"`
IsActive string `xml:"isActive,attr" json:"isActive"`
EventHandlerList []string `xml:"eventHandlerList>string" json:"eventHandlerList,omitempty"`
Script string `xml:"script" json:"script"`
Scripts []ScriptEntity `xml:"Script" json:"children,omitempty"`
ScriptGroup []ScriptEntity `xml:"ScriptGroup" json:"-"`
IsFolder string `xml:"isFolder,attr" json:"isFolder"`
}
func (s *ScriptEntity) GetName() string {
return s.Name
}
func (s *ScriptEntity) GetScript() string {
return s.Script
}
func (s *ScriptEntity) SetScript(script string) {
s.Script = script
}