Documentation
¶
Overview ¶
Package opengraph implements and parses "The Open Graph Protocol" of web pages. See http://ogp.me/ for more information.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Link ¶
Link represents any "<link ...>" HTML tag
func (*Link) Contribute ¶
Contribute contributes OpenGraph
type Meta ¶
Meta represents any "<meta ...>" HTML tag.
func (*Meta) IsDescription ¶
IsDescription returns if it can be "description" of OGP
func (*Meta) IsImageProperty ¶
IsImageProperty retuns if it can be a property of "og:image" struct
func (*Meta) IsSiteName ¶
IsSiteName returns if it can be "og:site_name"
type OpenGraph ¶
type OpenGraph struct {
// Basics
Title string
Type string
URL URL
SiteName string
// Structures
Image []*OGImage
Video []*OGVideo
Audio []*OGAudio
// Optionals
Description string
Determiner string // TODO: enum?
Locale string
LocaleAlt []string
// Additionals
Favicon string
// Utils
HTTPClient *http.Client `json:"-"`
Error error `json:"-"`
}
OpenGraph represents web page information according to OGP <ogp.me>, and some more additional informations like URL.Host and so.
type Title ¶
type Title struct {
Text string
}
Title represents any "<title ...>" HTML tag.
func (*Title) Contribute ¶
Contribute contributes to OpenGraph
Source Files
¶
Click to show internal directories.
Click to hide internal directories.