linkmeta

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: May 4, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Client = &http.Client{
		Timeout: 15 * time.Second,
	}

	ErrContentType = errors.New("Unsupported Content-Type")
)

Functions

This section is empty.

Types

type Meta

type Meta struct {
	URL         string `json:"URL"`
	SiteName    string `json:"siteName,omitempty"`
	Color       string `json:"color,omitempty"`
	Title       string `json:"title"`
	Description string `json:"description"`
	ImageURL    string `json:"imageURL,omitempty"`
	VideoURL    string `json:"videoURL,omitempty"`
}

func ExtractMeta

func ExtractMeta(body io.Reader, url string) (*Meta, error)

func Fetch

func Fetch(url string) (*Meta, error)

Jump to

Keyboard shortcuts

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