Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Article ¶
type Article struct { PublishedTime *time.Time `json:"published_time"` ModifiedTime *time.Time `json:"modified_time"` ExpirationTime *time.Time `json:"expiration_time"` Section string `json:"section"` Tags []string `json:"tags"` Authors []*Profile `json:"authors"` }
Article contain Open Graph Article structure
type Audio ¶
type Audio struct { URL string `json:"url"` SecureURL string `json:"secure_url"` Type string `json:"type"` }
Audio defines Open Graph Audio Type
type Book ¶
type Book struct { ISBN string `json:"isbn"` ReleaseDate *time.Time `json:"release_date"` Tags []string `json:"tags"` Authors []*Profile `json:"authors"` }
Book contains Open Graph Book structure
type Image ¶
type Image struct { URL string `json:"url"` SecureURL string `json:"secure_url"` Type string `json:"type"` Width uint64 `json:"width"` Height uint64 `json:"height"` }
Image defines Open Graph Image type
type OpenGraph ¶
type OpenGraph struct { Type string `json:"type"` URL string `json:"url"` Title string `json:"title"` Description string `json:"description"` Determiner string `json:"determiner"` SiteName string `json:"site_name"` Locale string `json:"locale"` LocalesAlternate []string `json:"locales_alternate"` Images []*Image `json:"images"` Audios []*Audio `json:"audios"` Videos []*Video `json:"videos"` Article *Article `json:"article,omitempty"` Book *Book `json:"book,omitempty"` Profile *Profile `json:"profile,omitempty"` // contains filtered or unexported fields }
OpenGraph contains facebook og data
func NewOpenGraph ¶
func NewOpenGraph() *OpenGraph
NewOpenGraph returns new instance of Open Graph structure
func (*OpenGraph) ProcessHTML ¶
ProcessHTML parses given html from Reader interface and fills up OpenGraph structure
func (*OpenGraph) ProcessMeta ¶
ProcessMeta processes meta attributes and adds them to Open Graph structure if they are suitable for that
Click to show internal directories.
Click to hide internal directories.