-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata.go
84 lines (77 loc) · 2.48 KB
/
data.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
// here are structs stored that are only used for unmarshalling
package presskit
// game represents the data of a game
type game struct {
Title string `xml:"title"`
Description string `xml:"description"`
History []struct {
Header string `xml:"header"`
Text string `xml:"text"`
} `xml:"history>paragraph"`
Videos []video `xml:"videos>video"`
ReleaseDates []string `xml:"release-dates>release-date"`
Website link `xml:"website"`
PressRequestCopy bool `xml:"press-can-request-copy"`
Monetize string `xml:"monetization-permission"`
Platforms []link `xml:"platforms>platform"`
Prices []string `xml:"prices>price"`
Features []string `xml:"features>feature"`
//Social []link `xml:"social>link"`
Quotes []quote `xml:"quotes>quote"`
Awards []award `xml:"awards>award"`
Additionals []additional `xml:"additionals>additional"`
Credits []credit `xml:"credits>credit"`
}
// company represents the data of a company
type company struct {
Title string `xml:"title"`
Website link `xml:"website"`
FoundingDate string `xml:"founding-date"`
BasedIn string `xml:"based-in"`
PressContact string `xml:"press-contact"`
Description string `xml:"description"`
History []struct {
Header string `xml:"header"`
Text string `xml:"text"`
} `xml:"history>paragraph"`
Address []string `xml:"address>line"`
Phone string `xml:"phone"`
Social []link `xml:"social>link"`
Videos []video `xml:"videos>video"`
Quotes []quote `xml:"quotes>quote"`
Awards []award `xml:"awards>award"`
Additionals []additional `xml:"additionals>additional"`
Credits []credit `xml:"credits>credit"`
Contacts []struct {
Name string `xml:"name"`
Link link `xml:"link"`
} `xml:"contacts>contact"`
}
// link representation
type link struct {
Label string `xml:"label"`
Link string `xml:"link"`
}
// quote representation
type quote struct {
Text string `xml:"text"`
From string `xml:"from"`
Link link `xml:"link"`
}
// award representation
type award struct {
Description string `xml:"description"`
Info string `xml:"info"`
}
// additional representation
type additional struct {
Title string `xml:"title"`
Description string `xml:"description"`
Link link `xml:"link"`
}
// credit representation
type credit struct {
Person string `xml:"person"`
Role string `xml:"role"`
Link string `xml:"link"`
}