ogp

package module
v0.0.0-...-d36ed72 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2021 License: MIT Imports: 6 Imported by: 1

README

ogp

Implementation of open graph protocol parser

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Audio

type Audio struct {
	URL       string
	SecureURL string
	Type      string
}

type Image

type Image struct {
	URL       string
	SecureURL string
	Type      string
	Width     string
	Height    string
	Alt       string
}

type OpenGraph

type OpenGraph struct {
	// Basic metadata
	Title  string
	Type   string
	Images []*Image
	URL    string

	// Optional metadata
	Audios         []*Audio
	Videos         []*Video
	Description    string
	Determiner     string
	Locale         string
	LocaleAltanate []string
	SiteName       string
}

func Parse

func Parse(document []byte) (*OpenGraph, error)

type Video

type Video struct {
	URL       string
	SecureURL string
	Type      string
	Width     string
	Height    string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL