Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/reiver/go-schemaorg
Package schemaorg provides an implementation of the schema.org vocabulary, as they are used on the Fediverse, for the Go programming language.
https://github.com/reiver/go-schemaorg
activitypub activitystreams fediverse json-ld schema-org schemaorg
Last synced: 29 days ago
JSON representation
Package schemaorg provides an implementation of the schema.org vocabulary, as they are used on the Fediverse, for the Go programming language.
- Host: GitHub
- URL: https://github.com/reiver/go-schemaorg
- Owner: reiver
- License: mit
- Created: 2024-12-09T11:44:34.000Z (30 days ago)
- Default Branch: master
- Last Pushed: 2024-12-09T12:25:40.000Z (30 days ago)
- Last Synced: 2024-12-09T12:36:57.457Z (30 days ago)
- Topics: activitypub, activitystreams, fediverse, json-ld, schema-org, schemaorg
- Language: Go
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-schemaorg
Package **schemaorg** provides an implementation of the [schema.org](http://schema.org/) vocabulary, as they are used on the Fediverse, for the Go programming language.
Use https://github.com/reiver/go-jsonld to marshal types in this package.
## Example
```golang
import (
"github.com/reiver/go-activitystreams"
"github.com/reiver/go-jsonld"
"github.com/reiver/go-schemaorg"
)// ...
var person = activitystreams.Person{
// ...
Attachments: []any{
schemaorg.PropertyValue{
Name: "Location",
Value: "Metro Vancouver",
},
schemaorg.PropertyValue{
Name: "Home-Page",
Value: "http://example.com/~joeblow",
},
},// ...
}.// ...
bytes, err := jsonld.Marshal()
```## Documention
Online documentation, which includes examples, can be found at: http://godoc.org/github.com/reiver/go-schemaorg
[![GoDoc](https://godoc.org/github.com/reiver/go-schemaorg?status.svg)](https://godoc.org/github.com/reiver/go-schemaorg)
## Import
To import package **schemaorg** use `import` code like the follownig:
```
import "github.com/reiver/go-schemaorg"
```## Installation
To install package **schemaorg** do the following:
```
GOPROXY=direct go get github.com/reiver/go-schemaorg
```## Author
Package **schemaorg** was written by [Charles Iliya Krempeaux](http://reiver.link)