-
Notifications
You must be signed in to change notification settings - Fork 13
/
structured.go
56 lines (51 loc) · 1.4 KB
/
structured.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
package opengraph
/**
* Structured Properties.
* https://ogp.me/#structured
*/
// Image represents a structure of "og:image".
// "og:image" might have following properties:
// - og:image:url
// - og:image:secure_url
// - og:image:type
// - og:image:width
// - og:image:height
// - og:image:alt
type Image struct {
URL string `json:"url"`
SecureURL string `json:"secure_url"`
Type string `json:"type"` // Content-Type
Width int `json:"width"`
Height int `json:"height"`
Alt string `json:"alt"`
}
// Video represents a structure of "og:video".
// "og:video" might have following properties:
// - og:video:url
// - og:video:secure_url
// - og:video:type
// - og:video:width
// - og:video:height
type Video struct {
URL string `json:"url"`
SecureURL string `json:"secure_url"`
Type string `json:"type"` // Content-Type
Width int `json:"width"`
Height int `json:"height"`
// Duration in seconds
Duration int `json:"duration"`
}
// Audio represents a structure of "og:audio".
// "og:audio" might have following properties:
// - og:audio:url
// - og:audio:secure_url
// - og:audio:type
type Audio struct {
URL string `json:"url"`
SecureURL string `json:"secure_url"`
Type string `json:"type"` // Content-Type
}
// Favicon represents an extra structure for "shortcut icon".
type Favicon struct {
URL string `json:"url"`
}