-
Notifications
You must be signed in to change notification settings - Fork 2
/
serverpackv2.xsd.go
115 lines (101 loc) · 3.4 KB
/
serverpackv2.xsd.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
package schema
// ServerPack ...
type ServerPack struct {
VersionAttr string `xml:"version,attr"`
Server []*ServerType `xml:"Server"`
}
// Import ...
type Import struct {
UrlAttr string `xml:"url,attr,omitempty"`
Value string `xml:",chardata"`
}
// ServerType ...
type ServerType struct {
IdAttr string `xml:"id,attr"`
AbstractAttr bool `xml:"abstract,attr,omitempty"`
NameAttr string `xml:"name,attr"`
NewsUrlAttr string `xml:"newsUrl,attr,omitempty"`
IconUrlAttr string `xml:"iconUrl,attr,omitempty"`
VersionAttr string `xml:"version,attr"`
ServerAddressAttr string `xml:"serverAddress,attr,omitempty"`
GenerateListAttr bool `xml:"generateList,attr,omitempty"`
AutoConnectAttr bool `xml:"autoConnect,attr,omitempty"`
RevisionAttr string `xml:"revision,attr"`
MainClassAttr string `xml:"mainClass,attr,omitempty"`
LauncherTypeAttr string `xml:"launcherType,attr,omitempty"`
LibOverridesAttr string `xml:"libOverrides,attr,omitempty"`
ServerClassAttr string `xml:"serverClass,attr,omitempty"`
Loader []*LoaderType `xml:"Loader"`
Import []*Import `xml:"Import"`
Module []*ModuleType `xml:"Module"`
}
// LoaderType ...
type LoaderType struct {
TypeAttr string `xml:"type,attr"`
VersionAttr string `xml:"version,attr"`
LoadOrderAttr int `xml:"loadOrder,attr"`
}
// ModuleType ...
type ModuleType struct {
Submodule []*ModuleGenericType `xml:"Submodule"`
ConfigFile []*ConfigType `xml:"ConfigFile"`
*ModuleGenericType
}
// URL ...
type URL struct {
PriorityAttr int `xml:"priority,attr,omitempty"`
Value string `xml:",chardata"`
}
// Curse ...
type Curse struct {
ProjectAttr string `xml:"project,attr,omitempty"`
FileAttr int `xml:"file,attr,omitempty"`
TypeAttr string `xml:"type,attr,omitempty"`
AutoupgradeAttr bool `xml:"autoupgrade,attr,omitempty"`
}
// Required ...
type Required struct {
IsDefaultAttr bool `xml:"isDefault,attr,omitempty"`
Value bool `xml:",chardata"`
}
// ModType ...
type ModType struct {
InRootAttr bool `xml:"inRoot,attr,omitempty"`
OrderAttr int `xml:"order,attr,omitempty"`
KeepMetaAttr bool `xml:"keepMeta,attr,omitempty"`
LaunchArgsAttr string `xml:"launchArgs,attr,omitempty"`
JreArgsAttr string `xml:"jreArgs,attr,omitempty"`
*ModEnum `xml:",chardata"`
}
// ModuleGenericType ...
type ModuleGenericType struct {
NameAttr string `xml:"name,attr"`
IdAttr string `xml:"id,attr"`
DependsAttr string `xml:"depends,attr,omitempty"`
SideAttr string `xml:"side,attr,omitempty"`
URL []*URL `xml:"URL"`
Curse *Curse `xml:"Curse"`
LoadPrefix string `xml:"LoadPrefix,omitempty"`
ModPath string `xml:"ModPath,omitempty"`
Size int64 `xml:"Size"`
Required *Required `xml:"Required"`
ModType *ModType `xml:"ModType"`
MD5 string `xml:"MD5"`
Meta *MetaType `xml:"Meta"`
}
// ConfigType ...
type ConfigType struct {
URL []*URL `xml:"URL"`
Path string `xml:"Path"`
NoOverwrite bool `xml:"NoOverwrite"`
MD5 string `xml:"MD5"`
}
// MetaType ...
type MetaType struct {
}
// ModEnum ...
type ModEnum string
var (
ModTypeRegular = ModEnum("Regular")
ModTypeExtract = ModEnum("Extract")
)