jsonld

package
v0.14.4 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateArtistJsonLdContent

func GenerateArtistJsonLdContent(r *wgaModels.Artist, c echo.Context) map[string]any

generateArtistJsonLdContent generates a JSON-LD content for an artist record. It takes a pointer to a models.Record and an echo.Context as input and returns a map[string]any. The returned map contains the JSON-LD content for the artist record, including the artist's name, URL, profession, birth and death dates, and birth and death places (if available). Deprecated: Use ArtistJsonLd instead.

func GenerateVisualArtworkJsonLdContent

func GenerateVisualArtworkJsonLdContent(r *models.Record, c echo.Context) map[string]any

generateVisualArtworkJsonLdContent generates a map containing JSON-LD content for a visual artwork record. It takes a models.Record pointer and an echo.Context as input and returns a map[string]any.

Types

type ImageObject added in v0.0.31

type ImageObject struct {
	Context      string `json:"@context,omitempty"`
	Type         string `json:"@type,omitempty"`
	Name         string `json:"name,omitempty"`
	Caption      string `json:"caption,omitempty"`
	Image        string `json:"image,omitempty"`
	ThumbnailUrl string `json:"thumbnailUrl,omitempty"`
}

ImageObject represents an image object entity in JSON-LD format.

type Occupation added in v0.0.31

type Occupation struct {
	Context string `json:"@context,omitempty"`
	Type    string `json:"@type,omitempty"`
	Name    string `json:"name,omitempty"`
}

Occupation represents an occupation entity in JSON-LD format.

type Person added in v0.0.31

type Person struct {
	Context       string     `json:"@context,omitempty"`
	Type          string     `json:"@type,omitempty"`
	Name          string     `json:"name,omitempty"`
	Url           string     `json:"url,omitempty"`
	BirthDate     string     `json:"birthDate,omitempty"`
	DeathDate     string     `json:"deathDate,omitempty"`
	PlaceOfBirth  Place      `json:"birthPlace,omitempty"`
	PlaceOfDeath  Place      `json:"deathPlace,omitempty"`
	Description   string     `json:"description,omitempty"`
	HasOccupation Occupation `json:"hasOccupation,omitempty"`
}

Person represents a person entity in JSON-LD format.

func ArtistJsonLd added in v0.0.31

func ArtistJsonLd(r *wgaModels.Artist, c echo.Context) Person

ArtistJsonLd generates a JSON-LD representation of an artist. It takes an instance of wgaModels.Artist and an echo.Context as input. It returns a Person struct representing the artist in JSON-LD format.

type Place added in v0.0.31

type Place struct {
	Context string `json:"@context,omitempty"`
	Type    string `json:"@type,omitempty"`
	Name    string `json:"name,omitempty"`
}

Place represents a place entity in JSON-LD format.

type VisualArtwork added in v0.0.31

type VisualArtwork struct {
	Context     string      `json:"@context,omitempty"`
	Type        string      `json:"@type,omitempty"`
	Name        string      `json:"name,omitempty"`
	Description string      `json:"description,omitempty"`
	Url         string      `json:"url,omitempty"`
	Artform     string      `json:"artform,omitempty"`
	Artist      Person      `json:"artist,omitempty"`
	ArtMedium   string      `json:"artMedium,omitempty"`
	Image       ImageObject `json:"image,omitempty"`
}

VisualArtwork represents a visual artwork entity in JSON-LD format.

func ArtworkJsonLd added in v0.0.31

func ArtworkJsonLd(r *models.Record, a *wgaModels.Artist, c echo.Context) VisualArtwork

Jump to

Keyboard shortcuts

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