This repository has been archived by the owner on Jan 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
methodeContentPlaceholder.go
50 lines (44 loc) · 1.97 KB
/
methodeContentPlaceholder.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
package model
import (
"encoding/xml"
)
// MethodeContentPlaceholder is a data structure that models native methode content placeholders
type MethodeContentPlaceholder struct {
AttributesXML string `json:"attributes"`
SystemAttributes string `json:"systemAttributes"`
Type string `json:"type"`
UsageTickets string `json:"usageTickets"`
UUID string `json:"uuid"`
Value string `json:"value"`
WorkflowStatus string `json:"workflowStatus"`
Attributes Attributes `json:"-"`
Body MethodeBody `json:"-"`
}
// Attributes is the data structure that models methode content placeholders attributes
type Attributes struct {
XMLName xml.Name `xml:"ObjectMetadata"`
SourceCode string `xml:"EditorialNotes>Sources>Source>SourceCode"`
OriginalUUID string `xml:"EditorialNotes>OriginalUUID"`
LastPublicationDate string `xml:"OutputChannels>DIFTcom>DIFTcomLastPublication"`
RefField string `xml:"WiresIndexing>ref_field"`
ServiceId string `xml:"WiresIndexing>serviceid"`
Category string `xml:"WiresIndexing>category"`
IsDeleted bool `xml:"OutputChannels>DIFTcom>DIFTcomMarkDeleted"`
}
// MethodeBody represents the body of a methode content placeholder
type MethodeBody struct {
XMLName xml.Name `xml:"doc"`
LeadHeadline LeadHeadline `xml:"lead>lead-headline>headline>ln>a"`
LeadImage LeadImage `xml:"lead>lead-images>web-master"`
LongStandfirst string `xml:"lead>web-stand-first>p"`
ContentPackageHeadline string `xml:"lead>package-navigation-headline>ln"`
}
// LeadHeadline represents the LeadHeadline of a content placeholder
type LeadHeadline struct {
Text string `xml:",chardata"`
URL string `xml:"href,attr"`
}
// LeadImage represents the image attribute of a methode content placeholder
type LeadImage struct {
FileRef string `xml:"fileref,attr"`
}