og

package
v0.0.0-...-cb42137 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ogp

type Ogp struct {
	// the four required properties
	Title string      `json:"title"` // og:title
	Type  string      `json:"type"`  // og:type
	Image []*OgpImage `json:"image"` // og:image
	Url   string      `json:"url"`   // og:url

	// optional metadata
	Audio           []*OgpAudio `json:"audio"`            // og:audio
	Description     string      `json:"description"`      // og:description
	Determiner      string      `json:"determiner"`       // og:determiner
	Locale          string      `json:"locale"`           // og:locale
	LocaleAlternate []string    `json:"locale_alternate"` // og:locale:alternate
	SiteName        string      `json:"site_name"`        // og:site_name
	Video           []*OgpVideo `json:"video"`            // og:video
}

func GetOgp

func GetOgp(meta []map[string]string) *Ogp

type OgpAudio

type OgpAudio struct {
	Url       string `json:"url"`
	SecureUrl string `json:"secure_url"`
	Type      string `json:"type"`
}

type OgpImage

type OgpImage struct {
	Url       string `json:"url"`
	SecureUrl string `json:"secure_url"`
	Type      string `json:"type"`
	Width     int    `json:"width"`
	Height    int    `json:"height"`
}

type OgpVideo

type OgpVideo struct {
	Url       string `json:"url"`
	SecureUrl string `json:"secure_url"`
	Type      string `json:"type"`
	Width     int    `json:"width"`
	Height    int    `json:"height"`
}

Jump to

Keyboard shortcuts

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