vocab

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Term

type Term struct {
	Name        string
	Description string
	Usage       string
}

Term represents a definition of a term in a vocabulary.

type Vocabulary

type Vocabulary struct {
	BaseURL url.URL
	Terms   []Term
}

Vocabulary represents a vocabulary of terms.

func NewVocabulary

func NewVocabulary(terms []Term, baseURL url.URL) *Vocabulary

NewVocabulary creates a new Vocabulary instance.

func (*Vocabulary) RenderJSONLD

func (v *Vocabulary) RenderJSONLD() ([]byte, error)

RenderJSONLD renders the terms as a JSON-LD document.

func (*Vocabulary) RenderWebpage

func (v *Vocabulary) RenderWebpage() ([]byte, error)

RenderWebpage renders the terms as a webpage using the embedded template.

Jump to

Keyboard shortcuts

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