golazy.dev
–
golazy.dev
/
lazyseo
/
jsonld
Index
|
Files
package jsonld
import "golazy.dev/lazyseo/jsonld"
Constants
const SchemaOrg
const SchemaOrg = "https://schema.org"
Functions
func Date
func Date(value time.Time) string
Types
type Article
type Article struct {
Context string `json:"@context,omitempty"`
Type string `json:"@type,omitempty"`
Headline string `json:"headline,omitempty"`
Description string `json:"description,omitempty"`
URL string `json:"url,omitempty"`
Image any `json:"image,omitempty"`
Author any `json:"author,omitempty"`
Publisher any `json:"publisher,omitempty"`
DatePublished string `json:"datePublished,omitempty"`
DateModified string `json:"dateModified,omitempty"`
MainEntityOfPage any `json:"mainEntityOfPage,omitempty"`
}
func NewArticle
func NewArticle(headline string) Article
type BreadcrumbList
type BreadcrumbList struct {
Context string `json:"@context,omitempty"`
Type string `json:"@type,omitempty"`
Items []ListItem `json:"itemListElement,omitempty"`
}
func NewBreadcrumbList
func NewBreadcrumbList(items ...ListItem) BreadcrumbList
type ImageObject
type ImageObject struct {
Context string `json:"@context,omitempty"`
Type string `json:"@type,omitempty"`
URL string `json:"url,omitempty"`
Width int `json:"width,omitempty"`
Height int `json:"height,omitempty"`
}
func NewImageObject
func NewImageObject(url string) ImageObject
type ListItem
type ListItem struct {
Type string `json:"@type,omitempty"`
Position int `json:"position,omitempty"`
Name string `json:"name,omitempty"`
Item string `json:"item,omitempty"`
}
func NewListItem
func NewListItem(position int, name, item string) ListItem
type Organization
type Organization struct {
Context string `json:"@context,omitempty"`
Type string `json:"@type,omitempty"`
Name string `json:"name,omitempty"`
URL string `json:"url,omitempty"`
Logo string `json:"logo,omitempty"`
}
func NewOrganization
func NewOrganization(name string) Organization
type Person
type Person struct {
Context string `json:"@context,omitempty"`
Type string `json:"@type,omitempty"`
Name string `json:"name,omitempty"`
URL string `json:"url,omitempty"`
Image string `json:"image,omitempty"`
}
func NewPerson
func NewPerson(name string) Person
type WebPage
type WebPage struct {
Context string `json:"@context,omitempty"`
Type string `json:"@type,omitempty"`
Name string `json:"name,omitempty"`
URL string `json:"url,omitempty"`
Description string `json:"description,omitempty"`
IsPartOf any `json:"isPartOf,omitempty"`
PrimaryImage any `json:"primaryImageOfPage,omitempty"`
}
func NewWebPage
func NewWebPage(name string) WebPage
type WebSite
type WebSite struct {
Context string `json:"@context,omitempty"`
Type string `json:"@type,omitempty"`
Name string `json:"name,omitempty"`
URL string `json:"url,omitempty"`
Publisher any `json:"publisher,omitempty"`
}
func NewWebSite
func NewWebSite(name string) WebSite
Package jsonld provides small schema.org JSON-LD value types for lazyseo.