-
Notifications
You must be signed in to change notification settings - Fork 2
/
gocontentfulvobase.go
151 lines (133 loc) · 4.84 KB
/
gocontentfulvobase.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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
// Code generated by https://github.com/foomo/gocontentful v1.0.23 - DO NOT EDIT.
package testapi
import "github.com/foomo/contentful"
type ContentTypeSysAttributes struct {
ID string `json:"id,omitempty"`
Type string `json:"type,omitempty"`
LinkType string `json:"linkType,omitempty"`
}
type ContentTypeSys struct {
Sys ContentTypeSysAttributes `json:"sys,omitempty"`
}
type ContentfulSys struct {
ID string `json:"id,omitempty"`
Type string `json:"type,omitempty"`
LinkType string `json:"linkType,omitempty"`
ContentType ContentTypeSys `json:"contentType,omitempty"`
Environment ContentTypeSys `json:"environment,omitempty"`
Space ContentTypeSys `json:"space,omitempty"`
CreatedAt string `json:"createdAt,omitempty"`
UpdatedAt string `json:"updatedAt,omitempty"`
Revision float64 `json:"revision,omitempty"`
Version float64 `json:"version,omitempty"`
PublishedCounter float64 `json:"publishedCounter,omitempty"`
PublishedVersion float64 `json:"publishedVersion,omitempty"`
}
type ContentfulReferencedEntry struct {
Entry *contentful.Entry
Col *contentful.Collection
LogFn func(
contentType string,
entryID string,
method string,
err error,
)
}
type ContentTypeFieldLocation struct {
Lat float64 `json:"lat,omitempty"`
Lon float64 `json:"lon,omitempty"`
}
type RichTextNode struct {
NodeType string `json:"nodeType"`
Content []interface{} `json:"content"`
Data RichTextData `json:"data"`
}
type RichTextNodeTextNode struct {
NodeType string `json:"nodeType"`
Data RichTextData `json:"data"`
Value string `json:"value"`
Marks []RichTextMark `json:"marks"`
}
type RichTextData struct {
URI string `json:"uri,omitempty"`
Target *ContentTypeSys `json:"target,omitempty"`
}
type RichTextGenericNode struct {
NodeType string `json:"nodeType"`
Content []*RichTextGenericNode `json:"content,omitempty"`
Data map[string]interface{} `json:"data,omitempty"`
Value string `json:"value"`
Marks []RichTextMark `json:"marks,omitempty"`
}
type richTextHtmlTag struct {
attrs map[string]string
name string
customHTML string
}
type richTextHtmlTags []richTextHtmlTag
type RichTextMark struct {
Type string `json:"type,omitempty"`
}
const (
FieldTypeLink string = "Link"
FieldLinkTypeEntry string = "Entry"
FieldLinkTypeAsset string = "Asset"
HtmlHeading1 string = "h1"
HtmlHeading2 string = "h2"
HtmlHeading3 string = "h3"
HtmlHeading4 string = "h4"
HtmlHeading5 string = "h5"
HtmlHeading6 string = "h6"
HtmlParagraph string = "p"
HtmlItalic string = "i"
HtmlEm string = "em"
HtmlBold string = "b"
HtmlStrong string = "strong"
HtmlUnderline string = "u"
HtmlAnchor string = "a"
HtmlImage string = "img"
HtmlBlockquote string = "blockquote"
HtmlCode string = "code"
HtmlUnorderedList string = "ul"
HtmlOrderedList string = "ol"
HtmlListItem string = "li"
HtmlBreak string = "br"
HtmlHorizontalRule string = "hr"
HtmlAttributeHref string = "href"
HtmlTable string = "table"
HtmlTableRow string = "tr"
HtmlTableHeaderCell string = "th"
HtmlTableCell string = "td"
RichTextNodeDocument string = "document"
RichTextNodeParagraph string = "paragraph"
RichTextNodeHeading1 string = "heading-1"
RichTextNodeHeading2 string = "heading-2"
RichTextNodeHeading3 string = "heading-3"
RichTextNodeHeading4 string = "heading-4"
RichTextNodeHeading5 string = "heading-5"
RichTextNodeHeading6 string = "heading-6"
RichTextNodeHyperlink string = "hyperlink"
RichTextNodeEntryHyperlink string = "entry-hyperlink"
RichTextNodeAssetHyperlink string = "asset-hyperlink"
RichTextNodeEmbeddedAsset string = "embedded-asset-block"
RichTextNodeEmbeddedEntry string = "embedded-entry-block"
RichTextNodeText string = "text"
RichTextNodeUnorderedList string = "unordered-list"
RichTextNodeOrderedList string = "ordered-list"
RichTextNodeListItem string = "list-item"
RichTextNodeBlockquote string = "blockquote"
RichTextNodeHR string = "hr"
RichTextNodeTable string = "table"
RichTextNodeTableRow string = "table-row"
RichTextNodeTableHeaderCell string = "table-header-cell"
RichTextNodeTableCell string = "table-cell"
RichTextMarkBold string = "bold"
RichTextMarkItalic string = "italic"
RichTextMarkUnderline string = "underline"
RichTextMarkCode string = "code"
)
const (
StatusDraft = "draft"
StatusChanged = "changed"
StatusPublished = "published"
)